public Note(XElement element, IReadOnlyDictionary <string, double> noteValues) { if (element.Contains("tone")) { Tone = new Tone(element.ElementValue("tone")); } else { Tone = null; } if (element.Element("value").HasElements) { Value = 0; foreach (var subValue in element.Element("value").Elements()) { Value += LoadNoteValue(subValue.Value, noteValues); } } else { Value = LoadNoteValue(element.ElementValue("value"), noteValues); } }
public Note(Tone tone, double value) { Tone = tone; Value = value; }
public bool IsEqual(Tone note) { return(ToneNumber == note.ToneNumber); }
public Key(Tone note, Scale scale) { Root = note; Scale = scale; }
public int HalfToneDiff(Tone note) { return(note.ToneNumber - ToneNumber); }