Biquad Bandpass filter with very steep filter curve

I need a bandpass filter which can realize very steep slopes e.g. to filter a sinsusoidal like tone out of white noise. It should allow for realtime shifting of center frequency. For years I work with max´s (cycling74) biquad bandpass filter using high Quality factors > 1000. Now I want to implement a plugin with Juce but cannot figure out how to achieve a similar functionality. As a newbie in C++ and Juce I am working through the tutorials e.g. https://jucestepbystep.wordpress.com/. After Step 2d there is a simple implementation of juce::dsp::StateVariableTPTFilter. The conversion between quality factor and bandwidth per octave I calculated with http://www.sengpielaudio.com/calculator-bandwidth.htm
But my attempts to set the resonance to an appropriate value did not yield the disired result. The StateVariableTPTFilter seems not to allow for such steep slopes. Can anybody link me to a code snippet or tutorial which explains how to implement what I need?

1 Like

Now I got an answer thanks to matthijs on Discord:
create an instance juce::dsp::IIR::Filter filter. In your prepareToPlay do:
juce::dsp::ProcessSpec spec;
spec.sampleRate = sampleRate;
spec.maximumBlockSize = samplesPerBlock;
spec.numChannels = 1;

filter.prepare(spec);

Then to use the filter:
filter.reset();
filter.coefficients = juce::dsp::IIR::Coefficients::makeBandPass(sampleRate, freq, Q);

And in your processBlock, do:
x = filter.processSample(x);
for every sample.

add the juce_dsp module to your project btw (in Projucer).