Processing Forum
while (_currBeatFndInd == false && _currBeatIdx < _beats.length) {
int startTmMsNbr = ( int)(Float.parseFloat( _beats[ _currBeatIdx].get( "start").toString()) * 1000);
if (startTmMsNbr >= _player.position() - MAX_LATENCY_MS_NBR) {
_msToNextBeatNbr = abs(startTmMsNbr - _player.position());
}
if (_msToNextBeatNbr <= MAX_LATENCY_MS_NBR ) {
//if (true) {
circles.get(0).update();
println( _currBeatIdx + " drawn");
_currBeatFndInd = true ;
_currBeatIdx ++;
} else {
// println(_currBeatIdx + " " + _msToNextBeatNbr);
}
} else {
_currBeatIdx ++;
}