Background: Often times I am doing some sort of signal processing task that requires a unique filter. Usually at this point I go to MATLAB and generate a new unique filter using $\tt firpm()$. The MATLAB firpm()
function implements that Parks-McClellan algorithm. Now I have a filter and I put the filter into a hardcoded array. But here's the problem I now have a hardcoded filter that only works for one scenario.
The problem: I can now solve my signal processing problem du-jour... but only for a very SPECIFIC single sample rate or SPECIFIC scenario.
The goal: I want to be able to call $\tt firpm()$ from C code or some other language and make my signal processing code more generic. I can't find an open source implementation of firpm()
!
Where can I get an open source implementation of the Parks-McClellan optimal FIR filter design algorithm (aka $\tt firpm()$ in MATLAB)?
P.S. I am aware that I can design filters differently using windowing or something else... feel free to mention those in the comments. But the point of this question is not to ask "what are other filter design techniques?" the point is to find an open source implementation of the VERY VERY useful $\tt firpm()$... or something similar.
P.P.S. One of the goals of this question is to learn how the Parks-McClellan algorithm works by looking at the code first and then I plan on reading some background theory.
type firpm.m
in MATLAB? That will show you MATLAB's implementation of the function. $\endgroup$