-Looper records loop lenght better

main
Harry van Haaren 2013-05-16 18:03:48 +01:00
parent 3f3b934ab5
commit 0443975eb7
1 changed files with 7 additions and 3 deletions

View File

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