rsc3/doc/rsc3-docs/rsc3__server_commands.html

321 lines
88 KiB
HTML
Raw Permalink Normal View History

2022-08-24 13:53:18 +00:00
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2022-08-28 10:27:01 +00:00
<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"/><meta name="viewport" content="width=device-width, initial-scale=0.8"/><title>1&nbsp;rsc3: server commands</title><link rel="stylesheet" type="text/css" href="scribble.css" title="default"/><link rel="stylesheet" type="text/css" href="racket.css" title="default"/><link rel="stylesheet" type="text/css" href="manual-style.css" title="default"/><link rel="stylesheet" type="text/css" href="manual-racket.css" title="default"/><script type="text/javascript" src="scribble-common.js"></script><script type="text/javascript" src="manual-racket.js"></script><!--[if IE 6]><style type="text/css">.SIEHidden { overflow: hidden; }</style><![endif]--></head><body id="scribble-racket-lang-org"><div class="tocset"><div class="tocview"><div class="tocviewlist tocviewlisttopspace"><div class="tocviewtitle"><table cellspacing="0" cellpadding="0"><tr><td style="width: 1em;"><a href="javascript:void(0);" title="Expand/Collapse" class="tocviewtoggle" onclick="TocviewToggle(this,&quot;tocview_0&quot;);">&#9660;</a></td><td></td><td><a href="index.html" class="tocviewlink" data-pltdoc="x">rsc3:<span class="mywbr"> &nbsp;</span> racket/<span class="mywbr"> &nbsp;</span>scheme/<span class="mywbr"> &nbsp;</span>supercollider</a></td></tr></table></div><div class="tocviewsublisttop" style="display: block;" id="tocview_0"><table cellspacing="0" cellpadding="0"><tr><td align="right">1&nbsp;</td><td><a href="rsc3__server_commands.html" class="tocviewselflink" data-pltdoc="x">rsc3:<span class="mywbr"> &nbsp;</span> server commands</a></td></tr><tr><td align="right">2&nbsp;</td><td><a href="rsc3__ugens.html" class="tocviewlink" data-pltdoc="x">rsc3:<span class="mywbr"> &nbsp;</span> ugens</a></td></tr><tr><td align="right">3&nbsp;</td><td><a href="rsc3__tutorials.html" class="tocviewlink" data-pltdoc="x">rsc3:<span class="mywbr"> &nbsp;</span> tutorials</a></td></tr><tr><td align="right"></td><td><a href="doc-index.html" class="tocviewlink" data-pltdoc="x">Index</a></td></tr></table></div></div><div class="tocviewlist"><table cellspacing="0" cellpadding="0"><tr><td style="width: 1em;"><a href="javascript:void(0);" title="Expand/Collapse" class="tocviewtoggle" onclick="TocviewToggle(this,&quot;tocview_1&quot;);">&#9658;</a></td><td>1&nbsp;</td><td><a href="rsc3__server_commands.html" class="tocviewselflink" data-pltdoc="x">rsc3:<span class="mywbr"> &nbsp;</span> server commands</a></td></tr></table><div class="tocviewsublistbottom" style="display: none;" id="tocview_1"><table cellspacing="0" cellpadding="0"><tr><td align="right">1.1&nbsp;</td><td><a href="rsc3__server_commands.html#%28part.__g_deep.Free__.Free_all_synths_in_this_group_and_all_its_sub-groups_%29" class="tocviewlink" data-pltdoc="x">/<span class="mywbr"> &nbsp;</span>g_<span class="mywbr"> &nbsp;</span>deep<span class="mywbr"> &nbsp;</span>Free Free all synths in this group and all its sub-<wbr></wbr>groups.</a></td></tr><tr><td align="right">1.2&nbsp;</td><td><a href="rsc3__server_commands.html#%28part.__c_setn___________________________________.Set_ranges_of_bus_value_s_%29" class="tocviewlink" data-pltdoc="x">/<span class="mywbr"> &nbsp;</span>c_<span class="mywbr"> &nbsp;</span>setn Set ranges of bus value(s)</a></td></tr><tr><td align="right">1.3&nbsp;</td><td><a href="rsc3__server_commands.html#%28part.__sync______________________.Notify_when_async_commands_have_completed_%29" class="tocviewlink" data-pltdoc="x">/<span class="mywbr"> &nbsp;</span>sync Notify when async commands have completed.</a></td></tr><tr><td align="right">1.4&nbsp;</td><td><a href="rsc3__server_commands.html#%28part.__s_getn__________________________.Get_ranges_of_control_value_s_%29" class="tocviewlink" data-pltdoc="x">/<span class="mywbr"> &nbsp;</span>s_<span class="mywbr"> &nbsp;</span>getn Get ranges of control value(s)</a></td></tr><tr><td align="right">1.5&nbsp;</td><td><a href="rsc3__server_commands.html#%28part.__s_get__________.Get_control_value
2022-08-24 13:53:18 +00:00
int - group ID
] * N</p><p>Traverses all groups below this group and frees all the
synths. Sub-groups are not freed. A list of groups may be specified.</p><h4>1.2<tt>&nbsp;</tt><a name="(part.__c_setn___________________________________.Set_ranges_of_bus_value_s_)"></a>/c_setn Set ranges of bus value(s)</h4><p>[
int - starting bus index
int - number of sequential buses to change (M)
[
float - a control value
] * M
] * N</p><p>Set contiguous ranges of buses to sets of values. For each range, the
starting bus index is given followed by the number of channels to
change, followed by the values.</p><h4>1.3<tt>&nbsp;</tt><a name="(part.__sync______________________.Notify_when_async_commands_have_completed_)"></a>/sync Notify when async commands have completed.</h4><p>int - a unique number identifying this command.</p><p>Replies with a /synced message when all asynchronous commands
received before this one have completed. The reply will contain the
sent unique ID.</p><p>Asynchronous. Replies to sender with /synced, ID when complete.</p><h4>1.4<tt>&nbsp;</tt><a name="(part.__s_getn__________________________.Get_ranges_of_control_value_s_)"></a>/s_getn Get ranges of control value(s)</h4><p>int - synth ID
[
int|string - a control index or name
int - number of sequential controls to get (M)
] * N</p><p>Get contiguous ranges of controls. Replies to sender with the
corresponding /n_setn command.</p><h4>1.5<tt>&nbsp;</tt><a name="(part.__s_get__________.Get_control_value_s_)"></a>/s_get Get control value(s)</h4><p>int - synth ID
[
int or string - a control index or name
] * N</p><p>Replies to sender with the corresponding /n_set command.</p><h4>1.6<tt>&nbsp;</tt><a name="(part.__n_mapn_______________________.Map_a_node_s_controls_to_read_from_buses)"></a>/n_mapn Map a node&rsquo;s controls to read from buses</h4><p>int - node ID
[
int or string - a control index or name
int - control bus index
int - number of controls to map
] * N</p><p>Takes a list of triplets of control names or indices, bus indices, and
number of controls to map and causes those controls to be mapped
sequentially to buses. If the node is a group, then it maps the
controls of every node in the group. If the control bus index is -1
then any current mapping is undone and control reverts to normal.</p><p>See also: /n_map</p><h4>1.7<tt>&nbsp;</tt><a name="(part.__b_gen______________________________.Call_a_command_to_fill_a_buffer)"></a>/b_gen Call a command to fill a buffer</h4><p>int - buffer number
string - command name
.. command arguments</p><p>Plug-ins can define commands that operate on buffers. The arguments
after the command name are defined by the command. The currently
defined buffer fill commands are listed below in a separate section.</p><p>Buffer Fill Commands</p><p>These are the currently defined fill routines for use with the
/b_gen command.</p><p>Common flags are defined as follows:</p><p>1 - normalize Normalize peak amplitude of wave to 1.0.
2 - wavetable If set, then the buffer is written in wavetable
format so that it can be read by interpolating
oscillators.
4 - clear If set then the buffer is cleared before new partials
are written into it. Otherwise the new partials are
summed with the existing contents of the buffer.</p><p>sine1
int - flags, see above
[
float - partial amplitude
] * N</p><p>Fills a buffer with a series of sine wave partials. The first float
value specifies the amplitude of the first partial, the second float
value specifies the amplitude of the second partial, and so on.</p><p>sine2
int - flags, see above
[
float - partial frequency (in cycles per buffer)
float - partial amplitude
] * N</p><p>Similar to sine1 except that each partial frequency is specified
explicitly instead of being an integer series of
partials. Non-integer partial frequencies are possible.</p><p>sine3
int - flags, see above
[
float - partial frequency (in cycles per buffer)
float - partial amplitude
float - partial phase
] * N</p><p>Similar to sine2 except that each partial may have a nonzero
starting phase.</p><p>cheby
int - flags, see above
[
float - amplitude
] * N</p><p>Fills a buffer with a series of chebyshev polynomials, which can be
defined as: cheby(n) = amplitude * cos(n * acos(x)). The first
float value specifies the amplitude for n = 1, the second float
value specifies the amplitude for n = 2, and so on. To eliminate a
DC offset when used as a waveshaper, the wavetable is offset so that
the center value is zero.</p><p>copy
int - sample position in destination
int - source buffer number
int - sample position in source
int - number of samples to copy</p><p>Copy samples from the source buffer to the destination buffer
specified in the b_gen command. If the number of samples to copy is
negative, the maximum number of samples possible is copied.
Asynchronous. Replies to sender with /done when complete.</p><h4>1.8<tt>&nbsp;</tt><a name="(part.__n_trace_______________________________________________.Trace_a_node)"></a>/n_trace Trace a node</h4><p>[
int - node ID
] * N</p><p>Causes a synth to print out the values of the inputs and outputs of
its unit generators for one control period. Causes a group to print
the node IDs and names of each node in the group for one control
period.</p><h4>1.9<tt>&nbsp;</tt><a name="(part.__b_alloc________________________________.Allocate_buffer_space_)"></a>/b_alloc Allocate buffer space.</h4><p>int - buffer number
int - number of frames
int - number of channels (optional. default = 1 channel)
bytes - an OSC message to execute upon completion. (optional)</p><p>Allocates zero filled buffer to number of channels and samples.</p><p>Asynchronous. Replies to sender with /done when complete.</p><h4>1.10<tt>&nbsp;</tt><a name="(part.__n_query________________________________________.Get_info_about_a_node)"></a>/n_query Get info about a node</h4><p>[
int - node ID
] * N</p><p>The server sends an /n_info message for each node to registered
clients.</p><p>See Node Notifications below for the format of the /n_info message.</p><h4>1.11<tt>&nbsp;</tt><a name="(part.__d_load______________________________________.Load_synth_definition)"></a>/d_load Load synth definition</h4><p>string - pathname of file. Can be a pattern like "synthdefs/perc-*"
bytes - an OSC message to execute upon completion. (optional)</p><p>Loads a file of synth definitions. Resident definitions with the same
names are overwritten.</p><p>Asynchronous. Replies to sender with /done when complete.</p><h4>1.12<tt>&nbsp;</tt><a name="(part.__n_fill____________________.Fill_ranges_of_a_node_s_control_value_s_)"></a>/n_fill Fill ranges of a node&rsquo;s control value(s)</h4><p>int - node ID
[
int or string - a control index or name
int - number of values to fill (M)
float - value
] * N</p><p>Set contiguous ranges of control indices to single values. For each
range, the starting control index is given followed by the number of
controls to change, followed by the value to fill. If the node is a
group, then it sets the controls of every node in the group.</p><h4>1.13<tt>&nbsp;</tt><a name="(part.__n_before_________.Place_a_node_before_another)"></a>/n_before Place a node before another</h4><p>[
int - the ID of the node to place (A)
int - the ID of the node before which the above is placed (B)
] * N</p><p>Places node A in the same group as node B, to execute immediately
before node B.</p><h4>1.14<tt>&nbsp;</tt><a name="(part.__b_close)"></a>/b_close</h4><p>int - buffer number</p><p>After using a buffer with DiskOut, close the soundfile and write
header information.</p><h4>1.15<tt>&nbsp;</tt><a name="(part._see_s-new)"></a>see s-new</h4><h4>1.16<tt>&nbsp;</tt><a name="(part.__s_new____________________________________________.Create_a_new_synth)"></a>/s_new Create a new synth</h4><p>string - synth definition name
int - synth ID
int - add action (0,1,2, 3 or 4 see below)
int - add target ID
[
int or string - a control index or name
float - a control value
] * N</p><p>Create a new synth from a synth definition, give it an ID, and add it
to the tree of nodes. There are four ways to add the node to the tree
as determined by the add action argument which is defined as follows:</p><p>0 - add the new node to the the head of the group specified by the
add target ID.</p><p>1 - add the new node to the the tail of the group specified by
the add target ID.</p><p>2 - add the new node just before the node specified by the add
target ID.</p><p>3 - add the new node just after the node specified by the add target
ID.</p><p>4 - the new node replaces the node specified by the add target
ID. The target node is freed.</p><p>Controls may be set when creating the synth. The control arguments are
the same as for the n_set command.</p><p>If you send /s_new with a synth ID of -1, then the server will
generate an ID for you. The server reserves all negative IDs. Since
you don&rsquo;t know what the ID is, you cannot talk to this node directly
later. So this is useful for nodes that are of finite duration and
that get the control information they need from arguments and buses or
messages directed to their group. In addition no notifications are
sent when there are changes of state for this node, such as /go, /end,
/on, /off.</p><p>If you use a node ID of -1 for any other command, such as /n_map, then
it refers to the most recently created node by /s_new (auto generated
ID or not). This is how you can map the controls of a node with an
auto generated ID. In a multi-client situation, the only way you can
be sure what node -1 refers to is to put the messages in a bundle.</p><h4>1.17<tt>&nbsp;</tt><a name="(part.__b_setn_______________________________.Set_ranges_of_sample_value_s_)"></a>/b_setn Set ranges of sample value(s)</h4><p>int - buffer number
[
int - sample starting index
int - number of sequential samples to change (M)
[
float - a sample value
] * M
] * N</p><p>Set contiguous ranges of sample indices to sets of values. For each
range, the starting sample index is given followed by the number of
samples to change, followed by the values.</p><h4>1.18<tt>&nbsp;</tt><a name="(part.__c_set_______________________________________________.Set_bus_value_s_)"></a>/c_set Set bus value(s)</h4><p>[
int - a bus index
float - a control value
] * N</p><p>Takes a list of pairs of bus indices and values and sets the buses to
those values.</p><h4>1.19<tt>&nbsp;</tt><a name="(part.__n_free__________________________________________.Delete_a_node_)"></a>/n_free Delete a node.</h4><p>[
int - node ID
] * N</p><p>Stops a node abruptly, removes it from its group, and frees its
memory. A list of node IDs may be specified. Using this method can
cause a click if the node is not silent at the time it is freed.</p><h4>1.20<tt>&nbsp;</tt><a name="(part._see_n-set)"></a>see n-set</h4><h4>1.21<tt>&nbsp;</tt><a name="(part.__n_run__________________________________________.Turn_node_on_or_off)"></a>/n_run Turn node on or off</h4><p>[
int - node ID
int - run flag
] * N</p><p>If the run flag set to zero then the node will not be executed. If
the run flag is set back to one, then it will be executed. Using
this method to start and stop nodes can cause a click if the node is
not silent at the time run flag is toggled.</p><h4>1.22<tt>&nbsp;</tt><a name="(part.__b_read_____________.Read_sound_file_data_into_an_existing_buffer_)"></a>/b_read Read sound file data into an existing buffer.</h4><p>int - buffer number
string - path name of a sound file.
int - starting frame in file (optional. default = 0)
int - number of frames to read (optional. default = -1, see below)
int - starting frame in buffer (optional. default = 0)
int - leave file open (optional. default = 0)
bytes - an OSC message to execute upon completion. (optional)</p><p>Reads sound file data from the given starting frame in the file and
writes it to the given starting frame in the buffer. If number of
frames is less than zero, the entire file is read. If reading a
file to be used by DiskIn ugen then you will want to set "leave file
open" to one, otherwise set it to zero.</p><p>Asynchronous. Replies to sender with /done when complete.</p><h4>1.23<tt>&nbsp;</tt><a name="(part.__nrt_end___________________________end_real_time_mode__close_file)"></a>/nrt_end end real time mode, close file</h4><p>**NOT YET IMPLEMENTED**</p><p>no arguments.</p><p>This message should be sent in a bundle in non real time mode. The
bundle timestamp will establish the ending time of the file. This
command will end non real time mode and close the sound file.
Replies to sender with /done when complete.</p><h4>1.24<tt>&nbsp;</tt><a name="(part.__b_get_____.Get_sample_value_s_)"></a>/b_get Get sample value(s)</h4><p>int - buffer number
[
int - a sample index
] * N</p><p>Replies to sender with the corresponding /b_set command.</p><h4>1.25<tt>&nbsp;</tt><a name="(part.__n_after_________.Place_a_node_after_another)"></a>/n_after Place a node after another</h4><p>[
int - the ID of the node to place (A)
int - the ID of the node after which the above is placed (B)
] * N</p><p>Places node A in the same group as node B, to execute immediately
after node B.</p><h4>1.26<tt>&nbsp;</tt><a name="(part.__d_free________________________________delete_synth_definition)"></a>/d_free delete synth definition</h4><p>[
string - synth def name
] * N</p><p>Removes a synth definition once all synths using it have ended.</p><h4>1.27<tt>&nbsp;</tt><a name="(part.__n_set________________________________.Set_a_node_s_control_value_s_)"></a>/n_set Set a node&rsquo;s control value(s)</h4><p>int - node ID
[
int or string - a control index or name
float - a control value
] * N</p><p>Takes a list of pairs of control indices and values and sets the
controls to those values. If the node is a group, then it sets the
2022-08-28 10:27:01 +00:00
controls of every node in the group.</p><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="RktPn">(</span><span class="RktSym">with-sc3</span></td></tr><tr><td><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">lambda</span></span></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym">fd</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym">letc</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktPn">(</span><span class="RktSym">f</span><span class="hspace">&nbsp;</span><span class="RktVal">440</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym">a</span><span class="hspace">&nbsp;</span><span class="RktVal">0.1</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym">send-synth</span><span class="hspace">&nbsp;</span><span class="RktSym">fd</span><span class="hspace">&nbsp;</span><span class="RktVal">"sin"</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym">out</span><span class="hspace">&nbsp;</span><span class="RktVal">0</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym">mul</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym">sin-osc</span><span class="hspace">&nbsp;</span><span class="RktSym">ar</span><span class="hspace">&nbsp;</span><span class="RktSym">f</span><span class="hspace">&nbsp;</span><span class="RktVal">0</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktSym">a</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">send</span></span></span><span class="hspace">&nbsp;</span><span class="RktSym">fd</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym">s-new0</span><span class="hspace">&nbsp;</span><span class="RktVal">"sin"</span><span class="hspace">&nbsp;</span><span class="RktVal">1001</span><span class="hspace">&nbsp;</span><span class="RktSym">add-to-tail</span><span class="hspace">&nbsp;</span><span class="RktVal">1</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></blockquote><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="RktPn">(</span><span class="RktSym">with-sc3</span></td></tr><tr><td><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">lambda</span></span></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym">fd</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">send</span></span></span><span class="hspace">&nbsp;</span><span class="RktSym">fd</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym">n-set1</span><span class="hspace">&nbsp;</span><span class="RktVal">1001</span><span class="hspace">&nbsp;</span><span class="RktVal">"f"</span><span class="hspace">&nbsp;</span><span class="RktVal">1280</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></blockquote><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="Rkt
2022-08-24 13:53:18 +00:00
string - path name of a sound file.
string - header format.
string - sample format.
int - number of frames to write (optional. default = -1, see below)
int - starting frame in buffer (optional. default = 0)
int - leave file open (optional. default = 0)
bytes - an OSC message to execute upon completion. (optional)</p><p>Write a buffer as a sound file.
Header format is one of:
"aiff", "next", "wav", "ircam"", "raw"
Sample format is one of:
"int8", "int16", "int24", "int32", "float", "double", "mulaw", "alaw"</p><p>Not all combinations of header format and sample format are
possible. If number of frames is less than zero, all samples from
the starting frame to the end of the buffer are written. If opening
a file to be used by DiskOut ugen then you will want to set "leave
file open" to one, otherwise set it to zero. If "leave file open" is
set to one then the file is created, but no frames are written until
the DiskOut ugen does so.</p><p>Asynchronous. Replies to sender with /done when complete.</p><h4>1.29<tt>&nbsp;</tt><a name="(part.__b_getn_______________________________.Get_ranges_of_sample_value_s_)"></a>/b_getn Get ranges of sample value(s)</h4><p>int - buffer number
[
int - starting sample index
int - number of sequential samples to get (M)
] * N</p><p>Get contiguous ranges of samples. Replies to sender with the
corresponding /b_setn command. This is only meant for getting a few
samples, not whole buffers or large sections.</p><h4>1.30<tt>&nbsp;</tt><a name="(part.__b_fill______________________________.Fill_ranges_of_sample_value_s_)"></a>/b_fill Fill ranges of sample value(s)</h4><p>int - buffer number
[
int - sample starting index
int - number of samples to fill (M)
float - value
] * N</p><p>Set contiguous ranges of sample indices to single values. For each
range, the starting sample index is given followed by the number of
samples to change, followed by the value to fill. This is only meant
for setting a few samples, not whole buffers or large sections.</p><h4>1.31<tt>&nbsp;</tt><a name="(part.__s_noid_______________.Auto-reassign_synth_s_.I.D_to_a_reserved_value)"></a>/s_noid Auto-reassign synth&rsquo;s ID to a reserved value</h4><p>[
int - synth ID
] * N</p><p>This command is used when the client no longer needs to communicate
with the synth and wants to have the freedom to reuse the ID. The
server will reassign this synth to a reserved negative number. This
command is purely for bookkeeping convenience of the client. No
notification is sent when this occurs.</p><h4>1.32<tt>&nbsp;</tt><a name="(part.__d_recv___________________________.Receive_a_synth_definition_file)"></a>/d_recv Receive a synth definition file</h4><p>bytes - buffer of data.
bytes - an OSC message to execute upon completion. (optional)</p><p>Loads a file of synth definitions from a buffer in the
message. Resident definitions with the same names are overwritten.</p><p>Asynchronous. Replies to sender with /done when complete.</p><h4>1.33<tt>&nbsp;</tt><a name="(part.__u_cmd____________________________send_a_command_to_a_unit_generator)"></a>/u_cmd send a command to a unit generator</h4><p>int - node ID
int - unit generator index
string - command name
...any arguments</p><p>Sends all arguments following the command name to the unit generator
to be performed. Commands are defined by unit generator plug ins.</p><h4>1.34<tt>&nbsp;</tt><a name="(part.__b_alloc.Read___________.Allocate_buffer_space_and_read_a_sound_file_)"></a>/b_allocRead Allocate buffer space and read a sound file.</h4><p>int - buffer number
string - path name of a sound file.
int - starting frame in file (optional. default = 0)
int - number of frames to read (optional. default = 0, see below)
bytes - an OSC message to execute upon completion. (optional)</p><p>Allocates buffer to number of channels of file and number of samples
requested, or fewer if sound file is smaller than requested. Reads
sound file data from the given starting frame in the file. If the
number of frames argument is less than or equal to zero, the entire
file is read.</p><p>Asynchronous. Replies to sender with /done when complete.</p><h4>1.35<tt>&nbsp;</tt><a name="(part.__n_map________________________.Map_a_node_s_controls_to_read_from_a_bus)"></a>/n_map Map a node&rsquo;s controls to read from a bus</h4><p>int - node ID
[
int or string - a control index or name
int - control bus index
] * N</p><p>Takes a list of pairs of control names or indices and bus indices and
causes those controls to be read continuously from a global control
bus instead of responding to n_set, n_setn and n_fill commands. If the
node is a group, then it maps the controls of every node in the
group. If the control bus index is -1 then any current mapping is
undone and control reverts to normal.</p><h4>1.36<tt>&nbsp;</tt><a name="(part.__status___________.Query_the_status)"></a>/status Query the status</h4><p>No arguments.</p><p>Replies to sender with the following message.</p><p>/status.reply
int - 1. unused.
int - number of unit generators.
int - number of synths.
int - number of groups.
int - number of loaded synth definitions.
float - average percent CPU usage for signal processing
float - peak percent CPU usage for signal processing
double - nominal sample rate
double - actual sample rate</p><h4>1.37<tt>&nbsp;</tt><a name="(part.__g_new____.Create_a_new_group)"></a>/g_new Create a new group</h4><p>[
int - new group ID
int - add action (0,1,2, 3 or 4 see below)
int - add target ID
] * N</p><p>Create a new group and add it to the tree of nodes.</p><p>There are four ways to add the group to the tree as determined by
the add action argument which is defined as follows (the same as
for "/s_new"):</p><p>0 - add the new group to the the head of the group specified by
the add target ID.</p><p>1 - add the new group to the the tail of the group specified by
the add target ID.</p><p>2 - add the new group just before the node specified by the add
target ID.</p><p>3 - add the new group just after the node specified by the add
target ID.</p><p>4 - the new node replaces the node specified by the add target
ID. The target node is freed.</p><p>Multiple groups may be created in one command by adding
arguments.</p><h4>1.38<tt>&nbsp;</tt><a name="(part.__c_get_____.Get_bus_value_s_)"></a>/c_get Get bus value(s)</h4><p>[
2022-08-28 10:27:01 +00:00
int - a bus index
2022-08-24 13:53:18 +00:00
] * N</p><p>Takes a list of buses and replies to sender with the corresponding
/c_set command.</p><h4>1.39<tt>&nbsp;</tt><a name="(part.__b_set_____.Set_sample_value_s_)"></a>/b_set Set sample value(s)</h4><p>int - buffer number
[
int - a sample index
float - a sample value
] * N</p><p>Takes a list of pairs of sample indices and values and sets the
samples to those values.</p><h4>1.40<tt>&nbsp;</tt><a name="(part.__b_zero______________________________________.Zero_sample_data)"></a>/b_zero Zero sample data</h4><p>int - buffer number
bytes - an OSC message to execute upon completion. (optional)</p><p>Sets all samples in the buffer to zero.</p><p>Asynchronous. Replies to sender with /done when complete.</p><h4>1.41<tt>&nbsp;</tt><a name="(part.__tr_______________________.A_trigger_message)"></a>/tr A trigger message</h4><p>int - node ID
int - trigger ID
float - trigger value</p><p>This command is the mechanism that synths can use to trigger events
in clients.</p><p>The node ID is the node that is sending the trigger. The trigger ID
and value are determined by inputs to the SendTrig unit generator
which is the originator of this message.</p><h4>1.42<tt>&nbsp;</tt><a name="(part.__dump.O.S.C__________________________________.Display_incoming_.O.S.C_messages)"></a>/dumpOSC Display incoming OSC messages</h4><p>int - code</p><p>Turns on and off printing of the contents of incoming Open Sound
Control messages. This is useful when debugging your command stream.</p><p>The values for the code are as follows:
0 - turn dumping OFF.
1 - print the parsed contents of the message.
2 - print the contents in hexadecimal.
3 - print both the parsed and hexadecimal representations of the contents.</p><h4>1.43<tt>&nbsp;</tt><a name="(part.__n_setn______________________.Set_ranges_of_a_node_s_control_value_s_)"></a>/n_setn Set ranges of a node&rsquo;s control value(s)</h4><p>int - node ID
[
int or string - a control index or name
int - number of sequential controls to change (M)
[
float - a control value
] * M
] * N</p><p>Set contiguous ranges of control indices to sets of values. For each
range, the starting control index is given followed by the number of
controls to change, followed by the values. If the node is a group,
then it sets the controls of every node in the group.</p><h4>1.44<tt>&nbsp;</tt><a name="(part.__b_free____________________________________.Free_buffer_data_)"></a>/b_free Free buffer data.</h4><p>int - buffer number
bytes - an OSC message to execute upon completion. (optional)</p><p>Frees buffer space allocated for this buffer.</p><p>Asynchronous. Replies to sender with /done when complete.</p><h4>1.45<tt>&nbsp;</tt><a name="(part.__notify____________.Register_to_receive_notifications_from_server)"></a>/notify Register to receive notifications from server</h4><p>int - one to receive notifications, zero to stop receiving them.</p><p>If argument is one, server will remember your return address and
send you notifications. if argument is zero, server will stop
sending you notifications.</p><p>Asynchronous. Replies to sender with /done when complete.</p><h4>1.46<tt>&nbsp;</tt><a name="(part.__b_query)"></a>/b_query</h4><p>[
int - buffer number
] * N</p><p>Responds to the sender with a /b_info message. The arguments to
/b_info are as follows:</p><p>[
int - buffer number
int - number of frames
int - number of channels
float - sample rate
2022-08-28 10:27:01 +00:00
] * N</p><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="RktPn">(</span><span class="RktSym">with-sc3</span></td></tr><tr><td><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">lambda</span></span></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym">fd</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym">async</span><span class="hspace">&nbsp;</span><span class="RktSym">fd</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym">/b_alloc</span><span class="hspace">&nbsp;</span><span class="RktVal">10</span><span class="hspace">&nbsp;</span><span class="RktVal">6</span><span class="hspace">&nbsp;</span><span class="RktVal">1</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym">async</span><span class="hspace">&nbsp;</span><span class="RktSym">fd</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym">/b_query</span><span class="hspace">&nbsp;</span><span class="RktVal">10</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></blockquote><h4>1.47<tt>&nbsp;</tt><a name="(part.__g_tail_____________________________.Add_node_to_tail_of_group)"></a>/g_tail Add node to tail of group</h4><p>[
2022-08-24 13:53:18 +00:00
int - group ID
int - node ID
] * N</p><p>Adds the node to the tail (last to be executed) of the group.</p><h4>1.48<tt>&nbsp;</tt><a name="(part.__clear.Sched___________________________.Clear_all_scheduled_bundles_)"></a>/clearSched Clear all scheduled bundles.</h4><p>Removes all bundles from the scheduling queue.</p><h4>1.49<tt>&nbsp;</tt><a name="(part.__g_free.All__________________________.Delete_all_nodes_in_a_group_)"></a>/g_freeAll Delete all nodes in a group.</h4><p>[
int - group ID
] * N</p><p>Frees all nodes in the group. A list of groups may be specified.</p><h4>1.50<tt>&nbsp;</tt><a name="(part.__g_head______________________.Add_node_to_head_of_group)"></a>/g_head Add node to head of group</h4><p>[
int - group ID
int - node ID
] * N</p><p>Adds the node to the head (first to be executed) of the group.</p><h4>1.51<tt>&nbsp;</tt><a name="(part.__c_getn_____.Get_ranges_of_bus_value_s_)"></a>/c_getn Get ranges of bus value(s)</h4><p>[
int - starting bus index
int - number of sequential buses to get (M)
] * N</p><p>Get contiguous ranges of buses. Replies to sender with the
corresponding /c_setn command.</p><h4>1.52<tt>&nbsp;</tt><a name="(part.__quit________________________________________________.Quit_program)"></a>/quit Quit program</h4><p>No arguments.</p><p>Exits the synthesis server.</p><p>Asynchronous. Replies to sender with /done just before completion.</p><h4>1.53<tt>&nbsp;</tt><a name="(part._see_g-new)"></a>see g-new</h4><h4>1.54<tt>&nbsp;</tt><a name="(part.__c_fill_______________________________________.Fill_ranges_of_bus_value_s_)"></a>/c_fill Fill ranges of bus value(s)</h4><p>[
int - starting bus index
int - number of buses to fill (M)
float - value
] * N</p><p>Set contiguous ranges of buses to single values. For each range, the
starting sample index is given followed by the number of buses to
change, followed by the value to fill.</p><div class="navsetbottom"><span class="navleft"><div class="nosearchform"></div>&nbsp;&nbsp;<span class="tocsettoggle">&nbsp;&nbsp;<a href="javascript:void(0);" title="show/hide table of contents" onclick="TocsetToggle();">contents</a></span></span><span class="navright">&nbsp;&nbsp;<a href="index.html" title="backward to &quot;rsc3: racket/scheme/supercollider&quot;" data-pltdoc="x">&larr; prev</a>&nbsp;&nbsp;<a href="index.html" title="up to &quot;rsc3: racket/scheme/supercollider&quot;" data-pltdoc="x">up</a>&nbsp;&nbsp;<a href="rsc3__ugens.html" title="forward to &quot;2 rsc3: ugens&quot;" data-pltdoc="x">next &rarr;</a></span>&nbsp;</div></div></div><div id="contextindicator">&nbsp;</div></body></html>