Пример #1
0
        public NoteList Read(string path)
        {
            var smf = MidiFileLoader.Load(File.ReadAllBytes(path));

            var conductorTrack = smf.tracks[0];
            var noteTrack      = smf.tracks[1];

            var tempoMap         = new TempoMap(smf.division);
            var timeSignatureMap = new TimeSignatureMap(smf.division);

            ParseConductorTrack(conductorTrack, tempoMap, timeSignatureMap);

            var noteList = new NoteList(tempoMap, timeSignatureMap);

            ParseNoteTrack(smf, noteTrack, noteList);

            return(noteList);
        }
Пример #2
0
 public NoteList(TempoMap tempoMap, TimeSignatureMap timeSignatureMap)
 {
     this.tempoMap         = tempoMap;
     this.timeSignatureMap = timeSignatureMap;
 }