TclCsound Command Reference
Prev | TclCsound | Next

## TclCsound Command Reference

Performance control commands:

csCompile [csound command-line] : compiles an orc/sco/csd + any options

csCompileList arglist : compiles an orc/sco/csd + options given as a Tcl list 'arglist'

csPerform : plays the score, returning when finished

csPerformKsmps : performs one ksmps block of audio samples, returning when finished

csPerformBuffer : performs one buffersize block of audio samples, returning when finished

csPlay : starts asynchronous performance in a separate thread, returning immediately

csPause : pauses playback

csStop : stops performance and resets csound

csRewind : rewinds the score

csOffset secs : offsets score playback by secs

csGetoffset : returns the score offset in secs

csGetScoreTime : returns the score time in secs

Event commands:

csNote [p-fields] : sends in a i-statement event

csTable [p-fields] : sends in a f-statement event

csEvent opcode [p-fields] : sends in a score event defined by 'opcode' plus p-fields

csNoteList arglist : sends in a i-statement event with p-fields as a Tcl list 'arglist'

csTableList arglist : sends in a f-statement event with p-fields as a Tcl list 'arglist'

csEventList arglist : sends in a score event defined by 'opcode' plus p-fields as a Tcl list 'arglist'

Invalue, outvalue, pvsin, pvsout control and string channel commands:

csInChannel name : registers a csound invalue channel

csOutChannel name : registers a csound outvalue channel and creates tcl global variable 'name'

csInValue channel value : sets the value of a csound invalue channel

csOutValue channel : returns the value of a csound outvalue channel

csPvsIn number [size olaps wsize wtype]: registers a pvs in bus channel, optionally initialising fsig values for fftsize to 'size' (default:1024), overlaps to 'olaps' (def.: size/4), window size to 'wsize' (def.: size) and window type to 'wtype' (def.: 1, Hanning window, see manual page for pvsanal). Works with pvsin opcode (PVS_AMP_FREQ format only).

csPvsOut number [size olaps wsize wtype]: registers a pvs out bus channel. Works with opcode pvsout (PVS_AMP_FREQ format only).

csPvsInSet channel bin amp freq: sets the amp and freq of a bin of the pvs in channel number.

csPvsOutGet channel bin [isFreq]: returns the amp or freq of a bin of the pvs out channel number. The optional argument 'isFreq' (default: 0) controls whether the returned value is the bin amp (0) or freq (1).

csSetControlChannel channel value : sets the value of control channel 'channel', creating it if it does not exist

csGetControlChannel channel : returns the value of control channel 'channel'; creates the channel it if it does not exist

csSetStringChannel channel string : sets the string channel 'channel', creating it if it does not exist

csGetStringChannel channel : returns the string in channel 'channel'; creates the channel it if it does not exist

Message commands:

csMessageOutput var: appends all csound messages to the tcl variable var.

Table commands:

csGetTableSize ftn : returns the size of function table ftn (-1 if non-existent)

csSetTable ftn index value : sets the value of position 'index' to 'value' in function table 'ftn'

csGetTable ftn index : returns the value of position 'index' in function table 'ftn'

Environment variable commands:

csOpcodedir opcodedir : sets the opcode directory

csSetenv envvar value : sets any environment variable (eg. SFDIR, SADIR)

Prev | Up | Next
TclCsound as a language wrapper | Home | Building Csound