Пример #1
0
 static public Pitch GetShiftedTone(this Pitch item, int amount)
 {
     return(item.GetShiftedSemitones(amount));
 }
Пример #2
0
 static public Pitch GetBasePitch(this Pitch item)
 {
     return(new Pitch(item.GetTone()));
 }
Пример #3
0
 static public Pitch GetShiftedSemitones(this Pitch item, double amount)
 {
     return(new Pitch(item.GetSemitones() + amount));
 }
Пример #4
0
 static public int GetTone(this Pitch item)
 {
     return((int)(item.GetSemitones() - item.GetOctave() * Pitch.Octave));
 }
Пример #5
0
 static public int GetCents(this Pitch item)
 {
     return((int)(item.GetSemitones().GetFractionalComponent() * 100.0));
 }
Пример #6
0
 static public Pitch GetShiftedCents(this Pitch item, int amount)
 {
     return(item.GetShiftedSemitones(amount / 100.0));
 }
Пример #7
0
 public Pitch GetPitch(Pitch root)
 {
     return(root.GetShiftedSemitones(offset));
 }
Пример #8
0
 static public byte GetMidiNote(this Pitch item)
 {
     return((byte)item.GetSemitones());
 }
Пример #9
0
 static public Pitch GetShiftedOctave(this Pitch item, int amount)
 {
     return(item.GetShiftedSemitones(amount * Pitch.Octave));
 }
Пример #10
0
 public Scale CreateScale(Pitch root)
 {
     return(new Scale(root, this));
 }
Пример #11
0
 static public double GetFrequency(this Pitch item)
 {
     return(440.0 * Math.Pow(2.0, (item.GetSemitones() - 69.0) / 12.0));
 }