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); }
public NoteList(TempoMap tempoMap, TimeSignatureMap timeSignatureMap) { this.tempoMap = tempoMap; this.timeSignatureMap = timeSignatureMap; }