/// <summary> /// Parse all tracks to (vst) mididatalist and our internal delegation. /// </summary> public void ParseAll() { MidiVSTMessageList.Clear(); TrackLength.Clear(); for (int i = 0; i < FileHandle.NumberOfTracks; i++) { MidiVSTMessageList.CreateKey(i); TrackLength.Add(-1); } CurrentTrackPulse = 0; lock (ParseAllLock) { for (int nTrackIndex = 0; nTrackIndex < FileHandle.NumberOfTracks; nTrackIndex++) { ResetTrackTiming(); selectedTrackNumber = nTrackIndex; // without triggering the event. long delta = 0; int nTrackOffset = 0; do { nTrackOffset = FileHandle.ReadDelta(nTrackIndex, nTrackOffset, out delta); CurrentTrackPulse += delta; nTrackOffset = GetNTrackMessage(nTrackIndex, nTrackOffset, Convert.ToInt32(delta)); }while (nTrackOffset < FileHandle.Tracks[nTrackIndex].Data.Length); TrackLength[nTrackIndex] = CurrentTrackPulse; } } }
internal void ResetTempoMap() { TempoMap.Clear(); SMPTE.Reset(); TimeSignature.Reset(); KeySignature.Reset(); MidiMessages.Clear(); MidiVSTMessageList.Clear(); }