3:47 am

September 5, 2017

Hello, guys!

I'm new here. It's my first post, so take me easy.

I try to implement a dynamic equalizer. I have the equalizer and the compressor/expander implemented already, but I can't find a way to take the output of the dynamic processor and multiply it with the gain knob from a band of the equalizer.

In my mind, and from what I read in other places, the signal provided by the dynamic processor in the side-chain path must be multiplied with the gain knob from a band of the equalizer you choose in the parametric equalizer.

I mention that I used this block diagram for implementing:

I don't know if this is the only way you can implement a dynamic equalizer, but I'm open to suggestions.

8:59 am

January 29, 2017

I'm new here. It's my first post, so take me easy.

LOL - this is usually a pretty mellow Forum so don't worry about that! I try to keep it the opposite of those other message boards and forums out there (you know which ones...), unless someone is really abusing the Forum.

If you are using my FX book, you will see that the output of my gain computer is always between 0 (full gain-reduction = off) and 1.0 (no gain-reduction = on) because the compressor and downward-expander implement gain reduction algorithms. You will need to use this unipolar value to modulate the gain control of your EQ so you will need to decide whether your modulation is one-sided (boost or cut only) or two-sided (boost and cut). Then, you will need to map the unipolar value to a boost/cut value for the EQ using the same kind of modulation code as the flanger (unipolar) or the chorus (bipolar). So it isn't really a multiplication, but rather a mapping of values. You can find examples of that in the FX book chapter on flanger/chorus.

The equation for a bipolar mapping can be found here, and can be modified to work as a unipolar version pretty easily:

http://www.willpirkle.com/foru.....structure/

Hope that helps -

Will

5:18 am

September 5, 2017

I love the book. It combines the mathematical principles with the implementation of the code and makes it easy to understand.

Anyway, about the dynamic EQ, I'm not sure I understand exactly what you said, so correct me if I am wrong.

In order to create the dynamic EQ (or in other words to make the Gain value of a band to oscillate) I need to use the signal provided by the compressor, instead of LFO signal and feed the delay line of the flanger effect (Fig. 10.3a). But I can't understand why I need the delay line and I can't see a way to use the code that describes the flanger functionality for my dynamic EQ.

Also, I read the chapter with the modulated filter effects and I was thinking if I could modulate the gain instead of the cutoff frequency using the same code presented there.

My head is a mess right now, so please explain me in the simplest way you can. I mean I know how a dynamic EQ works, I know the block diagram and the signal flow. In this case, what I can't understand is how I make use of the code from the book.

Thank you very much!

8:27 am

September 5, 2017

I think I made it. I don't know exactly how can I measure if it works. I mean, I hear some differences in the audio signal but I don't know if the differences are the right ones.

I list the code, so you can take a look and tell me if I'm wrong somewhere. I took the EnvelopeFollower.prj and I made some changes. Now, the filter is a peak filter with constant Q and the values from the envelope detector are inserted in the function to change the gain values.

//CODE//

// set our Min and Max Modulation points

m_fMinGainR = -20.0;

m_fMaxGainR = 0.0;

float CEnvelopeFollower::calculateGainReduction(float fEnvelopeSample)

{

// modulate from min upwards

if (m_uDirection == UP)

return fEnvelopeSample*(m_fMaxGainR - m_fMinGainR) + m_fMinGainR;

else

// modulate from max downwards

return m_fMaxGainR - fEnvelopeSample*(m_fMaxGainR - m_fMinGainR);

return m_fMinGainR;

}

//Calculate Left Peak Filter Constant Q

void CEnvelopeFollower::calculate_LeftConstantQ(float fCutoff, float fQ, float fGain)

{

//m_fGain - slider value

float K = tan((pi*fCutoff) / (float)m_nSampleRate);

float V0 = pow(10.0, (m_fGain) / 20.0);

V0 *= pow(10.0, fGain / 20.0);

float d0 = 1 + K / fQ + K*K;

float e0 = 1 + K / (fQ*V0) + K*K;

float fAlpha = 1 + (V0*K) / fQ + K*K;

float fBeta = 2 * (K - 1)*(K + 1);

float fGamma = 1 - (V0*K) / fQ + K*K;

float fDelta = 1 - K / fQ + K*K;

float fEta = 1 - K / (V0*fQ) + K*K;

if (m_fGain > 0)

{<calculate coefficients>}

else

{<calculate coefficients>}

}

//Calculate Right Peak Filter Constant Q

void CEnvelopeFollower::calculate_RightConstantQ(float fCutoff, float fQ, float fGain)

{

//m_fGain - slider value

float K = tan((pi*fCutoff) / (float)m_nSampleRate);

float V0 = pow(10.0, (m_fGain) / 20.0);

V0 *= pow(10.0, fGain / 20.0);

float d0 = 1 + K / fQ + K*K;

float e0 = 1 + K / (fQ*V0) + K*K;

float fAlpha = 1 + (V0*K) / fQ + K*K;

float fBeta = 2 * (K - 1)*(K + 1);

float fGamma = 1 - (V0*K) / fQ + K*K;

float fDelta = 1 - K / fQ + K*K;

float fEta = 1 - K / (V0*fQ) + K*K;

if (m_fGain > 0)

{<calculate coefficients>}

else

{<calculate coefficients>}

}

//PROCESS AUDIO FRAME//

bool __stdcall CEnvelopeFollower::processAudioFrame(float* pInputBuffer, float* pOutputBuffer, UINT uNumInputChannels, UINT uNumOutputChannels)

{

smoothParameterValues();

// Do LEFT (MONO) Channel; there is always at least one input, one output

float fGain = pow(10, m_fPreGain_dB/20.0);

float fDetectLeft = m_LeftDetector.detect(fGain*pInputBuffer[0]);

// set mod gain to minimum (un-triggered)

float fModGainLeft = m_fMinGainR;

// threshold triggered - the threshold is in dB values

if (fDetectLeft >= pow(10.0, m_fThreshold / 20.0))

fModGainLeft = calculateGainReduction(fDetectLeft);

m_fGRL = 1.0 - pow(10.0, fModGainLeft / 20.0);

// use the mod gain

calculate_LeftConstantQ(m_fCutoff, m_fQ, fModGainLeft);

// do the BiQuads

pOutputBuffer[0] = m_LeftConstantQ.doBiQuad(pInputBuffer[0]);

// detect the other channel

float fDetectRight = m_RightDetector.detect(fGain*pInputBuffer[1]);

// set mod gain to minimum (un-triggered)

float fModGainRight = m_fMinGainR;

// threshold triggered - the threshold is in dB values

if(fDetectLeft >= pow(10.0, m_fThreshold / 20.0))

fModGainRight = calculateGainReduction(fDetectRight);

m_fGRR = 1.0 - pow(10.0, fModGainRight / 20.0);

// use the mod gain

calculate_RightConstantQ(m_fCutoff, m_fQ, fModGainRight);

// Mono-In, Stereo-Out (AUX Effect)

if(uNumInputChannels == 1 && uNumOutputChannels == 2)

pOutputBuffer[1] = pOutputBuffer [0];

// Stereo-In, Stereo-Out (INSERT Effect)

if(uNumInputChannels == 2 && uNumOutputChannels == 2)

pOutputBuffer[1] = m_RightConstantQ.doBiQuad(pInputBuffer[1]);

}

return true;

}

///////////////////////////////////////////////////////////////////////////

Most Users Ever Online: 36

Currently Online:

4 Guest(s)

Currently Browsing this Page:

1 Guest(s)

Top Posters:

Skyler: 48

Derek: 41

Peter: 41

Frodson: 40

clau_ste: 39

Gwen: 32

EZB: 24

lppier: 23

Msaldaña: 18

Jorge: 17

Member Stats:

Guest Posters: 1

Members: 495

Moderators: 1

Admins: 4

Forum Stats:

Groups: 11

Forums: 31

Topics: 511

Posts: 1966

Newest Members:

CoraDias, Edoardo, knooierd, daniel, Merril Bradshaw, BillPlunkett, Pajczur, michaelwayneharwood, RickM, rainbow windModerators: W Pirkle: 187

Administrators: Tom: 66, JD Young: 80, Will Pirkle: 0, W Pirkle: 187