https://dsp.stackexchange.com/questions ... e-lpf-to-c
But basically I'm stuck on two points.
The primary one is trying to understand how a simple digital filter can be converted from Faust to C++. Here is the Faust version:
Code: Select all
//----------------------------- tf1, tf2 ---------------------------------
// tfN = N'th-order direct-form digital filter
tf1(b0,b1,a1) = _ <: *(b0), (mem : *(b1)) :> + ~ *(0-a1);
https://faust.grame.fr/doc/manual/index.html
They say they have five operators:
- recursion (~) - Priority 4
parallel (,) - Priority 3
sequential (:) - Priority 2
split (<:) - Priority 1
merge (:>) - Priority 1
Code: Select all
a1 = 0.999; // the pole
process = +~*(a1);They also explain that _ represents an input or output. So for example:
Code: Select all
_ : aFunction(a,b) : _With that information, does that "tf1(b0,b1,a1)" function make any sense to anyone and could anyone rephrase it in C++?
Again we have:
Code: Select all
_ <: *(b0), (mem : *(b1)) :> + ~ *(0-a1)
Code: Select all
Input ---> SPLIT ----> input * b0 --------->MERGE BY ADDING ---> recursively multiply by (0-a1)?
----> input_1 * b1 ------->
Can anyone clarify how this likely works to produce a simple filter and how it could be written in C++?
Thanks a bunch if so. That should get me most of the way to finished...
