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
52 note:: teletype::/status:: messages won't be posted, if the server is in teletype::/dumpOSC:: mode::
56 subsection:: /cmd - plug-in defined command
58 ## strong::string:: || command name
59 ## strong::...:: || any arguments
61 Commands are defined by plug-ins.
63 subsection:: /dumpOSC - display incoming OSC messages
65 ## strong::int:: || code
67 Turns on and off printing of the contents of incoming Open Sound Control messages. This is useful when debugging your command stream.
69 The values for the code are as follows:
71 ## 0 || turn dumping OFF.
72 ## 1 || print the parsed contents of the message.
73 ## 2 || print the contents in hexadecimal.
74 ## 3 || print both the parsed and hexadecimal representations of the contents.
77 subsection:: /sync - notify when async commands have completed.
79 ## strong::int:: || a unique number identifying this command.
81 Replies with a strong::/synced:: message when all asynchronous commands received before this one have completed. The reply will contain the sent unique ID.
84 ## Asynchronous. || Replies to sender with strong:: /synced, ID :: when complete.
87 subsection:: /clearSched - clear all scheduled bundles.
89 Removes all bundles from the scheduling queue.
91 subsection:: /error - enable/disable error message posting
93 ## strong::int:: || mode
95 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.
97 The values for mode are as follows:
99 ## 0 || turn off error posting until the next ['/error', 1] message.
100 ## 1 || turn on error posting.
102 For convenience of client-side methods, you can also suppress errors temporarily, for the scope of a single bundle.
104 ## -1 || turn off locally in the bundle -- error posting reverts to the "permanent" setting for the next message or bundle.
105 ## -2 || turn on locally in the bundle.
107 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.
108 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.
109 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.
111 Temporary error suppression may not affect asynchronous commands in every case.
113 section:: Synth Definition Commands
115 subsection:: /d_recv - receive a synth definition file
117 ## strong::bytes:: || buffer of data.
118 ## strong::bytes:: || an OSC message to execute upon completion. (optional)
120 Loads a file of synth definitions from a buffer in the message. Resident definitions with the same names are overwritten.
123 ## Asynchronous. || Replies to sender with strong::/done:: when complete.
126 subsection:: /d_load - load synth definition
128 ## strong::string:: || pathname of file. Can be a pattern like code:: "synthdefs/perc-*" ::
129 ## strong::bytes:: || an OSC message to execute upon completion. (optional)
131 Loads a file of synth definitions. Resident definitions with the same names are overwritten.
134 ## Asynchronous. || Replies to sender with strong::/done:: when complete.
137 subsection:: /d_loadDir - load a directory of synth definitions
139 ## strong::string:: || pathname of directory.
140 ## strong::bytes:: || an OSC message to execute upon completion. (optional)
142 Loads a directory of synth definitions files. Resident definitions with the same names are overwritten.
145 ## Asynchronous. || Replies to sender with strong::/done:: when complete.
148 subsection:: /d_free - delete synth definition
150 ## N * strong::string:: || synth def name
153 Removes a synth definition. The definition is removed immediately, and does not wait for synth nodes based on that definition to end.
155 section:: Node Commands
157 subsection:: /n_free - delete a node.
159 ## N * strong::int:: || node ID
162 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.
164 subsection:: /n_run - turn node on or off
167 ## strong::int:: || node ID
168 ## strong::int:: || run flag
172 ## If the run flag set to zero then the node will not be executed.
173 ## If the run flag is set back to one, then it will be executed.
175 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.
177 subsection:: /n_set - set a node's control value(s)
179 ## strong::int:: || node ID
181 ## strong::int:: or strong::string:: || a control index or name
182 ## strong::float:: or strong::int:: || a control value
186 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.
188 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).
190 subsection:: /n_setn - set ranges of a node's control value(s)
193 ## strong::int:: || node ID
195 ## strong::int:: or strong::string:: || a control index or name
196 ## strong::int:: || number of sequential controls to change (M)
197 ## M * strong::float:: or strong::int:: || control value(s)
201 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.
203 subsection:: /n_fill - fill ranges of a node's control value(s)
205 ## strong::int:: || node ID
207 ## strong::int:: or strong::string:: || a control index or name
208 ## strong::int:: || number of values to fill (M)
209 ## strong::float:: or strong::int:: || value
213 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.
215 subsection:: /n_map - map a node's controls to read from a bus
217 ## strong::int:: || node ID
219 ## strong::int:: or strong::string:: || a control index or name
220 ## strong::int:: || control bus index
224 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.
226 subsection:: /n_mapn - map a node's controls to read from buses
228 ## strong::int:: || node ID
230 ## strong::int:: or strong::string:: || a control index or name
231 ## strong::int:: || control bus index
232 ## strong::int:: || number of controls to map
236 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.
238 subsection:: /n_mapa - map a node's controls to read from an audio bus
240 ## strong::int:: || node ID
242 ## strong::int:: or strong::string:: || a control index or name
243 ## strong::int:: || control bus index
247 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.
249 subsection:: /n_mapan - map a node's controls to read from audio buses
251 ## strong:: int:: || node ID
253 ## strong::int:: or strong::string:: || a control index or name
254 ## strong::int:: || control bus index
255 ## strong::int:: || number of controls to map
259 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.
261 subsection:: /n_before - place a node before another
264 ## strong::int:: || the ID of the node to place (A)
265 ## strong::int:: || the ID of the node before which the above is placed (B)
268 Places node A in the same group as node B, to execute immediately before node B.
270 subsection:: /n_after - place a node after another
273 ## strong::int:: || the ID of the node to place (A)
274 ## strong::int:: || the ID of the node after which the above is placed (B)
277 Places node A in the same group as node B, to execute immediately after node B.
279 subsection:: /n_query - get info about a node
281 ## N * strong::int:: || node ID
283 The server sends an /n_info message for each node to registered clients.
284 See Node Notifications below for the format of the /n_info message.
286 subsection:: /n_trace - trace a node
288 ## N * strong::int:: || node IDs
291 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.
293 subsection:: /n_order - move and order a list of nodes
295 ## strong::int:: || add action (0,1,2, 3 or 4 see below)
296 ## strong::int:: || add target ID
297 ## N * strong::int:: || node IDs
300 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.
302 ## add actions: || table::
303 ## 0 || construct the node order at the head of the group specified by the add target ID.
304 ## 1 || construct the node order at the tail of the group specified by the add target ID.
305 ## 2 || construct the node order just before the node specified by the add target ID.
306 ## 3 || construct the node order just after the node specified by the add target ID.
310 section:: Synth Commands
312 subsection:: /s_new - create a new synth
314 ## strong::string:: || synth definition name
315 ## strong::int:: || synth ID
316 ## strong::int:: || add action (0,1,2, 3 or 4 see below)
317 ## strong::int:: || add target ID
319 ## strong::int:: or strong::string:: || a control index or name
320 ## strong::float:: or strong::int:: or strong::string::|| floating point and integer arguments are interpreted as control value.
321 a symbol argument consisting of the letter 'c' or 'a' (for control or audio) followed by the bus's index.
325 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:
327 ## add actions: || table::
328 ## 0 || add the new node to the the head of the group specified by the add target ID.
329 ## 1 || add the new node to the the tail of the group specified by the add target ID.
330 ## 2 || add the new node just before the node specified by the add target ID.
331 ## 3 || add the new node just after the node specified by the add target ID.
332 ## 4 || the new node replaces the node specified by the add target ID. The target node is freed.
335 Controls may be set when creating the synth. The control arguments are the same as for the n_set command.
337 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::.
339 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.
341 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.
343 subsection:: /s_get - get control value(s)
345 ## strong::int:: || synth ID
346 ## N * strong::int:: or strong::string:: || a control index or name
349 Replies to sender with the corresponding strong::/n_set:: command.
351 subsection:: /s_getn - get ranges of control value(s)
353 ## strong::int:: || synth ID
355 ## strong::int:: or strong::string:: || a control index or name
356 ## strong::int:: || number of sequential controls to get (M)
359 Get contiguous ranges of controls. Replies to sender with the corresponding strong::/n_setn:: command.
361 subsection:: /s_noid - auto-reassign synth's ID to a reserved value
363 ## N * strong::int:: || synth IDs
366 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.
368 section:: Group Commands
370 subsection:: /g_new - create a new group
373 ## strong::int:: || new group ID
374 ## strong::int:: || add action (0,1,2, 3 or 4 see below)
375 ## strong::int:: || add target ID
379 Create a new group and add it to the tree of nodes.
380 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::):
382 ## add actions: || table::
383 ## 0 || add the new group to the the head of the group specified by the add target ID.
384 ## 1 || add the new group to the the tail of the group specified by the add target ID.
385 ## 2 || add the new group just before the node specified by the add target ID.
386 ## 3 || add the new group just after the node specified by the add target ID.
387 ## 4 || the new node replaces the node specified by the add target ID. The target node is freed.
390 Multiple groups may be created in one command by adding arguments.
392 subsection:: /p_new - create a new parallel group
395 ## strong::int:: || new group ID
396 ## strong::int:: || add action (0,1,2, 3 or 4 see below)
397 ## strong::int:: || add target ID
400 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.
401 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::):
403 ## add actions: || table::
404 ## 0 || add the new group to the the head of the group specified by the add target ID.
405 ## 1 || add the new group to the the tail of the group specified by the add target ID.
406 ## 2 || add the new group just before the node specified by the add target ID.
407 ## 3 || add the new group just after the node specified by the add target ID.
408 ## 4 || the new node replaces the node specified by the add target ID. The target node is freed.
411 Multiple groups may be created in one command by adding arguments.
413 subsection:: /g_head - add node to head of group
416 ## strong::int:: || group ID
417 ## strong::int:: || node ID
421 Adds the node to the head (first to be executed) of the group.
423 subsection:: /g_tail - add node to tail of group
426 ## strong::int:: || group ID
427 ## strong::int:: || node ID
430 Adds the node to the tail (last to be executed) of the group.
432 subsection:: /g_freeAll - delete all nodes in a group.
434 ## N * strong::int:: || group ID(s)
436 Frees all nodes in the group. A list of groups may be specified.
438 subsection:: /g_deepFree - free all synths in this group and all its sub-groups.
440 ## N * strong::int:: || group ID(s)
442 Traverses all groups below this group and frees all the synths. Sub-groups are not freed. A list of groups may be specified.
444 subsection:: /g_dumpTree - post a representation of this group's node subtree.
447 ## strong::int:: || group ID
448 ## strong::int:: || flag; if not 0 the current control (arg) values for synths will be posted
452 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.
454 subsection:: /g_queryTree - get a representation of this group's node subtree.
457 ## strong::int:: || group ID
458 ## strong::int:: || flag: if not 0 the current control (arg) values for synths will be included
461 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:
463 ## strong::int:: || flag: if synth control values are included 1, else 0
464 ## strong::int:: || node ID of the requested group
465 ## strong::int:: || number of child nodes contained within the requested group
466 ## then for each node in the subtree: || table::
467 ## strong::int:: || node ID
468 ## strong::int:: || number of child nodes contained within this node. If -1 this is a synth, if >=0 it's a group
469 ## then, if this node is a synth:
470 ## strong::symbol:: || the SynthDef name for this node.
471 ## then, if flag (see above) is true:
472 ## strong::int:: || numControls for this synth (M)
474 ## strong::symbol:: or strong::int:: || control name or index
475 ## strong::float:: or strong::symbol:: || value or control bus mapping symbol (e.g. 'c1')
480 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.
482 section:: Unit Generator Commands
484 subsection:: /u_cmd - send a command to a unit generator
486 ## strong::int:: || node ID
487 ## strong::int:: || unit generator index
488 ## strong::string:: || command name
489 ## strong::...:: || any arguments
491 Sends all arguments following the command name to the unit generator to be performed. Commands are defined by unit generator plug ins.
493 section:: Buffer Commands
495 Buffers are stored in a global array, indexed by integers starting at zero.
497 subsection:: /b_alloc - allocate buffer space.
499 ## strong::int:: || buffer number
500 ## strong::int:: || number of frames
501 ## strong::int:: || number of channels (optional. default = 1 channel)
502 ## strong::bytes:: || an OSC message to execute upon completion. (optional)
504 Allocates zero filled buffer to number of channels and samples.
506 ## Asynchronous. || Replies to sender with strong::/done:: when complete.
509 subsection:: /b_allocRead - allocate buffer space and read a sound file.
511 ## strong::int:: || buffer number
512 ## strong::string:: || path name of a sound file.
513 ## strong::int:: || starting frame in file (optional. default = 0)
514 ## strong::int:: || number of frames to read (optional. default = 0, see below)
515 ## strong::bytes:: || an OSC message to execute upon completion. (optional)
517 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.
519 ## Asynchronous. || Replies to sender with strong::/done:: when complete.
522 subsection:: /b_allocReadChannel - allocate buffer space and read channels from a sound file.
524 ## strong::int:: || buffer number
525 ## strong::string:: || path name of a sound file
526 ## strong::int:: || starting frame in file
527 ## strong::int:: || number of frames to read
530 ## strong::int:: || source file channel index
532 ## strong::bytes:: || an OSC message to execute upon completion. (optional)
535 As b_allocRead, but reads individual channels into the allocated buffer in the order specified.
537 ## Asynchronous. || Replies to sender with strong::/done:: when complete.
541 subsection:: /b_read - read sound file data into an existing buffer.
543 ## strong::int:: || buffer number
544 ## strong::string:: || path name of a sound file.
545 ## strong::int:: || starting frame in file (optional. default = 0)
546 ## strong::int:: || number of frames to read (optional. default = -1, see below)
547 ## strong::int:: || starting frame in buffer (optional. default = 0)
548 ## strong::int:: || leave file open (optional. default = 0)
549 ## strong::bytes:: || an OSC message to execute upon completion. (optional)
551 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.
552 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.
554 ## Asynchronous. || Replies to sender with strong::/done:: when complete.
558 subsection:: /b_readChannel - read sound file channel data into an existing buffer
560 ## strong::int:: || buffer number
561 ## strong::string:: || path name of a sound file
562 ## strong::int:: || starting frame in file
563 ## strong::int:: || number of frames to read
564 ## strong::int:: || starting frame in buffer
565 ## strong::int:: || leave file open
568 ## strong::int:: || source file channel index
570 ## strong::bytes:: || completion message
573 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.
575 ## Asynchronous. || Replies to sender with strong::/done:: when complete.
579 subsection:: /b_write - write sound file data.
581 ## strong::int:: || buffer number
582 ## strong::string:: || path name of a sound file.
583 ## strong::string:: || header format.
584 ## strong::string:: || sample format.
585 ## strong::int:: || number of frames to write (optional. default = -1, see below)
586 ## strong::int:: || starting frame in buffer (optional. default = 0)
587 ## strong::int:: || leave file open (optional. default = 0)
588 ## strong::bytes:: || an OSC message to execute upon completion. (optional)
591 Write a buffer as a sound file.
593 ## Header format is one of: || "aiff", "next", "wav", "ircam"", "raw"
594 ## Sample format is one of: || "int8", "int16", "int24", "int32", "float", "double", "mulaw", "alaw"
596 Not all combinations of header format and sample format are possible.
597 If number of frames is less than zero, all samples from the starting frame to the end of the buffer are written.
598 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.
600 ## Asynchronous. || Replies to sender with strong::/done:: when complete.
604 subsection:: /b_free - free buffer data.
606 ## strong::int:: || buffer number
607 ## strong::bytes:: || an OSC message to execute upon completion. (optional)
609 Frees buffer space allocated for this buffer.
611 ## Asynchronous. || Replies to sender with strong::/done:: when complete.
615 subsection:: /b_zero - zero sample data
617 ## strong::int:: || buffer number
618 ## strong::bytes:: || an OSC message to execute upon completion. (optional)
620 Sets all samples in the buffer to zero.
622 ## Asynchronous. || Replies to sender with strong::/done:: when complete.
626 subsection:: /b_set - set sample value(s)
628 ## strong::int:: || buffer number
630 ## strong::int:: || a sample index
631 ## strong::float:: || a sample value
634 Takes a list of pairs of sample indices and values and sets the samples to those values.
636 subsection:: /b_setn - set ranges of sample value(s)
638 ## strong::int:: || buffer number
640 ## strong::int:: || sample starting index
641 ## strong::int:: || number of sequential samples to change (M)
642 ## M * strong::float:: || a sample value
645 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.
647 subsection:: /b_fill - fill ranges of sample value(s)
649 ## strong::int:: || buffer number
651 ## strong::int:: || sample starting index
652 ## strong::int:: || number of samples to fill (M)
653 ## strong::float:: || value
656 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.
659 subsection:: /b_gen - call a command to fill a buffer
661 ## strong::int:: || buffer number
662 ## strong::string:: || command name
663 ## strong::...:: || command arguments
665 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.
667 ## Asynchronous. || Replies to sender with strong::/done:: when complete.
671 subsection:: /b_close - close soundfile
673 ## strong::int:: || buffer number
675 After using a buffer with link::Classes/DiskOut::, close the soundfile and write header information.
677 ## Asynchronous. || Replies to sender with strong::/done:: when complete.
681 subsection:: /b_query - get buffer info
683 ## N * strong::int:: || buffer number(s)
686 Responds to the sender with a strong::/b_info:: message. The arguments to /b_info are as follows:
689 ## strong::int:: || buffer number
690 ## strong::int:: || number of frames
691 ## strong::int:: || number of channels
692 ## strong::float:: || sample rate
696 subsection:: /b_get - get sample value(s)
698 ## strong::int:: || buffer number
699 ## N * strong::int:: || a sample index
702 Replies to sender with the corresponding strong::/b_set:: command.
704 subsection:: /b_getn - get ranges of sample value(s)
706 ## strong::int:: || buffer number
708 ## strong::int:: || starting sample index
709 ## strong::int:: || number of sequential samples to get (M)
713 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.
716 section:: Control Bus Commands
718 subsection:: /c_set - set bus value(s)
721 ## strong::int:: || a bus index
722 ## strong::float:: or strong::int:: || a control value
725 Takes a list of pairs of bus indices and values and sets the buses to those values.
727 subsection:: /c_setn - set ranges of bus value(s)
730 ## strong::int:: || starting bus index
731 ## strong::int:: || number of sequential buses to change (M)
733 ## strong::float:: or strong::int:: || a control value
737 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.
739 subsection:: /c_fill - fill ranges of bus value(s)
742 ## strong::int:: || starting bus index
743 ## strong::int:: || number of buses to fill (M)
744 ## strong::float:: or strong::int:: || value
747 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.
749 subsection:: /c_get - get bus value(s)
751 ## N * strong::int:: || a bus index
753 Takes a list of buses and replies to sender with the corresponding strong::/c_set:: command.
755 subsection:: /c_getn - get ranges of bus value(s)
758 ## strong::int:: || starting bus index
759 ## strong::int:: || number of sequential buses to get (M)
762 Get contiguous ranges of buses. Replies to sender with the corresponding strong::/c_setn:: command.
765 section:: Non Real Time Mode Commands
767 subsection:: /nrt_end - end real time mode, close file
770 This message should be sent in a bundle in non real time mode.
771 The bundle timestamp will establish the ending time of the file.
772 This command will end non real time mode and close the sound file.
773 Replies to sender with strong::/done:: when complete.
776 section:: Replies to Commands
778 These messages are sent by the server in reponse to some commands.
780 subsection:: /done - an asynchronous message has completed.
782 ## strong::string:: || the name of the command
784 Sent in response to all asynchronous commands. Sent only to the sender of the original message.
786 subsection:: /fail - an error occurred.
788 ## strong::string:: || the name of the command
789 ## strong::string:: || the error message.
791 There was a problem. Sent only to the sender of the original message.
793 subsection:: /late - a command was received too late.
796 ## strong::int:: || the high 32 bits of the original time stamp.
797 ## strong::int:: || the low 32 bits of the original time stamp.
798 ## strong::int:: || the high 32 bits of the time it was executed.
799 ## strong::int:: || the low 32 bits of the time it was executed.
801 The command was received too late to be executed on time. Sent only to the sender of the original message.
803 section:: Node Notifications from Server
805 These messages are sent as notification of some event to all clients who have registered via the strong::/notify:: command.
807 All of these have the same arguments:
809 ## strong::int:: || node ID
810 ## strong::int:: || the node's parent group ID
811 ## strong::int:: || previous node ID, -1 if no previous node.
812 ## strong::int:: || next node ID, -1 if no next node.
813 ## strong::int:: || 1 if the node is a group, 0 if it is a synth
814 ## The following two arguments are only sent if the node is a group:
815 ## strong::int:: || the ID of the head node, -1 if there is no head node.
816 ## strong::int:: || the ID of the tail node, -1 if there is no tail node.
819 subsection:: /n_go - a node was started
820 This command is sent to all registered clients when a node is created.
822 subsection:: /n_end - a node ended
823 This command is sent to all registered clients when a node ends and is deallocated.
825 subsection:: /n_off - a node was turned off
826 This command is sent to all registered clients when a node is turned off.
828 subsection:: /n_on - a node was turned on
829 This command is sent to all registered clients when a node is turned on.
831 subsection:: /n_move - a node was moved
832 This command is sent to all registered clients when a node is moved.
834 subsection:: /n_info - reply to /n_query
835 This command is sent to all registered clients in response to an strong::/n_query:: command.
838 section:: Trigger Notification
839 These messages are sent as notification of some event to all clients who have registered via the strong::/notify:: command.
841 subsection:: /tr - a trigger message
843 ## strong::int:: || node ID
844 ## strong::int:: || trigger ID
845 ## strong::float:: || trigger value
847 This command is the mechanism that synths can use to trigger events in clients.
848 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.
851 section:: Buffer Fill Commands
853 These are the currently defined fill routines for use with the strong::/b_gen:: command.
855 subsection:: Wave Fill Commands
857 There are three defined fill routines for sine waves.
859 The flags are defined as follows:
861 ## 1 || normalize - Normalize peak amplitude of wave to 1.0.
862 ## 2 || wavetable - If set, then the buffer is written in wavetable format so that it can be read by interpolating oscillators.
863 ## 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.
869 ## strong::int:: || flags, see above
871 ## strong::float:: || partial amplitude
874 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.
878 ## strong::int:: || flags, see above
880 ## strong::float:: || partial frequency (in cycles per buffer)
881 ## strong::float:: || partial amplitude
884 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.
888 ## strong::int:: || flags, see above
890 ## strong::float:: || partial frequency (in cycles per buffer)
891 ## strong::float:: || partial amplitude
892 ## strong::float:: || partial phase
895 Similar to sine2 except that each partial may have a nonzero starting phase.
899 ## strong::int:: || flags, see above
901 ## strong::float:: || amplitude
904 Fills a buffer with a series of chebyshev polynomials, which can be defined as:
906 cheby(n) = amplitude * cos(n * acos(x))
908 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.
911 subsection:: Other Commands
916 ## strong::int:: || sample position in destination
917 ## strong::int:: || source buffer number
918 ## strong::int:: || sample position in source
919 ## strong::int:: || number of samples to copy
921 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.
923 ## Asynchronous. || Replies to sender with strong::/done:: when complete.
928 section:: Command Numbers
930 These are the currently defined command numbers. More may be added to the end of the list in the future.
970 cmd_b_allocRead = 29,
1003 cmd_b_allocReadChannel = 54,
1004 cmd_b_readChannel = 55,
1006 cmd_g_dumpTree = 56,
1007 cmd_g_queryTree = 57,
1018 NUMBER_OF_COMMANDS = 63
1022 copyright © 2002 James McCartney
1024 soft::converted to ScDoc format 2011 by Jonatan Liljedahl::