getLoopsElapsed method
For internal use only. Returns the number of loops that have been played since the sequence started playing.
Implementation
int getLoopsElapsed(int frame) {
final loopStartFrame = beatToFrames(loopStartBeat);
if (frame <= loopStartFrame) return 0;
if (getLoopLengthFrames() == 0) return 0;
return ((frame - loopStartFrame) / getLoopLengthFrames()).floor();
}