示例#1
0
        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);
        }
示例#2
0
        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);
        }
示例#3
0
        public Note OctaveDown(Clef clef)
        {
            var notes = Notes.NotesInClef(clef);

            return(notes.Skip(notes.IndexOf(this) - 8).FirstOrDefault());
        }