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 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.
I can now solve my signal processing problem du-jour... but only for a very SPECIFIC single sample rate or SPECIFIC scenario.
I want to be able to call 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 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 firpm()... or something similar.
p.p.s. One of the goals of this question is to learn how the parks-mcclelan algorithm works by looking at the code first and then I plan on reading some background theory.