Hi,
We have extended Faust with two new constructions : inputs(expr) and
outputs(expr) that
give respectively the number of inputs and the number of outputs of a Faust
expression
expr. These constructions are useful to define high order functions and build
algorithmically complex block-diagrams.
Here is an example to automatically reverse the order of the outputs of an
expression.
Xo(expr) = expr <: par(i,n,selector(n-i-1,n)) with { n=outputs(expr); };
And the inputs of an expression :
Xi(expr) = bus(n) <: par(i,n,selector(n-i-1,n)) : expr with { n=inputs(expr); };
For example Xi(-) will reverse the order of the two inputs of the substraction.
Cheers
Yann
PS : selector(i,n) is defined in math.lib
------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:
Build for Windows Store.
http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
Faudiostream-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/faudiostream-devel