More peak controller changes:

Add treshold knob to peak controller
This causes the peak controller to react only when the measured peaks are above the set treshold
Might be useful for finetuning your sidechains
This commit is contained in:
Vesa
2014-11-10 22:53:32 +02:00
parent b441bdae15
commit ba05b7523d
7 changed files with 18 additions and 3 deletions

View File

@@ -87,8 +87,8 @@ void PeakController::updateValueBuffer()
if( m_coeffNeedsUpdate )
{
const float ratio = 44100.0f / engine::mixer()->processingSampleRate();
m_attackCoeff = 1.0f - powf( 10.0f, -0.5f * ( 1.0f - m_peakEffect->attackModel()->value() ) * ratio );
m_decayCoeff = 1.0f - powf( 10.0f, -0.5f * ( 1.0f - m_peakEffect->decayModel()->value() ) * ratio );
m_attackCoeff = 1.0f - powf( 2.0f, -0.3f * ( 1.0f - m_peakEffect->attackModel()->value() ) * ratio );
m_decayCoeff = 1.0f - powf( 2.0f, -0.3f * ( 1.0f - m_peakEffect->decayModel()->value() ) * ratio );
m_coeffNeedsUpdate = false;
}