[LAD] Prototyping algorithms and ideas

Stéphane Letz letz at grame.fr
Wed Jan 30 06:20:36 UTC 2008


Le 29 janv. 08 à 23:36, Yann Orlarey a écrit :

> Hi Fons,
>
> Here is a quick solution using Faust :
>
>     import("filter.lib");
>
>     line(i) =  vgroup("line %i", *(g) : fdelay2(1024, d))
>         with { g = vslider("gain (dB)", -60, -60, 4, 0.1) :  
> db2linear :
> smooth(0.995);
>                d = nentry("delay (samp)", 0, 0, 1000, 0.1) :
> smooth(0.995);  };
>
>     process = hgroup("", par(i, 10, line(i)) );
>
> The first line imports a library of filters (written in Faust by  
> Julius
> Smith) that includes several fractional delays based on Lagrange
> interpolation.
>
> Then we define a 'line' that combines in sequence (':' operator) a  
> gain
> and a fractional delay encapsulated in a vertical layout. Here we use
> fdelay2 a fractional delay with a second order Lagrange interpolation.
> It can be replaced by fdelay3 or fdelay4 if better interpolations are
> needed.
>
> The gain value g is defined by a vertical slider (in dB) which is
> converted in a linear value and then filtered to avoid clicks during
> rapid movements. The delay value d is defined by a numerical entry box
> also filtered to avoid clicks. The parameter m is the maximum size of
> the delay and should be a power of 2.
>
> The last line defines process, the equivalent of main in C, as a
> parallel composition of 10 lines.
>
> A fully functional jack application can be easily generated using the
> faust2jack command or by pasting the above code in the online faust
> compiler (http://faust.grame.fr). The performances on my Vaio laptop
> (Intel Core 2 CPU  T7400  @ 2.16GHz) is approximately of 2%.
>
> Cheers
>
> Yann
>

And for the "dynamic" part of the process like having an  
environnement that would allow to directly define, compile on the fly  
and execute Faust plug-ins, we are investigating using LLVM. See  
http://www.grame.fr/~letz/faust_llvm.html, although to be honest, the  
"hard part" has not yet really started...

Stephane


More information about the Linux-audio-dev mailing list