faustcompile

faustcompile — Invokes the just-in-time compiler to produce a instantiable DSP process from a Faust program.

Description

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

Faustcompile will compile a Faust program from a string, controlled by various arguments. Multi-line strings are accepted, using {{ }} to enclose the string.

Syntax

ihandle faustcompile Scode, Sargs[,iasync, istacksize]  

Initialization

Scode -- a string (in double-quotes or enclosed by {{ }}) containing a Faust program.

Sargs -- a string (in double-quotes or enclosed by {{ }}) containing Faust compiler args.

iasync -- run the code asynchronously, non-blocking, (iasync=1), or blocking mode (iasync=0). Defaults to 1.

istacksize -- size of the compiler thread stack in MB (defaults to 1).

Examples

Here is an example of the faustcompile opcode. It uses the file faustcompile.csd.

Example 289. Example of the faustcompile 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
 a1 rand 0dbfs/4
 a2 oscili 0dbfs/4, 440
 ihandle faustcompile "process=+;", "-vec -lv 1"
 idsp,asig faustaudio ihandle,a1,a2
   out asig
endin
</CsInstruments>
<CsScore>
i1 0 10
</CsScore>
</CsoundSynthesizer>


See also

Faust Opcodes

Credits

Author: Victor Lazzarini, 2013