## Partial Fraction Decomposition (PFD) of an all-pole filter

May 21 2019 | 1:38 pm
Hello everyone, I need to create a complex all-pole filter with the coefficients I got from an LPC signal analysis. In Max, it doesn't seem possible to create this all-pole filter if the number of poles is greater than two. I tested the filtergraph~ object which returns the suitable frequency response for an even number of poles (until 24). But to implement it as an MSP filter, the only solution would consist in decomposing the all-pole coefficients into a set of bi-poles, i.e. a set of parallelized or cascaded biquad cells with 1. 0. 0. in the numerator. This process is mathematically known as a partial fraction decomposition, and I wonder if some javascript code or MAX object already exist to perform it. Thank you in advance. Jojo

• May 22 2019 | 7:18 am
Hey, can't help with the decomposition thing, but I was playing with LPC a few years ago and made myself an allpole filter object for max. Nothing fancy, a straight forward allpole filter that takes its coefficients as a list. If you are on osx and want to check it out, look here: https://vboehm.net/downloads
• May 22 2019 | 2:51 pm
Thank you Volker, I tested your LPC external that works great. Basically I get the LPC coefficients with the gbr.lpc~ object developped by Ircam. I also tested this nice toolkit written by Mark Cartwright : http://www.markcartwright.com/research/lpc-toolkit
I'm looking for PF decomposition process for 2 reasons : - First, I thought to implement the all-pole filter with the standard cascade~ object, which is equivalent to a series of biquad~ objects. But clearly, a C external as you wrote it does the job very efficiently. - Second, I wanted to plot the zeros/poles of the all-pole filter in a standard zplane~ object, in order to compare the associated formantic envelope with this of a slightly different sound (which will be used for LPC cross-synthesis ). But it seems that zplane~ only accepts coefs in the biquad~ format (until 24)...
Thus, I don't know if it's possible with Max to plot a zero/pole graph from a list of LPC coefficients corresponding to an all-pole filter of more than two poles.... Jojo
• May 23 2019 | 12:37 pm
Hi again, I looked at some PFD procedures with Matlab software and I found the function tf2sos which exactly corresponds to what I want to achieve :) So my question now is : Does it exist a Max external which ensures the tf2sos functionnality ? Jojo
• Aug 16 2019 | 12:26 pm
Hi, anyone have any resources on how to generate coeffs for vb.allpole~?
• Aug 17 2019 | 10:57 am
hi, typically you run some kind of analysis on a snippet of audio to obtain the filter coeffs, e.g. LPC. Maaaany years ago I wrote some java classes to use in an mxj object, by hacking the relevant sources of praat. That's also where the coeffs in the help patch come from. Here you can find a simple example (suited for voice analysis/resynthesis): https://vboehm.net/maxobjects/lpc-burg.zip
• Aug 18 2019 | 8:20 am
This is fantastic, thank you