<?xml version="1.0" encoding="UTF-8" standalone="no"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>TclCsound Command Reference</title> <link rel="stylesheet" type="text/css" href="csound.css" /> <meta name="generator" content="DocBook XSL Stylesheets V1.76.1" /> <link rel="home" href="index.html" title="The Canonical Csound Reference Manual" /> <link rel="up" href="tclcsound.html" title="TclCsound" /> <link rel="prev" href="tclwrapper.html" title="TclCsound as a language wrapper" /> <link rel="next" href="BuildingCsound.html" title="Building Csound" /> </head> <body> <div class="navheader"> <table width="100%" summary="Navigation header"> <tr> <th colspan="3" align="center"> TclCsound Command Reference</th> </tr> <tr> <td width="20%" align="left"><a accesskey="p" href="tclwrapper.html">Prev</a> </td> <th width="60%" align="center">TclCsound</th> <td width="20%" align="right"> <a accesskey="n" href="BuildingCsound.html">Next</a></td> </tr> </table> <hr /> </div> <div class="section" title="TclCsound Command Reference"> <div class="titlepage"> <div> <div> <h2 class="title" style="clear: both"><a id="tclrefe"></a> TclCsound Command Reference</h2> </div> </div> </div> <p> Performance control commands: </p> <p> <span class="command"><strong> csCompile [csound command-line] : </strong></span> compiles an orc/sco/csd + any options </p> <p> <span class="command"><strong> csCompileList arglist : </strong></span> compiles an orc/sco/csd + options given as a Tcl list 'arglist' </p> <p> <span class="command"><strong> csPerform : </strong></span> plays the score, returning when finished </p> <p> <span class="command"><strong> csPerformKsmps : </strong></span> performs one ksmps block of audio samples, returning when finished </p> <p> <span class="command"><strong> csPerformBuffer : </strong></span> performs one buffersize block of audio samples, returning when finished </p> <p> <span class="command"><strong> csPlay : </strong></span> starts asynchronous performance in a separate thread, returning immediately </p> <p> <span class="command"><strong> csPause : </strong></span> pauses playback </p> <p> <span class="command"><strong> csStop : </strong></span> stops performance and resets csound </p> <p> <span class="command"><strong> csRewind : </strong></span> rewinds the score </p> <p> <span class="command"><strong> csOffset secs : </strong></span> offsets score playback by secs </p> <p> <span class="command"><strong> csGetoffset : </strong></span> returns the score offset in secs </p> <p> <span class="command"><strong> csGetScoreTime : </strong></span> returns the score time in secs </p> <p>Event commands:</p> <p> <span class="command"><strong> csNote [p-fields] : </strong></span> sends in a i-statement event </p> <p> <span class="command"><strong> csTable [p-fields] : </strong></span> sends in a f-statement event </p> <p> <span class="command"><strong> csEvent opcode [p-fields] : </strong></span> sends in a score event defined by 'opcode' plus p-fields </p> <p> <span class="command"><strong> csNoteList arglist : </strong></span> sends in a i-statement event with p-fields as a Tcl list 'arglist' </p> <p> <span class="command"><strong> csTableList arglist : </strong></span> sends in a f-statement event with p-fields as a Tcl list 'arglist' </p> <p> <span class="command"><strong> csEventList arglist : </strong></span> sends in a score event defined by 'opcode' plus p-fields as a Tcl list 'arglist' </p> <p>Invalue, outvalue, pvsin, pvsout control and string channel commands:</p> <p> <span class="command"><strong> csInChannel name : </strong></span> registers a csound invalue channel </p> <p> <span class="command"><strong> csOutChannel name : </strong></span> registers a csound outvalue channel and creates tcl global variable 'name' </p> <p> <span class="command"><strong> csInValue channel value : </strong></span> sets the value of a csound invalue channel </p> <p> <span class="command"><strong> csOutValue channel : </strong></span> returns the value of a csound outvalue channel </p> <p> <span class="command"><strong> csPvsIn number [size olaps wsize wtype]: </strong></span> 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). </p> <p> <span class="command"><strong> csPvsOut number [size olaps wsize wtype]: </strong></span> registers a pvs out bus channel. Works with opcode pvsout (PVS_AMP_FREQ format only). </p> <p> <span class="command"><strong> csPvsInSet channel bin amp freq: </strong></span> sets the amp and freq of a bin of the pvs in channel number. </p> <p> <span class="command"><strong> csPvsOutGet channel bin [isFreq]: </strong></span> 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). </p> <p> <span class="command"><strong> csSetControlChannel channel value : </strong></span> sets the value of control channel 'channel', creating it if it does not exist </p> <p> <span class="command"><strong> csGetControlChannel channel : </strong></span> returns the value of control channel 'channel'; creates the channel it if it does not exist </p> <p> <span class="command"><strong> csSetStringChannel channel string : </strong></span> sets the string channel 'channel', creating it if it does not exist </p> <p> <span class="command"><strong> csGetStringChannel channel : </strong></span> returns the string in channel 'channel'; creates the channel it if it does not exist </p> <p> Message commands: </p> <p> <span class="command"><strong>csMessageOutput var: </strong></span>appends all csound messages to the tcl variable var. </p> <p>Table commands:</p> <p> <span class="command"><strong> csGetTableSize ftn : </strong></span> returns the size of function table ftn (-1 if non-existent) </p> <p> <span class="command"><strong> csSetTable ftn index value : </strong></span> sets the value of position 'index' to 'value' in function table 'ftn' </p> <p> <span class="command"><strong> csGetTable ftn index : </strong></span> returns the value of position 'index' in function table 'ftn' </p> <p>Environment variable commands: </p> <p> <span class="command"><strong> csOpcodedir opcodedir : </strong></span> sets the opcode directory </p> <p> <span class="command"><strong> csSetenv envvar value : </strong></span> sets any environment variable (eg. SFDIR, SADIR) </p> </div> <div class="navfooter"> <hr /> <table width="100%" summary="Navigation footer"> <tr> <td width="40%" align="left"><a accesskey="p" href="tclwrapper.html">Prev</a> </td> <td width="20%" align="center"> <a accesskey="u" href="tclcsound.html">Up</a> </td> <td width="40%" align="right"> <a accesskey="n" href="BuildingCsound.html">Next</a></td> </tr> <tr> <td width="40%" align="left" valign="top"> TclCsound as a language wrapper </td> <td width="20%" align="center"> <a accesskey="h" href="index.html">Home</a> </td> <td width="40%" align="right" valign="top"> Building Csound</td> </tr> </table> </div> </body> </html>