compileorc — compiles a new orchestra from an ASCII file
Compileorc will compile one or more instruments at init time, which will be added to the running engine. In case of existing instrument numbers or names, these will be replaced, but any instance still running of the old instrument definition will still perform until it terminates.
“Sfilename” -- a string containing the name of the file containing the orchestra.
“ires” -- returns 0 if compilation was successful, or -1 if not.
Here is an example of the compileorc opcode. It uses the file compileorc.csd.
Example 131. Example of the compileorc opcode.
See the sections Real-time Audio and Command Line Flags for more information on using command line flags.
<CsoundSynthesizer> <CsOptions> -o dac -d </CsOptions> <CsInstruments> sr = 44100 nchnls = 1 ksmps = 32 0dbfs = 1 instr 1 ires compileorc "does_not_exist.orc" print ires ; -1 as could not compile ires compileorc "my.orc" print ires ; 0 as compiled successfully event_i "i", 2, 0, 3, .2, 465 ;send event endin </CsInstruments> <CsScore> i1 0 1 </CsScore> </CsoundSynthesizer>