p4, ... -- instrument parameters (k-rate, or a-rate, which is truncated to a scalar)
err -- error code (0 if successful)
arg1, ... -- opcode arguments
var,... -- opcode outputs
These three versions of perf execute a performance pass of a complete instrument or a single opcode.
Some opcodes and all instruments are required to be initialised first (see init).
Optionally, parameters(pfields) are passed to an instrument perf() and are picked up at perf-time. They are normally
k-sig variables but can also be a-sigs in which case the vector is truncated to the first element.
For the opcode perf(), inputs and outputs are checked and should match the opcode object signature.
The following example shows the perf opcode in the context of
instrument and opcode objects,
<CsoundSynthesizer><CsOptions>-o dac
</CsOptions><CsInstruments>0dbfs=1opcodeOsci(a:k,f:k):axoutoscili(a,f)endopinstrOne// run at i-timemyInstr:InstrDef=create({{ out Osci(p4,p5) }})myInstance:Instr=create(myInstr)err1:i=init(myInstance)// env, glissenv:k=linen(0.5,0.1,p3,0.1)slid:k=expon(440,p3,880)// set p5setp(myInstance,5,slid)// run at perf-time, set p4err2:k=perf(myInstance,env)// run at deinit timedelete(myInstance)delete(myInstr)// schedule instr defschedule(Two,0,2,0.5,1000)endininstrTwoobj:Opcode=create(oscili)sig:a=init(obj,p4,p5)sig:a=perf(obj,p4,p5)out(sig*adsr(0.1,0.1,0.5,0.1))event_i("e",0,3)endinschedule(One,0,1)</CsInstruments><CsScore></CsScore></CsoundSynthesizer>