public Clef( ClefSymbol symbol = default(ClefSymbol), DiatonicTone bottomkey = default(DiatonicTone) ) { Symbol = symbol; BottomKey = bottomkey; }
public NoteLayout( PerceptualNote core, int halfline, float x, float width, DiatonicTone key, PitchTransform transform ) { this.core = core; this.halfline = halfline; this.x = x; this.width = width; this.key = key; this.transform = transform; }
public NoteStemDirection GetStemDirection(DiatonicTone key) => GetHalfLine(key) >= MiddleHalfLine ? NoteStemDirection.Down : NoteStemDirection.Up;
// Line 0 is the bottom line. // Half-line 4 would be the center of 5 whole-lines. public int GetHalfLine(DiatonicTone key) => key - Clef.BottomKey + Shift;
public SemiTone SemiToneOfKey(DiatonicTone diatone) => this[diatone.KeyClass] * new SemiTone(diatone.KeyClass.GetPitchClass(), diatone.Octave);
public SemiTone SemiToneOfKey(DiatonicTone diatone, PitchTransform transform) => transform * (this[diatone.KeyClass] * new SemiTone(diatone.KeyClass.GetPitchClass(), diatone.Octave));