C# 클래스 Midi.Scale

A scale based on a particular tonic.

For our purposes, a scale is defined by a tonic and then the pattern that it uses to ascend up to the next tonic and then descend back to the original tonic. The tonic is described with a NoteFamily because it is not specific to any one octave. The ascending/descending pattern is provided by the Pattern nested class.

This class comes with a collection of predefined patterns, such as Scale.Major and Scale.HarmonicMinor.

파일 보기 프로젝트 열기: jstnryan/midi-dot-net 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
Chromatic ScalePattern
HarmonicMinor ScalePattern
Major ScalePattern
MelodicMinorAscending ScalePattern
MelodicMinorDescending ScalePattern
NaturalMinor ScalePattern
Patterns Midi.ScalePattern[]

공개 메소드들

메소드 설명
Contains ( Pitch pitch ) : bool

Returns true if pitch is in this scale.

Equals ( System obj ) : bool

Value equality.

GetHashCode ( ) : int

Hash code.

Scale ( Midi.Note tonic, ScalePattern pattern ) : System

Constructs a scale from its tonic and its pattern.

ScaleDegree ( Pitch pitch ) : int

Returns the scale degree of the given pitch in this scale.

ToString ( ) : string

ToString returns the scale's human-readable name.

operator ( ) : bool

Inequality operator does value inequality because Chord is immutable.

비공개 메소드들

메소드 설명
Build ( Midi.Note tonic, ScalePattern pattern, int positionInOctaveToSequenceIndex, Midi.Note noteSequence, int &numAccidentals ) : void

Builds a scale.

메소드 상세

Contains() 공개 메소드

Returns true if pitch is in this scale.
public Contains ( Pitch pitch ) : bool
pitch Pitch The pitch to test.
리턴 bool

Equals() 공개 메소드

Value equality.
public Equals ( System obj ) : bool
obj System
리턴 bool

GetHashCode() 공개 메소드

Hash code.
public GetHashCode ( ) : int
리턴 int

Scale() 공개 메소드

Constructs a scale from its tonic and its pattern.
tonic or pattern is null.
public Scale ( Midi.Note tonic, ScalePattern pattern ) : System
tonic Midi.Note The tonic note.
pattern ScalePattern The scale pattern.
리턴 System

ScaleDegree() 공개 메소드

Returns the scale degree of the given pitch in this scale.
public ScaleDegree ( Pitch pitch ) : int
pitch Pitch The pitch to test.
리턴 int

ToString() 공개 메소드

ToString returns the scale's human-readable name.
public ToString ( ) : string
리턴 string

operator() 공개 정적인 메소드

Inequality operator does value inequality because Chord is immutable.
public static operator ( ) : bool
리턴 bool

프로퍼티 상세

Chromatic 공개적으로 정적으로 프로퍼티

Pattern for Chromatic scales.
public static ScalePattern,Midi Chromatic
리턴 ScalePattern

HarmonicMinor 공개적으로 정적으로 프로퍼티

Pattern for Harmonic Minor scales.
public static ScalePattern,Midi HarmonicMinor
리턴 ScalePattern

Major 공개적으로 정적으로 프로퍼티

Pattern for Major scales.
public static ScalePattern,Midi Major
리턴 ScalePattern

MelodicMinorAscending 공개적으로 정적으로 프로퍼티

Pattern for Melodic Minor scale as it ascends.
public static ScalePattern,Midi MelodicMinorAscending
리턴 ScalePattern

MelodicMinorDescending 공개적으로 정적으로 프로퍼티

Pattern for Melodic Minor scale as it descends.
public static ScalePattern,Midi MelodicMinorDescending
리턴 ScalePattern

NaturalMinor 공개적으로 정적으로 프로퍼티

Pattern for Natural Minor scales.
public static ScalePattern,Midi NaturalMinor
리턴 ScalePattern

Patterns 공개적으로 정적으로 프로퍼티

Array of all the built-in scale patterns.
public static ScalePattern[],Midi Patterns
리턴 Midi.ScalePattern[]