This commit is contained in:
Harry van Haaren 2013-05-19 02:34:39 +01:00
parent aa8364db20
commit a08118b4f1
2 changed files with 2 additions and 24 deletions

View file

@ -33,7 +33,6 @@ class ControllerUpdator
void recordArm(int t, bool r)
{
cout << "record() " << t << " " << r << endl;
for(int i = 0; i < c.size(); i++)
c.at(i)->recordArm(t,r);
}

View file

@ -125,20 +125,7 @@ void Looper::process(int nframes, Buffers* buffers)
float* out = buffers->audio[Buffers::MASTER_OUTPUT];
float playbackSpeed = endPoint / ( float(numBeats) * fpb );
// invert the change due to speed, and pitch-shift it back to normal :D
float deltaPitch = 12 * log ( playbackSpeed ) / log (2);
semitoneShift = -deltaPitch;
if (track == 0)
{
/*
// log pitch-shift rates
char buffer [50];
sprintf (buffer, "Looper, pbs=%f, dP=%f", playbackSpeed, deltaPitch );
EventGuiPrint e( buffer );
writeToGuiRingbuffer( &e );
*/
}
semitoneShift = -( 12 * log ( playbackSpeed ) / log (2) );
if ( state == STATE_PLAYING )
{
@ -146,10 +133,8 @@ void Looper::process(int nframes, Buffers* buffers)
{
if ( playPoint < endPoint )
{
tmpBuffer[i] = sample[int(playPoint)];// * gain;
tmpBuffer[i] = sample[int(playPoint)] * gain;
}
// always update playPoint, even when not playing sound.
// it updates the UI of progress
playPoint += playbackSpeed;
}
@ -157,12 +142,6 @@ void Looper::process(int nframes, Buffers* buffers)
pitchShift( nframes, &tmpBuffer[0], out);
float prog = (float(playPoint) / (fpb*numBeats));
/*
if ( track == 0 )
cout << prog << " playPoint " << playPoint << " endPoint " << endPoint
<< " fpb*numBeats " << fpb * numBeats << endl;
*/
EventLooperProgress e(track, prog );
writeToGuiRingbuffer( &e );
}