private void checkForNewBeat() {
		if (msSinceBeat > getMsPerBeat()) {
			measureActions.set(beatNumber, beatBuffer.processBeat(getMsPerBeat()));
			isNewBeat = true;
			beatNumber++;
			if (beatNumber >= beatsPerMeasure) {
				beatNumber -= beatsPerMeasure;
				measureNumber++;
				isNewMeasure = true;
			} else {
				isNewMeasure = false;
			}
			msSinceBeat = Math.round(msSinceStart
					- (measureNumber * beatsPerMeasure + beatNumber)
					* getMsPerBeat());
		} else {
			isNewBeat = false;
			isNewMeasure = false;
		}
		
		if (isFirstFrame) {
			isNewBeat = true;
			isNewMeasure = true;
			isFirstFrame = false;
		}
	}