Exemple #1
0
 /// <summary>
 /// Gets the interval relative to another pitch.
 /// </summary>
 /// <param name="pitch">A pitch.</param>
 /// <returns>The interval relative to another pitch.</returns>
 public int GetInterval(Pitch pitch)
 {
     return(GetInterval(this, pitch));
 }
Exemple #2
0
 public bool Equals(Pitch other)
 {
     return(this.Key == other.Key && this.Octave == other.Octave);
 }
Exemple #3
0
 /// <summary>
 /// Gets the interval between two pitches.
 /// </summary>
 /// <param name="pitch1">The first pitch.</param>
 /// <param name="pitch2">The second pitch.</param>
 /// <returns>The interval between the pitches.</returns>
 public static int GetInterval(Pitch pitch1, Pitch pitch2)
 {
     return(Math.Abs(pitch1.MidiPitch - pitch2.MidiPitch));
 }