Ejemplo n.º 1
0
 public Clef(
     ClefSymbol symbol      = default(ClefSymbol),
     DiatonicTone bottomkey = default(DiatonicTone)
     )
 {
     Symbol    = symbol;
     BottomKey = bottomkey;
 }
Ejemplo n.º 2
0
 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;
 }
Ejemplo n.º 3
0
 public NoteStemDirection GetStemDirection(DiatonicTone key) =>
 GetHalfLine(key) >= MiddleHalfLine ?
 NoteStemDirection.Down :
 NoteStemDirection.Up;
Ejemplo n.º 4
0
        // 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;
Ejemplo n.º 5
0
 public SemiTone SemiToneOfKey(DiatonicTone diatone) =>
 this[diatone.KeyClass] * new SemiTone(diatone.KeyClass.GetPitchClass(), diatone.Octave);
Ejemplo n.º 6
0
 public SemiTone SemiToneOfKey(DiatonicTone diatone, PitchTransform transform) =>
 transform * (this[diatone.KeyClass] * new SemiTone(diatone.KeyClass.GetPitchClass(), diatone.Octave));