Hi,

I’m new to Juce and trying to create an auto-wah plugin. I can’t get any effect to output audio no matter what I do, there is just some slight noise but no auto-wah. What could be the problem? The filters should be implemented correctly, as the same code creates a wah-effect on matlab.

Here is the processblock:

```
for (int i = totalNumInputChannels; i < totalNumOutputChannels; ++i)
buffer.clear(i, 0, buffer.getNumSamples());
// This is the place where you'd normally do the guts of your plugin's
// audio processing...
for (int channel = 0; channel < 2; ++channel)
{
// Output
float* channelData = buffer.getWritePointer(channel);
// Input
const float* x = buffer.getReadPointer(channel);
// Iterate over the signal
for (int n = 0; n < buffer.getNumSamples(); n++) {
//auto x = channelData;
float y = 0.0;
// Level detector
if (abs(x[n]) > yLn1) {
yLn = a_A * yLn1 + (1 - a_A)*abs(x[n]); // Attack
}
else {
yLn = a_R * yLn1 + (1 - a_R)*abs(x[n]); // Release
}
yLn1 = yLn;
fc = minf + (maxf - minf)*yLn;
// Peak filter parameters
d = -cos(2 * PI*fc / getSampleRate());
H0 = pow(10, (Gain / 20)) - 1;
c = (tan(PI*fb / getSampleRate()) - 1) / (tan(PI*fb / getSampleRate() + 1));
// Peak filter difference equations
xhn = x[n] - d*(1-c) * xhn1 + c * xhn2;
y1 = -c * xhn + d * (1 - c) * xhn1 + xhn2;
y = 0.5 * H0 * (x[n] - y1) + x[n];
xhn2 = xhn1;
xhn1 = xhn;
// channelData: Output channel
channelData[n] = y;
```

}