-Looper records loop lenght better

This commit is contained in:
Harry van Haaren 2013-05-16 18:03:48 +01:00
parent 3f3b934ab5
commit 0443975eb7

View file

@ -71,7 +71,11 @@ void Looper::process(int nframes, Buffers* buffers)
void Looper::bar() void Looper::bar()
{ {
stopRecordOnBar = false; // queue stop recording -> stop recording, now calculate beats in loop
if ( stopRecordOnBar )
{
stopRecordOnBar = false;
}
if ( playedBeats >= numBeats ) if ( playedBeats >= numBeats )
{ {
@ -109,11 +113,11 @@ void Looper::bar()
void Looper::beat() void Looper::beat()
{ {
if (state == STATE_RECORDING) if (state == STATE_RECORDING || stopRecordOnBar )
{ {
numBeats++; numBeats++;
} }
playedBeats++; // only reset if we're on the last beat of a loop playedBeats++;
} }
void Looper::setLoopLength(float l) void Looper::setLoopLength(float l)