compilecsd
Prev | Orchestra Opcodes and Operators | Next

## compilecsd

compilecsd — compiles a new orchestra from an ASCII file

## Description

Compilecsd will read a CSD file and 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. In addition, it will read the score (if it exists) contained in the CSD file and add it to the list of events to be performed by Csound. The opcode ignores any section in the CSD file that is not the orchestra or the score.

## Syntax

    ires compilecsd Sfilename

## Initialization

“Sfilename” -- a string containing the name of the file containing the orchestra.

“ires” -- returns 0 if compilation was successful, or -1 if not.

## Examples

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

Example 136. Example of the compilecsd 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 compilecsd "does_not_exist.csd"
    print ires ; -1 as could not compile
    ires compilecsd "my.csd"
    print ires ; 0 as compiled successfully
    event_i "i", 2, 0, 3, .2, 465 ;send event
    endin

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

## See also

event, event_i, schedule, schedwhen, schedkwhen, schedkwhennamed

## Credits

Author: Victor Lazzarini, 2013

Prev | Up | Next
combinv | Home | compileorc