1 title:: Server Command Reference
2 summary:: SuperCollider Server Synth Engine Command Reference
3 categories:: Server>Architecture
5 The following is a list of all server commands and their arguments.
7 Each command has a command number which can be sent to the server as a 32 bit integer instead of an OSC style string. Command numbers are listed at the end of this document.
9 If a command's description contains the word strong::Asynchronous::, then that command will be passed to a background thread to complete so as not to steal CPU time from the audio synthesis thread. All asynchronous commands send a reply to the client when they are completed. Many asynchronous commands can contain an OSC message or bundle to be executed upon completion. eg.
11 ["/d_load", "synthdefs/void.scsyndef",
12 ["/s_new", "void", 1001, 1, 0] // completion message
16 section:: Master Controls
18 subsection:: /quit - quit program
20 Exits the synthesis server.
23 ## Asynchronous. || Replies to sender with strong::/done:: just before completion.
26 subsection:: /notify - register to receive notifications from server
28 ## strong::int:: || one to receive notifications, zero to stop receiving them.
30 If argument is one, server will remember your return address and send you notifications. if argument is zero, server will stop sending you notifications.
33 ## Asynchronous. || Replies to sender with strong::/done:: when complete.
36 subsection:: /status - query the status
38 Replies to sender with the following message:
40 ## /status.reply || table::
42 ## int || number of unit generators.
43 ## int || number of synths.
44 ## int || number of groups.
45 ## int || number of loaded synth definitions.
46 ## float || average percent CPU usage for signal processing
47 ## float || peak percent CPU usage for signal processing
48 ## double || nominal sample rate
49 ## double || actual sample rate
53 subsection:: /cmd - plug-in defined command
55 ## strong::string:: || command name
56 ## strong::...:: || any arguments
58 Commands are defined by plug-ins.
60 subsection:: /dumpOSC - display incoming OSC messages
62 ## strong::int:: || code
64 Turns on and off printing of the contents of incoming Open Sound Control messages. This is useful when debugging your command stream.
66 The values for the code are as follows:
68 ## 0 || turn dumping OFF.
69 ## 1 || print the parsed contents of the message.
70 ## 2 || print the contents in hexadecimal.
71 ## 3 || print both the parsed and hexadecimal representations of the contents.
74 subsection:: /sync - notify when async commands have completed.
76 ## strong::int:: || a unique number identifying this command.
78 Replies with a strong::/synced:: message when all asynchronous commands received before this one have completed. The reply will contain the sent unique ID.
81 ## Asynchronous. || Replies to sender with strong:: /synced, ID :: when complete.
84 subsection:: /clearSched - clear all scheduled bundles.
86 Removes all bundles from the scheduling queue.
88 subsection:: /error - enable/disable error message posting
90 ## strong::int:: || mode
92 Turn on or off error messages sent to the SuperCollider post window. Useful when sending a message, such as strong::/n_free::, whose failure does not necessarily indicate anything wrong.
94 The values for mode are as follows:
96 ## 0 || turn off error posting until the next ['/error', 1] message.
97 ## 1 || turn on error posting.
99 For convenience of client-side methods, you can also suppress errors temporarily, for the scope of a single bundle.
101 ## -1 || turn off locally in the bundle -- error posting reverts to the "permanent" setting for the next message or bundle.
102 ## -2 || turn on locally in the bundle.
104 These "temporary" states accumulate within a single bundle -- so if you have nested calls to methods that use bundle-local error suppression, error posting remains off until all the layers have been unwrapped.
105 If you use ['/error', -1] within a self-bundling method, you should always close it with ['/error', -2] so that subsequent bundled messages will take the correct error posting status.
106 However, even if this is not done, the next bundle or message received will begin with the standard error posting status, as set by modes 0 or 1.
108 Temporary error suppression may not affect asynchronous commands in every case.
110 section:: Synth Definition Commands
112 subsection:: /d_recv - receive a synth definition file
114 ## strong::bytes:: || buffer of data.
115 ## strong::bytes:: || an OSC message to execute upon completion. (optional)
117 Loads a file of synth definitions from a buffer in the message. Resident definitions with the same names are overwritten.
120 ## Asynchronous. || Replies to sender with strong::/done:: when complete.
123 subsection:: /d_load - load synth definition
125 ## strong::string:: || pathname of file. Can be a pattern like code:: "synthdefs/perc-*" ::
126 ## strong::bytes:: || an OSC message to execute upon completion. (optional)
128 Loads a file of synth definitions. Resident definitions with the same names are overwritten.
131 ## Asynchronous. || Replies to sender with strong::/done:: when complete.
134 subsection:: /d_loadDir - load a directory of synth definitions
136 ## strong::string:: || pathname of directory.
137 ## strong::bytes:: || an OSC message to execute upon completion. (optional)
139 Loads a directory of synth definitions files. Resident definitions with the same names are overwritten.
142 ## Asynchronous. || Replies to sender with strong::/done:: when complete.
145 subsection:: /d_free - delete synth definition
147 ## N * strong::string:: || synth def name
150 Removes a synth definition. The definition is removed immediately, and does not wait for synth nodes based on that definition to end.
152 section:: Node Commands
154 subsection:: /n_free - delete a node.
156 ## N * strong::int:: || node ID
159 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.
161 subsection:: /n_run - turn node on or off
164 ## strong::int:: || node ID
165 ## strong::int:: || run flag
169 ## If the run flag set to zero then the node will not be executed.
170 ## If the run flag is set back to one, then it will be executed.
172 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.
174 subsection:: /n_set - set a node's control value(s)
176 ## strong::int:: || node ID
178 ## strong::int:: or strong::string:: || a control index or name
179 ## strong::float:: or strong::int:: || a control value
183 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 controls of every node in the group.
185 This message now supports array type tags ($[ and $]) in the control/value component of the OSC message. Arrayed control values are applied in the manner of n_setn (i.e., sequentially starting at the indexed or named control).
187 subsection:: /n_setn - set ranges of a node's control value(s)
190 ## strong::int:: || node ID
192 ## strong::int:: or strong::string:: || a control index or name
193 ## strong::int:: || number of sequential controls to change (M)
194 ## M * strong::float:: or strong::int:: || control value(s)
198 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.
200 subsection:: /n_fill - fill ranges of a node's control value(s)
202 ## strong::int:: || node ID
204 ## strong::int:: or strong::string:: || a control index or name
205 ## strong::int:: || number of values to fill (M)
206 ## strong::float:: or strong::int:: || value
210 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.
212 subsection:: /n_map - map a node's controls to read from a bus
214 ## strong::int:: || node ID
216 ## strong::int:: or strong::string:: || a control index or name
217 ## strong::int:: || control bus index
221 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. 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. Any n_set, n_setn and n_fill command will also unmap the control.
223 subsection:: /n_mapn - map a node's controls to read from buses
225 ## strong::int:: || node ID
227 ## strong::int:: or strong::string:: || a control index or name
228 ## strong::int:: || control bus index
229 ## strong::int:: || number of controls to map
233 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. Any n_set, n_setn and n_fill command will also unmap the control.
235 subsection:: /n_mapa - map a node's controls to read from an audio bus
237 ## strong::int:: || node ID
239 ## strong::int:: or strong::string:: || a control index or name
240 ## strong::int:: || control bus index
244 Takes a list of pairs of control names or indices and audio bus indices and causes those controls to be read continuously from a global audio bus. If the node is a group, then it maps the controls of every node in the group. If the audio bus index is -1 then any current mapping is undone. Any n_set, n_setn and n_fill command will also unmap the control. For the full audio rate signal, the argument must have its rate set to \ar.
246 subsection:: /n_mapan - map a node's controls to read from audio buses
248 ## strong:: int:: || node ID
250 ## strong::int:: or strong::string:: || a control index or name
251 ## strong::int:: || control bus index
252 ## strong::int:: || number of controls to map
256 Takes a list of triplets of control names or indices, audio 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 audio bus index is -1 then any current mapping is undone. Any n_set, n_setn and n_fill command will also unmap the control. For the full audio rate signal, the argument must have its rate set to \ar.
258 subsection:: /n_before - place a node before another
261 ## strong::int:: || the ID of the node to place (A)
262 ## strong::int:: || the ID of the node before which the above is placed (B)
265 Places node A in the same group as node B, to execute immediately before node B.
267 subsection:: /n_after - place a node after another
270 ## strong::int:: || the ID of the node to place (A)
271 ## strong::int:: || the ID of the node after which the above is placed (B)
274 Places node A in the same group as node B, to execute immediately after node B.
276 subsection:: /n_query - get info about a node
278 ## N * strong::int:: || node ID
280 The server sends an /n_info message for each node to registered clients.
281 See Node Notifications below for the format of the /n_info message.
283 subsection:: /n_trace - trace a node
285 ## N * strong::int:: || node IDs
288 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.
290 subsection:: /n_order - move and order a list of nodes
292 ## strong::int:: || add action (0,1,2, 3 or 4 see below)
293 ## strong::int:: || add target ID
294 ## N * strong::int:: || node IDs
297 Move the listed nodes to the location specified by the target and add action, and place them in the order specified. Nodes which have already been freed will be ignored.
299 ## add actions: || table::
300 ## 0 || construct the node order at the head of the group specified by the add target ID.
301 ## 1 || construct the node order at the tail of the group specified by the add target ID.
302 ## 2 || construct the node order just before the node specified by the add target ID.
303 ## 3 || construct the node order just after the node specified by the add target ID.
307 section:: Synth Commands
309 subsection:: /s_new - create a new synth
311 ## strong::string:: || synth definition name
312 ## strong::int:: || synth ID
313 ## strong::int:: || add action (0,1,2, 3 or 4 see below)
314 ## strong::int:: || add target ID
316 ## strong::int:: or strong::string:: || a control index or name
317 ## strong::float:: or strong::int:: or strong::string::|| floating point and integer arguments are interpreted as control value.
318 a symbol argument consisting of the letter 'c' or 'a' (for control or audio) followed by the bus's index.
322 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:
324 ## add actions: || table::
325 ## 0 || add the new node to the the head of the group specified by the add target ID.
326 ## 1 || add the new node to the the tail of the group specified by the add target ID.
327 ## 2 || add the new node just before the node specified by the add target ID.
328 ## 3 || add the new node just after the node specified by the add target ID.
329 ## 4 || the new node replaces the node specified by the add target ID. The target node is freed.
332 Controls may be set when creating the synth. The control arguments are the same as for the n_set command.
334 If you send strong::/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'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 strong::/go::, strong::/end::, strong::/on::, strong::/off::.
336 If you use a node ID of -1 for any other command, such as strong::/n_map::, then it refers to the most recently created node by strong::/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.
338 This message now supports array type tags ($[ and $]) in the control/value component of the OSC message. Arrayed control values are applied in the manner of n_setn (i.e., sequentially starting at the indexed or named control). See the link::Guides/NodeMessaging:: helpfile.
340 subsection:: /s_get - get control value(s)
342 ## strong::int:: || synth ID
343 ## N * strong::int:: or strong::string:: || a control index or name
346 Replies to sender with the corresponding strong::/n_set:: command.
348 subsection:: /s_getn - get ranges of control value(s)
350 ## strong::int:: || synth ID
352 ## strong::int:: or strong::string:: || a control index or name
353 ## strong::int:: || number of sequential controls to get (M)
356 Get contiguous ranges of controls. Replies to sender with the corresponding strong::/n_setn:: command.
358 subsection:: /s_noid - auto-reassign synth's ID to a reserved value
360 ## N * strong::int:: || synth IDs
363 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.
365 section:: Group Commands
367 subsection:: /g_new - create a new group
370 ## strong::int:: || new group ID
371 ## strong::int:: || add action (0,1,2, 3 or 4 see below)
372 ## strong::int:: || add target ID
376 Create a new group and add it to the tree of nodes.
377 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 strong::/s_new::):
379 ## add actions: || table::
380 ## 0 || add the new group to the the head of the group specified by the add target ID.
381 ## 1 || add the new group to the the tail of the group specified by the add target ID.
382 ## 2 || add the new group just before the node specified by the add target ID.
383 ## 3 || add the new group just after the node specified by the add target ID.
384 ## 4 || the new node replaces the node specified by the add target ID. The target node is freed.
387 Multiple groups may be created in one command by adding arguments.
389 subsection:: /p_new - create a new parallel group
392 ## strong::int:: || new group ID
393 ## strong::int:: || add action (0,1,2, 3 or 4 see below)
394 ## strong::int:: || add target ID
397 Create a new parallel group and add it to the tree of nodes. Parallel groups are relaxed groups, their child nodes are evaluated in unspecified order.
398 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 strong::/s_new::):
400 ## add actions: || table::
401 ## 0 || add the new group to the the head of the group specified by the add target ID.
402 ## 1 || add the new group to the the tail of the group specified by the add target ID.
403 ## 2 || add the new group just before the node specified by the add target ID.
404 ## 3 || add the new group just after the node specified by the add target ID.
405 ## 4 || the new node replaces the node specified by the add target ID. The target node is freed.
408 Multiple groups may be created in one command by adding arguments.
410 subsection:: /g_head - add node to head of group
413 ## strong::int:: || group ID
414 ## strong::int:: || node ID
418 Adds the node to the head (first to be executed) of the group.
420 subsection:: /g_tail - add node to tail of group
423 ## strong::int:: || group ID
424 ## strong::int:: || node ID
427 Adds the node to the tail (last to be executed) of the group.
429 subsection:: /g_freeAll - delete all nodes in a group.
431 ## N * strong::int:: || group ID(s)
433 Frees all nodes in the group. A list of groups may be specified.
435 subsection:: /g_deepFree - free all synths in this group and all its sub-groups.
437 ## N * strong::int:: || group ID(s)
439 Traverses all groups below this group and frees all the synths. Sub-groups are not freed. A list of groups may be specified.
441 subsection:: /g_dumpTree - post a representation of this group's node subtree.
444 ## strong::int:: || group ID
445 ## strong::int:: || flag; if not 0 the current control (arg) values for synths will be posted
449 Posts a representation of this group's node subtree, i.e. all the groups and synths contained within it, optionally including the current control values for synths.
451 subsection:: /g_queryTree - get a representation of this group's node subtree.
454 ## strong::int:: || group ID
455 ## strong::int:: || flag: if not 0 the current control (arg) values for synths will be included
458 Request a representation of this group's node subtree, i.e. all the groups and synths contained within it. Replies to the sender with a strong::/g_queryTree.reply:: message listing all of the nodes contained within the group in the following format:
460 ## strong::int:: || flag: if synth control values are included 1, else 0
461 ## strong::int:: || node ID of the requested group
462 ## strong::int:: || number of child nodes contained within the requested group
463 ## then for each node in the subtree: || table::
464 ## strong::int:: || node ID
465 ## strong::int:: || number of child nodes contained within this node. If -1 this is a synth, if >=0 it's a group
466 ## then, if this node is a synth:
467 ## strong::symbol:: || the SynthDef name for this node.
468 ## then, if flag (see above) is true:
469 ## strong::int:: || numControls for this synth (M)
471 ## strong::symbol:: or strong::int:: || control name or index
472 ## strong::float:: or strong::symbol:: || value or control bus mapping symbol (e.g. 'c1')
477 N.B. The order of nodes corresponds to their execution order on the server. Thus child nodes (those contained within a group) are listed immediately following their parent. See the method Server:queryAllNodes for an example of how to process this reply.
479 section:: Unit Generator Commands
481 subsection:: /u_cmd - send a command to a unit generator
483 ## strong::int:: || node ID
484 ## strong::int:: || unit generator index
485 ## strong::string:: || command name
486 ## strong::...:: || any arguments
488 Sends all arguments following the command name to the unit generator to be performed. Commands are defined by unit generator plug ins.
490 section:: Buffer Commands
492 Buffers are stored in a global array, indexed by integers starting at zero.
494 subsection:: /b_alloc - allocate buffer space.
496 ## strong::int:: || buffer number
497 ## strong::int:: || number of frames
498 ## strong::int:: || number of channels (optional. default = 1 channel)
499 ## strong::bytes:: || an OSC message to execute upon completion. (optional)
501 Allocates zero filled buffer to number of channels and samples.
503 ## Asynchronous. || Replies to sender with strong::/done:: when complete.
506 subsection:: /b_allocRead - allocate buffer space and read a sound file.
508 ## strong::int:: || buffer number
509 ## strong::string:: || path name of a sound file.
510 ## strong::int:: || starting frame in file (optional. default = 0)
511 ## strong::int:: || number of frames to read (optional. default = 0, see below)
512 ## strong::bytes:: || an OSC message to execute upon completion. (optional)
514 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.
516 ## Asynchronous. || Replies to sender with strong::/done:: when complete.
519 subsection:: /b_allocReadChannel - allocate buffer space and read channels from a sound file.
521 ## strong::int:: || buffer number
522 ## strong::string:: || path name of a sound file
523 ## strong::int:: || starting frame in file
524 ## strong::int:: || number of frames to read
527 ## strong::int:: || source file channel index
529 ## strong::bytes:: || an OSC message to execute upon completion. (optional)
532 As b_allocRead, but reads individual channels into the allocated buffer in the order specified.
534 ## Asynchronous. || Replies to sender with strong::/done:: when complete.
538 subsection:: /b_read - read sound file data into an existing buffer.
540 ## strong::int:: || buffer number
541 ## strong::string:: || path name of a sound file.
542 ## strong::int:: || starting frame in file (optional. default = 0)
543 ## strong::int:: || number of frames to read (optional. default = -1, see below)
544 ## strong::int:: || starting frame in buffer (optional. default = 0)
545 ## strong::int:: || leave file open (optional. default = 0)
546 ## strong::bytes:: || an OSC message to execute upon completion. (optional)
548 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.
549 If reading a file to be used by link::Classes/DiskIn:: ugen then you will want to set "leave file open" to one, otherwise set it to zero.
551 ## Asynchronous. || Replies to sender with strong::/done:: when complete.
555 subsection:: /b_readChannel - read sound file channel data into an existing buffer
557 ## strong::int:: || buffer number
558 ## strong::string:: || path name of a sound file
559 ## strong::int:: || starting frame in file
560 ## strong::int:: || number of frames to read
561 ## strong::int:: || starting frame in buffer
562 ## strong::int:: || leave file open
565 ## strong::int:: || source file channel index
567 ## strong::bytes:: || completion message
570 As strong::b_read::, but reads individual channels in the order specified. The number of channels requested must match the number of channels in the buffer.
572 ## Asynchronous. || Replies to sender with strong::/done:: when complete.
576 subsection:: /b_write - write sound file data.
578 ## strong::int:: || buffer number
579 ## strong::string:: || path name of a sound file.
580 ## strong::string:: || header format.
581 ## strong::string:: || sample format.
582 ## strong::int:: || number of frames to write (optional. default = -1, see below)
583 ## strong::int:: || starting frame in buffer (optional. default = 0)
584 ## strong::int:: || leave file open (optional. default = 0)
585 ## strong::bytes:: || an OSC message to execute upon completion. (optional)
588 Write a buffer as a sound file.
590 ## Header format is one of: || "aiff", "next", "wav", "ircam"", "raw"
591 ## Sample format is one of: || "int8", "int16", "int24", "int32", "float", "double", "mulaw", "alaw"
593 Not all combinations of header format and sample format are possible.
594 If number of frames is less than zero, all samples from the starting frame to the end of the buffer are written.
595 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.
597 ## Asynchronous. || Replies to sender with strong::/done:: when complete.
601 subsection:: /b_free - free buffer data.
603 ## strong::int:: || buffer number
604 ## strong::bytes:: || an OSC message to execute upon completion. (optional)
606 Frees buffer space allocated for this buffer.
608 ## Asynchronous. || Replies to sender with strong::/done:: when complete.
612 subsection:: /b_zero - zero sample data
614 ## strong::int:: || buffer number
615 ## strong::bytes:: || an OSC message to execute upon completion. (optional)
617 Sets all samples in the buffer to zero.
619 ## Asynchronous. || Replies to sender with strong::/done:: when complete.
623 subsection:: /b_set - set sample value(s)
625 ## strong::int:: || buffer number
627 ## strong::int:: || a sample index
628 ## strong::float:: || a sample value
631 Takes a list of pairs of sample indices and values and sets the samples to those values.
633 subsection:: /b_setn - set ranges of sample value(s)
635 ## strong::int:: || buffer number
637 ## strong::int:: || sample starting index
638 ## strong::int:: || number of sequential samples to change (M)
639 ## M * strong::float:: || a sample value
642 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.
644 subsection:: /b_fill - fill ranges of sample value(s)
646 ## strong::int:: || buffer number
648 ## strong::int:: || sample starting index
649 ## strong::int:: || number of samples to fill (M)
650 ## strong::float:: || value
653 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.
656 subsection:: /b_gen - call a command to fill a buffer
658 ## strong::int:: || buffer number
659 ## strong::string:: || command name
660 ## strong::...:: || command arguments
662 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.
664 ## Asynchronous. || Replies to sender with strong::/done:: when complete.
668 subsection:: /b_close - close soundfile
670 ## strong::int:: || buffer number
672 After using a buffer with link::Classes/DiskOut::, close the soundfile and write header information.
674 ## Asynchronous. || Replies to sender with strong::/done:: when complete.
678 subsection:: /b_query - get buffer info
680 ## N * strong::int:: || buffer number(s)
683 Responds to the sender with a strong::/b_info:: message. The arguments to /b_info are as follows:
686 ## strong::int:: || buffer number
687 ## strong::int:: || number of frames
688 ## strong::int:: || number of channels
689 ## strong::float:: || sample rate
693 subsection:: /b_get - get sample value(s)
695 ## strong::int:: || buffer number
696 ## N * strong::int:: || a sample index
699 Replies to sender with the corresponding strong::/b_set:: command.
701 subsection:: /b_getn - get ranges of sample value(s)
703 ## strong::int:: || buffer number
705 ## strong::int:: || starting sample index
706 ## strong::int:: || number of sequential samples to get (M)
710 Get contiguous ranges of samples. Replies to sender with the corresponding strong::/b_setn:: command. This is only meant for getting a few samples, not whole buffers or large sections.
713 section:: Control Bus Commands
715 subsection:: /c_set - set bus value(s)
718 ## strong::int:: || a bus index
719 ## strong::float:: or strong::int:: || a control value
722 Takes a list of pairs of bus indices and values and sets the buses to those values.
724 subsection:: /c_setn - set ranges of bus value(s)
727 ## strong::int:: || starting bus index
728 ## strong::int:: || number of sequential buses to change (M)
730 ## strong::float:: or strong::int:: || a control value
734 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.
736 subsection:: /c_fill - fill ranges of bus value(s)
739 ## strong::int:: || starting bus index
740 ## strong::int:: || number of buses to fill (M)
741 ## strong::float:: or strong::int:: || value
744 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.
746 subsection:: /c_get - get bus value(s)
748 ## N * strong::int:: || a bus index
750 Takes a list of buses and replies to sender with the corresponding strong::/c_set:: command.
752 subsection:: /c_getn - get ranges of bus value(s)
755 ## strong::int:: || starting bus index
756 ## strong::int:: || number of sequential buses to get (M)
759 Get contiguous ranges of buses. Replies to sender with the corresponding strong::/c_setn:: command.
762 section:: Non Real Time Mode Commands
764 subsection:: /nrt_end - end real time mode, close file
767 This message should be sent in a bundle in non real time mode.
768 The bundle timestamp will establish the ending time of the file.
769 This command will end non real time mode and close the sound file.
770 Replies to sender with strong::/done:: when complete.
773 section:: Replies to Commands
775 These messages are sent by the server in reponse to some commands.
777 subsection:: /done - an asynchronous message has completed.
779 ## strong::string:: || the name of the command
781 Sent in response to all asynchronous commands. Sent only to the sender of the original message.
783 subsection:: /fail - an error occurred.
785 ## strong::string:: || the name of the command
786 ## strong::string:: || the error message.
788 There was a problem. Sent only to the sender of the original message.
790 subsection:: /late - a command was received too late.
793 ## strong::int:: || the high 32 bits of the original time stamp.
794 ## strong::int:: || the low 32 bits of the original time stamp.
795 ## strong::int:: || the high 32 bits of the time it was executed.
796 ## strong::int:: || the low 32 bits of the time it was executed.
798 The command was received too late to be executed on time. Sent only to the sender of the original message.
800 section:: Node Notifications from Server
802 These messages are sent as notification of some event to all clients who have registered via the strong::/notify:: command.
804 All of these have the same arguments:
806 ## strong::int:: || node ID
807 ## strong::int:: || the node's parent group ID
808 ## strong::int:: || previous node ID, -1 if no previous node.
809 ## strong::int:: || next node ID, -1 if no next node.
810 ## strong::int:: || 1 if the node is a group, 0 if it is a synth
811 ## The following two arguments are only sent if the node is a group:
812 ## strong::int:: || the ID of the head node, -1 if there is no head node.
813 ## strong::int:: || the ID of the tail node, -1 if there is no tail node.
816 subsection:: /n_go - a node was started
817 This command is sent to all registered clients when a node is created.
819 subsection:: /n_end - a node ended
820 This command is sent to all registered clients when a node ends and is deallocated.
822 subsection:: /n_off - a node was turned off
823 This command is sent to all registered clients when a node is turned off.
825 subsection:: /n_on - a node was turned on
826 This command is sent to all registered clients when a node is turned on.
828 subsection:: /n_move - a node was moved
829 This command is sent to all registered clients when a node is moved.
831 subsection:: /n_info - reply to /n_query
832 This command is sent to all registered clients in response to an strong::/n_query:: command.
835 section:: Trigger Notification
836 These messages are sent as notification of some event to all clients who have registered via the strong::/notify:: command.
838 subsection:: /tr - a trigger message
840 ## strong::int:: || node ID
841 ## strong::int:: || trigger ID
842 ## strong::float:: || trigger value
844 This command is the mechanism that synths can use to trigger events in clients.
845 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.
848 section:: Buffer Fill Commands
850 These are the currently defined fill routines for use with the strong::/b_gen:: command.
852 subsection:: Wave Fill Commands
854 There are three defined fill routines for sine waves.
856 The flags are defined as follows:
858 ## 1 || normalize - Normalize peak amplitude of wave to 1.0.
859 ## 2 || wavetable - If set, then the buffer is written in wavetable format so that it can be read by interpolating oscillators.
860 ## 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.
866 ## strong::int:: || flags, see above
868 ## strong::float:: || partial amplitude
871 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.
875 ## strong::int:: || flags, see above
877 ## strong::float:: || partial frequency (in cycles per buffer)
878 ## strong::float:: || partial amplitude
881 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.
885 ## strong::int:: || flags, see above
887 ## strong::float:: || partial frequency (in cycles per buffer)
888 ## strong::float:: || partial amplitude
889 ## strong::float:: || partial phase
892 Similar to sine2 except that each partial may have a nonzero starting phase.
896 ## strong::int:: || flags, see above
898 ## strong::float:: || amplitude
901 Fills a buffer with a series of chebyshev polynomials, which can be defined as:
903 cheby(n) = amplitude * cos(n * acos(x))
905 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.
908 subsection:: Other Commands
913 ## strong::int:: || sample position in destination
914 ## strong::int:: || source buffer number
915 ## strong::int:: || sample position in source
916 ## strong::int:: || number of samples to copy
918 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.
920 ## Asynchronous. || Replies to sender with strong::/done:: when complete.
925 section:: Command Numbers
927 These are the currently defined command numbers. More may be added to the end of the list in the future.
967 cmd_b_allocRead = 29,
1000 cmd_b_allocReadChannel = 54,
1001 cmd_b_readChannel = 55,
1003 cmd_g_dumpTree = 56,
1004 cmd_g_queryTree = 57,
1015 NUMBER_OF_COMMANDS = 63
1019 copyright © 2002 James McCartney
1021 soft::converted to ScDoc format 2011 by Jonatan Liljedahl::