Attempting to Visualize a Nested Comb Filter using dict.pack and filterdetail. I'm stuck / in over my head, help!
Greetings!
tl;dr I am struggling with properly organizing my filter controls into dict.pack to properly display the frequency response of the nested comb filter that I made within gen~.
A few months ago, I found a paper about nested comb filters as a way to make an inharmonic comb, and after weeks of reading about the math of DSP for a conceptual understanding of it I am finally at a point where I wanted to try playing with them in Max. Making the comb filter itself was very easy. However, I hit a snag with visualizing the comb filter I made in gen~. I have been able to figure out that you need to create a dictionary in order to feed the filter coefficients into filterdetail so that way it may be graphed using plot~. The part where I am stuck is collecting the numbers and properly inserting them into dict.pack. My patch in progress is at the bottom of the post.
The specific part where I am stuck is how to organize the gen~ parameters. I read about the dict.pack and filterdetail help files and more or less re-made what is shown in them for the specific comb filter example. The issue is, since my comb filter is a *nested* comb filter, there are two delay elements. It seems like the delay length in samples is indicated by the number of float values gathered in the zl group object. That makes sense as the number of floats would indicate the filter order. However, how am I supposed to organize this for two delay elements? Would I have have to write down the impulse response for the nested comb in terms of its b and a coefficients to figure it out (I REALLY hope not- while I can kinda of understand the math, I can't well do the algebra rearrangements myself)? Are there some other tutorials, help files, or similar that would help me figure out how to organize the numbers for dict.pack in this sort of way? I intend to start making more complex comb filters and visualizing them is really important to me (visual learner). It clearly can be done because these graphs are shown in the paper I found.
Also, full disclosure, this is the second max patch I have ever made. I've been watching tutorials for months though. After working on this tonight for like... 5 hours... it's pretty clear I am hitting the ground running while wearing 12 inch platform stilettos and would probably do better doing something a touch easier and less brain melty. Alas, what I want to do with max seems to necessarily be quite complex.
My patch is below. Please note it's set up for picking up audio from maxforlive. ANY sort of help, advice, resourced, direction, etc would be MUCH appreciated! Thank you!!