Beispiel #1
0
 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);
     }
 }
Beispiel #2
0
 public Note(Tone tone, double value)
 {
     Tone  = tone;
     Value = value;
 }
Beispiel #3
0
 public bool IsEqual(Tone note)
 {
     return(ToneNumber == note.ToneNumber);
 }
Beispiel #4
0
 public Key(Tone note, Scale scale)
 {
     Root  = note;
     Scale = scale;
 }
Beispiel #5
0
 public int HalfToneDiff(Tone note)
 {
     return(note.ToneNumber - ToneNumber);
 }