public ChordSongInterpreter(NoteLetter key, MajorMinor majorMinor, int sampleRate, int beatsPerMinute, int beatsPerMeasure)
 {
     _key                 = key;
     _majorMinor          = majorMinor;
     _sampleRate          = sampleRate;
     _tempo               = beatsPerMinute;
     _timeSignature       = beatsPerMeasure;
     _fallbackInterpreter = new DefaultSongInterpreter(sampleRate, beatsPerMinute, beatsPerMeasure);
     SetupChordLookup();
 }
示例#2
0
 private void ReadSong(StreamReader reader, ISongInterpreter songInterpreter)
 {
     while (!reader.EndOfStream)
     {
         var line            = reader.ReadLine();
         var interpretedLine = songInterpreter.ConvertToNotes(line);
         if (interpretedLine != null && interpretedLine.Any())
         {
             foreach (var note in interpretedLine)
             {
                 Notes.Add(note);
             }
         }
     }
 }
 public ChordSongInterpreter(NoteLetter key, int sampleRate, ISongInterpreter fallbackInterpreter)
 {
     _key                 = key;
     _sampleRate          = sampleRate;
     _fallbackInterpreter = fallbackInterpreter;
 }