Two question about RBJ Peak filter I'm new into DSP and Filters in general. Its the first step ahead I do from learning and using a 1-pole IIR basic Low Pass Filter.

I'm about to implement for my VST audio application (using C++ and IPlug Framework) a RBJ's Peak filter.

By steps (from that document), the formula that I'll use within my Process() function will be y[n], thus (as code):

inline double Process(double input) {
    mBuffer += (b0/a0)*x[n] + (b1/a0)*x[n-1] + (b2/a0)*x[n-2] - (a1/a0)*y[n-1] - (a2/a0)*y[n-2];
    return mBuffer;
}


Since I'll use peakingEQ, I need to calculate these coefficients:

b0 =   1 + alpha*A
b1 =  -2*cos(w0)
b2 =   1 - alpha*A
a0 =   1 + alpha/A
a1 =  -2*cos(w0)
a2 =   1 - alpha/A


which all depends by user defined parameters and intermediate variables.

My questions are:


What's the difference between using Q (thus sin(w0)/(2*Q)) or BW  (thus sin(w0)*sinh( ln(2)/2 * BW * w0/sin(w0))) on calculating alpha? Isn't Bandwidth = Q when reasoing as Peak filter?
What's the meaning of H(s) function (which is (s^2 + s*(A/Q) + 1) / (s^2 + s/(A*Q) + 1) for the peaking filter)? I don't see where to "insert" it in the formulas.


I hope you can help me to undestand these two dubts.
Maybe this thread helps you in this Q - Prewarping both resonant frequency $f_0$ and bandwidth (or $Q$) when using bilinear transform
H(s) is the s-plane transfer function

Analog prototype of RBJ peak filter (Octave):



K  = 10^(gain/40);
w0 = 2*pi*fc;
% H(s) = (s^2 + (K w0/Q)*s + w0^2) / (s^2 + w0 s/(K*Q) + w0^2)
BC = [1 K*w0/Q w0^2];
AC = [1 w0/(K*Q) w0^2];