faustplay

faustplay — Runs an instantiated 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

Faustplay will run a Faust program instantiated with faustdsp.

Syntax

a1[, a2,...] faustplay ihandle[, ain1,...]

Initialization

ihandle -- a handle to the Faust DSP instance from faustdsp.

Performance

ain1,... -- input signals

a1,... -- output signals

Examples

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

Example 294. Example of the faustplay opcode.

See the sections Real-time Audio and Command Line Flags for more information on using command line flags.

<CsoundSynthesizer>
<CsOptions>
-d -odac
</CsOptions>
<CsInstruments>
nchnls= 1

giph faustcompile {{
SR = 44100;
decimal(a) = a - floor(a);
freq = hslider("freq", 0, -20000, 20000, 1);
incr(fr) =  fr / float(SR);
phasor(fr,ph) =  incr(fr) : (+ : decimal) ~ _ :
+(ph) : decimal;
process = phasor(freq,0);
}}, "-vec -lv 1"

instr 1
kb1 = p5
ib faustdsp giph
faustctl ib,"freq",kb1
asig faustplay ib
out sin(2*$M_PI*asig)*p4*0dbfs
endin


</CsInstruments>
<CsScore>
i1 0 1 0.5 150
</CsScore>
</CsoundSynthesizer>


See also

Faust Opcodes

Credits

Author: Victor Lazzarini, 2018