Skip to content

Commit

Permalink
Merge pull request LMMS#3520 from curlymorphic/eqWetDry
Browse files Browse the repository at this point in the history
EQ plugin now responds to wet / dry control
  • Loading branch information
tresf committed May 2, 2017
2 parents f737f48 + 96d4bf4 commit 8959528
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions plugins/Eq/EqEffect.cpp
Expand Up @@ -70,6 +70,10 @@ EqEffect::~EqEffect()

bool EqEffect::processAudioBuffer( sampleFrame *buf, const fpp_t frames )
{
//wet/dry controls
const float dry = dryLevel();
const float wet = wetLevel();
sample_t dryS[2];
// setup sample exact controls
float hpRes = m_eqControls.m_hpResModel.value();
float lowShelfRes = m_eqControls.m_lowShelfResModel.value();
Expand Down Expand Up @@ -205,6 +209,9 @@ bool EqEffect::processAudioBuffer( sampleFrame *buf, const fpp_t frames )

for( fpp_t f = 0; f < frames; f++)
{
//wet dry buffer
dryS[0] = buf[f][0];
dryS[1] = buf[f][1];
if( hpActive )
{
m_hp12.setParameters( sampleRate, *hpFreqPtr, *hpResPtr, 1 );
Expand Down Expand Up @@ -296,6 +303,10 @@ bool EqEffect::processAudioBuffer( sampleFrame *buf, const fpp_t frames )
}
}

//apply wet / dry levels
buf[f][1] = ( dry * dryS[1] ) + ( wet * buf[f][1] );
buf[f][0] = ( dry * dryS[0] ) + ( wet * buf[f][0] );

//increment pointers if needed
hpResPtr += hpResInc;
lowShelfResPtr += lowShelfResInc;
Expand Down

0 comments on commit 8959528

Please sign in to comment.