From 81f0b14465456cdba8ab71c0d604ad8a406eb030 Mon Sep 17 00:00:00 2001 From: Dave French Date: Wed, 25 Feb 2015 22:12:22 +0000 Subject: [PATCH] smoothed the time parameter of the delay pluging --- plugins/Delay/DelayEffect.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/Delay/DelayEffect.cpp b/plugins/Delay/DelayEffect.cpp index aa01a49d0..5b13b92a0 100644 --- a/plugins/Delay/DelayEffect.cpp +++ b/plugins/Delay/DelayEffect.cpp @@ -91,13 +91,14 @@ bool DelayEffect::processAudioBuffer( sampleFrame* buf, const fpp_t frames ) sample_t dryS[2]; float lPeak = 0.0; float rPeak = 0.0; + float incr = ( m_currentLength - length ) / frames; if( m_delayControls.m_outGainModel.isValueChanged() ) { m_outGain = dbvToAmp( m_delayControls.m_outGainModel.value() ); } for( fpp_t f = 0; f < frames; ++f ) { - m_currentLength = linearInterpolate( length, m_currentLength, 0.9999 ); + m_currentLength -= incr; dryS[0] = buf[f][0]; dryS[1] = buf[f][1]; m_delay->setLength( ( float )m_currentLength + ( amplitude * ( float )m_lfo->tick() ) );