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, 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

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)