This question is an exact duplicate of:

I'm trying to implement this filter in title by following the book "Designing Audio Effect Plug-Ins in C++" By Will Pirkle

Problem I'm facing is the magnitude response error when comparing against analog model of the LP filter. Here is a plot showing the difference.

enter image description here

I get these are values for variables (fc=1000, fs=44100):

>> massberg_test

    w0 =  0.14248
    g1 =  0.045305
    gm =  0.70711
    wm =  6283.2
    Om =  0.071359
    Os =  0.10081
    g0 =  1.1008
    a0 =  0.14612
    a1 =  0.055508
    b1 = -0.89919
    a = [ 0.132736  0.050424 ]
    b = [ 1.00000  -0.81684 ]

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: 1. Are the equations found in Pirkle book correct? 2. If 1 is Yes then where to look the issue from?


marked as duplicate by A_A, lennon310, Stanley Pawlukiewicz, Tendero, jojek Sep 3 '18 at 15:25

This question was marked as an exact duplicate of an existing question.


Problem solved.

Looks like calculation of Os ($\omega_s$) was the culprit for this problem. Proper equation is:


instead of:


Not the answer you're looking for? Browse other questions tagged or ask your own question.