public static string GetSimpleName(this RelativePitch relativePitch) { switch (relativePitch) { case RelativePitch.C: return("C"); case RelativePitch.Cs: return("C#"); case RelativePitch.D: return("D"); case RelativePitch.Ds: return("D#"); case RelativePitch.E: return("E"); case RelativePitch.F: return("F"); case RelativePitch.Fs: return("F#"); case RelativePitch.G: return("G"); case RelativePitch.Gs: return("G#"); case RelativePitch.A: return("A"); case RelativePitch.As: return("A#"); case RelativePitch.B: return("B"); default: return("?"); } }
public bool HasPitch(RelativePitch relativePitch) { return (Util.ScaleData.HasRelativePitch( this.scale, Util.RelativePitchData.DisplaceBy(relativePitch, this.tonicPitch))); }
public RelativePitchCommand(RelativePitch orient) : base(orient.StartTime, orient.Duration) { _targetRelativePitch = orient.TargetOrientation * MathHelper.DegreesToRadians; }
public static bool HasRelativePitch(this Scale scale, RelativePitch relativePitch) { return(relativePitchesToDegree[(int)scale][(int)relativePitch] >= 0); }
public static RelativePitch DisplaceBy(this RelativePitch relativePitch, RelativePitch otherPitch) { return((RelativePitch)(((int)relativePitch + 12 - (int)otherPitch) % 12)); }
public static Util.Pitch GetPitch(this RelativePitch relativePitch, int octave) { return(Util.Pitch.FromMidiPitch((int)relativePitch + 12 * octave)); }
public Key(RelativePitch tonicPitch, Scale scale) { this.tonicPitch = tonicPitch; this.scale = scale; }