/// <summary> /// Sets the sequence to the current beat, called just before first Read() call /// </summary> public void Init(double currentBeat) { Array.Sort(FStartTimes, FNoteOns); Array.Sort(FEndTimes, FNoteOffs); FOns = new TimeArrayIterator(FStartTimes, FLength); FOffs = new TimeArrayIterator(FEndTimes, FLength); var currentSeqTime = currentBeat % FLength; FOns.Init(currentSeqTime); FOffs.Init(currentSeqTime); FLastEndBeat = currentBeat; }
/// <summary> /// Sets the sequence to the current beat, called just before first Read() call /// </summary> public void Init(double currentBeat) { Array.Sort(FStartTimes, FNoteOns); Array.Sort(FEndTimes, FNoteOffs); FOns = new TimeArrayIterator(FStartTimes, FLength); FOffs = new TimeArrayIterator(FEndTimes, FLength); var currentSeqTime = currentBeat % FLength; FOns.Init(currentSeqTime); FOffs.Init(currentSeqTime); FLastEndBeat = currentBeat; }