faustgen — Compiles, Instantiates and runs a compiled Faust program.
Plugin opcode in faustcsound. This opcode is part of the plugin repository and has to be installed separately. The plugin repository can be found here: https://github.com/csound/plugins
Faustgen will invoke the just-in-time compiler, instantiate and run a Faust program.
“Scode” -- a string containing a Faust program.
“ihandle” -- a handle to the Faust DSP instance, which can be used to access its controls with faustctl.
Here is an example of the faustgen opcode. It uses the file faustgen.csd.
Example 291. Example of the faustgen opcode.
See the sections Real-time Audio and Command Line Flags for more information on using command line flags.
<CsoundSynthesizer> <CsOptions> -odac </CsOptions> <CsInstruments> instr 1 ain1 oscili 0dbfs/2, 440 idsp,a1 faustgen {{ gain = hslider("vol",1,0,1,0.01); process = (_ * gain); }}, ain1 k1 line 0, p3, 1 faustctl idsp, "vol", k1 out a1 endin </CsInstruments> <CsScore> i1 0 10 </CsScore> </CsoundSynthesizer>