Massberg LPF issue

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

Post

Sources:
- https://vicanek.de/articles/BiquadFits.pdf
- https://github.com/larzeitlin/MassbergLPF

I prepared this filter as suggested in above sources using Octave. Got it working otherwise but something was wrong with Q values in range >sqrt(0.5) and ~2.0. Here are few plots showing what happened:

https://i.stack.imgur.com/S7EOf.png
https://i.stack.imgur.com/ng7h0.png
https://i.stack.imgur.com/sfebm.png

Later I found the W. Pirkle book Designing Audio Effect Plug-Ins in C++ implementation and correction documentation for it :

http://www.willpirkle.com/wp-content/up ... ection.jpg

but, somehow it didn't work correctly either. So, went back to

Code: Select all

if Q > sqrt(5)
as like what W.Pirkle suggested in his book and it looks like this works by the plot results:

https://i.stack.imgur.com/dBK64.png

but, is it OK? because of the book correction info states:
There is an error in the calculation of the g1, gz and gp coefficients for the Massberg LPF, second order only. There is also an error in the check for Q, it should reference the square root of 0.5, not 5.0.
Has anyone implemented this filter with success by just following either those two sources I mention or the W. Prikle book or correction code?
Last edited by juha_p on Thu Aug 23, 2018 6:25 am, edited 1 time in total.

Post

You "analog" plot in this picture looks weird. For an analog 2-pole LP, you'd expect the cutoff gain to stay Q at the cutoff, so if you're sweeping just the cutoff the peak should stay the same magnitude, which is not really what's happening here.

Post

mystran wrote:
You "analog" plot in this picture looks weird. For an analog 2-pole LP, you'd expect the cutoff gain to stay Q at the cutoff, so if you're sweeping just the cutoff the peak should stay the same magnitude, which is not really what's happening here.
I have the Q changed as well (500hz/0.4, 1k/0.707, 4k/4, 7k/6 and 12k/12) in that plot (just testing if it is working with various Q values). What ever the Q is set, sweeping fc only does not change the gain.

Post

There were some response issue also with the 1st order LPF (coded by following the W. Pirkle book equations)

Image

I don't have access to the original paper by M. Massberg so, I can't be sure if the equations in my source book is correct (I've read that the "ac" in g1 formula is just a typo and book errata does not mention other errors for this fileter).

Q: Are the equations found in Pirkle book correct?
Last edited by juha_p on Fri Aug 24, 2018 6:36 pm, edited 1 time in total.

Post

Problem with the 1st order LP solved.

Looks like calculation of Omega_s was the culprit for this problem. Proper equation is:

Code: Select all

Os=Om*sqrt((gm^2-g1^2)*(1-gm^2))/(1-gm^2);
instead of:

Code: Select all

Os=Om*(sqrt((gm^2-g1^2)*(1-gm^2))/(1-gm^2));

Post Reply

Return to “DSP and Plugin Development”