Shelf-Peak filter

DSP, Plugin and Host development discussion.
Post Reply New Topic
RELATED
PRODUCTS

Post

In some graphic EQ plugins, I have noticed that there is an option to increase the slope of a standard peaking/bell filter beyond a 2-pole filter. FabFilter Pro-Q2 is a good example. When the slope is increased, the result is a quasi-shelf-peak filter thing. Q increases the width of the shelf, and the shelf is a flat response at the set gain level instead of a normal bell shape.

I am curious how this is accomplished. If you just stack filters, this isn't the result. Is this altering of the Q for each 2-pole filter, or is it something like a high and low shelf filter combined?

Post

I'm currently creating a graphic EQ in the style of Q2 and Equilibrium and I did think about the filters you mentioned.

The SVF filters I'm using are composed of a combination of high pass, low pass and band pass. I did wonder if the high and low pass parts of a bell filter could have increased slopes to give the shape you mention. Haven't tried it though.

I've also wondered the same thing about Q2's tilt which looks like some variation of shelf filters.

Post

random_id wrote: Thu Oct 11, 2018 8:28 pm In some graphic EQ plugins, I have noticed that there is an option to increase the slope of a standard peaking/bell filter beyond a 2-pole filter. FabFilter Pro-Q2 is a good example. When the slope is increased, the result is a quasi-shelf-peak filter thing. Q increases the width of the shelf, and the shelf is a flat response at the set gain level instead of a normal bell shape.

I am curious how this is accomplished. If you just stack filters, this isn't the result. Is this altering of the Q for each 2-pole filter, or is it something like a high and low shelf filter combined?
The Art of VA Filter Design 2.0.0 describes a way to do this with an (arbitrarily, limited by the filter order) wide range of slope variation. I developed this technique on my own and I haven't seen it anywhere else, although I must admit my acquaintance with EQ software is quite limited, so possibly it's not truly new. At any rate, the description is there. It's also implemented in the library of Reaktor. If the technique is not used in the full, complicated fashion, it still allowes to do EQs with different narrower slope ranges, according to the filter's order.

Post

Some pics (2-pole to 8-pole slope range, implemented as an 8-pole filter)
Edit: I guess you could also go further into an elliptic range to achieve an even higher slope without increasing the filter order, but that'll be at the cost of some equiripples in the shelving bands.
You do not have the required permissions to view the files attached to this post.

Post

Here's 4th order example (see source link):

Code: Select all

% ----------------------------------------------------------------
% Source:
% http://www.recordingblogs.com/wiki/shelving-filter
% ----------------------------------------------------------------

pkg load signal
% --------------------

%clf;

fs = 44100;
fc = 1000;
wc = 2*pi*fc/fs;
B = 1; 
G = 4; % gain ~12dB

wc2 = wc^2;
wc4 = wc^4;

% H(s)
a0 = 16 + wc4 + 8*wc2 + 8*sqrt(2*G)*B + 2*sqrt(2*G)*B*wc2 + 4*G*B^2;
a1 = -64 + 4*wc4 - 16*sqrt(2*G)*B + 4*sqrt(2*G)*B*wc2;
a2 = 96 + 6*wc4 - 16*wc2 - 8*G*B^2;
a3 = -64 + 4*wc4 + 16*sqrt(2*G)*B - 4*sqrt(2*G)*B*wc2;
a4 = 16 + wc4 + 8*wc2 + 2*sqrt(2*G)*B*(-4-wc2) + 4*G*B^2;
b0 = 16 + wc4 + 8*wc2 + 8*sqrt(2)*B + 2*sqrt(2)*B*wc2 + 4*B^2;
b1 = -64 + 4*wc4 - 16*sqrt(2)*B + 4*sqrt(2)*B*wc2;
b2 = 96 + 6*wc4 - 16*wc2 - 8*B^2;
b3 = -64 + 4*wc4 + 16*sqrt(2)*B - 4*sqrt(2)*B*wc2;
b4 = 16 + wc4 + 8*wc2 + 2*sqrt(2)*B*(-4-wc2) + 4*B^2;

% invert effect: swap a and b 
b = [b0 b1 b2 b3 b4];
a = [a0 a1 a2 a3 a4];

flt = tf(a, b, 1/fs);
flt = flt/dcgain(flt);

% --------------------
% plot 
% --------------------

nf = logspace(0, 5, fs/2);

figure(1);

[mag, pha] = bode(flt,2*pi*nf);
semilogx(nf, 20*log10(abs(mag)), 'color', 'r', 'linewidth', 1);
grid on;
axis([10 fs/2 -15 15]);
hold on;
%semilogx(nf, pha, 'color', 'k');

str = sprintf("Digital IIR band-boost and band-cut shelving filters"); 
title(str);
legend('Mag','location', 'southwest');
xlabel('Hz');ylabel('dB');
results this (B values in range 0.01....2):

Image

Post

Great!
What do you think about setting the bandwidth? I have been using omega/sqrt(q). This kind of feels right when comparing this with other filter types.

Post Reply

Return to “DSP and Plugin Development”