public int DistanceTo(Note note, Clef clef) { var notes = Notes.NotesInClef(clef); var thisIndex = notes.IndexOf(this); var other = notes.IndexOf(note); return(thisIndex - other); }
public Relation RelationTo(Note note, Clef clef) { var notes = Notes.NotesInClef(clef); var thisIndex = notes.IndexOf(this); var other = notes.IndexOf(note); if (thisIndex - other > 0) { return(Relation.Higher); } if (thisIndex == other) { return(Relation.Equal); } return(Relation.Lower); }
public Note OctaveDown(Clef clef) { var notes = Notes.NotesInClef(clef); return(notes.Skip(notes.IndexOf(this) - 8).FirstOrDefault()); }