1 title:: Server Command Reference
2 summary:: SuperCollider Server Synth Engine Command Reference
3 categories:: Server>Architecture, OpenSoundControl
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.
133 subsection:: /d_loadDir - load a directory of synth definitions
135 ## strong::string:: || pathname of directory.
136 ## strong::bytes:: || an OSC message to execute upon completion. (optional)
138 Loads a directory of synth definitions files. Resident definitions with the same names are overwritten.
141 ## Asynchronous. || Replies to sender with strong::/done:: when complete.
144 subsection:: /d_free - delete synth definition
146 ## N * strong::string:: || synth def name
149 Removes a synth definition. The definition is removed immediately, and does not wait for synth nodes based on that definition to end.
151 section:: Node Commands
153 subsection:: /n_free - delete a node.
155 ## N * strong::int:: || node ID
158 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.
160 subsection:: /n_run - turn node on or off
163 ## strong::int:: || node ID
164 ## strong::int:: || run flag
168 ## If the run flag set to zero then the node will not be executed.
169 ## If the run flag is set back to one, then it will be executed.
171 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.
173 subsection:: /n_set - set a node's control value(s)
175 ## strong::int:: || node ID
177 ## strong::int:: or strong::string:: || a control index or name
178 ## strong::float:: or strong::int:: || a control value
182 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.
184 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).
186 subsection:: /n_setn - set ranges of a node's control value(s)
189 ## strong::int:: || node ID
191 ## strong::int:: or strong::string:: || a control index or name
192 ## strong::int:: || number of sequential controls to change (M)
193 ## M * strong::float:: or strong::int:: || control value(s)
197 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.
199 subsection:: /n_fill - fill ranges of a node's control value(s)
201 ## strong::int:: || node ID
203 ## strong::int:: or strong::string:: || a control index or name
204 ## strong::int:: || number of values to fill (M)
205 ## strong::float:: or strong::int:: || value
209 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.
211 subsection:: /n_map - map a node's controls to read from a bus
213 ## strong::int:: || node ID
215 ## strong::int:: or strong::string:: || a control index or name
216 ## strong::int:: || control bus index
220 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.
222 subsection:: /n_mapn - map a node's controls to read from buses
224 ## strong::int:: || node ID
226 ## strong::int:: or strong::string:: || a control index or name
227 ## strong::int:: || control bus index
228 ## strong::int:: || number of controls to map
232 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.
234 subsection:: /n_mapa - map a node's controls to read from an audio bus
236 ## strong::int:: || node ID
238 ## strong::int:: or strong::string:: || a control index or name
239 ## strong::int:: || control bus index
243 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.
245 subsection:: /n_mapan - map a node's controls to read from audio buses
247 ## strong:: int:: || node ID
249 ## strong::int:: or strong::string:: || a control index or name
250 ## strong::int:: || control bus index
251 ## strong::int:: || number of controls to map
255 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.
257 subsection:: /n_before - place a node before another
260 ## strong::int:: || the ID of the node to place (A)
261 ## strong::int:: || the ID of the node before which the above is placed (B)
264 Places node A in the same group as node B, to execute immediately before node B.
266 subsection:: /n_after || place a node after another
269 ## strong::int:: || the ID of the node to place (A)
270 ## strong::int:: || the ID of the node after which the above is placed (B)
273 Places node A in the same group as node B, to execute immediately after node B.
275 subsection:: /n_query - get info about a node
277 ## N * strong::int:: || node ID
279 The server sends an /n_info message for each node to registered clients.
280 See Node Notifications below for the format of the /n_info message.
282 subsection:: /n_trace - trace a node
284 ## N * strong::int:: || node IDs
287 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.
289 subsection:: /n_order - move and order a list of nodes
291 ## strong::int:: || add action (0,1,2, 3 or 4 see below)
292 ## strong::int:: || add target ID
293 ## N * strong::int:: || node IDs
296 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.
298 ## add actions: || table::
299 ## 0 || construct the node order at the head of the group specified by the add target ID.
300 ## 1 || construct the node order at the tail of the group specified by the add target ID.
301 ## 2 || construct the node order just before the node specified by the add target ID.
302 ## 3 || construct the node order just after the node specified by the add target ID.
306 section:: Synth Commands
308 subsection:: /s_new - create a new synth
310 ## strong::string:: || synth definition name
311 ## strong::int:: || synth ID
312 ## strong::int:: || add action (0,1,2, 3 or 4 see below)
313 ## strong::int:: || add target ID
315 ## strong::int:: or strong::string:: || a control index or name
316 ## strong::float:: or strong::int:: or strong::string::|| floating point and integer arguments are interpreted as control value.
317 a symbol argument consisting of the letter 'c' or 'a' (for control or audio) followed by the bus's index.
321 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:
323 ## add actions: || table::
324 ## 0 || add the new node to the the head of the group specified by the add target ID.
325 ## 1 || add the new node to the the tail of the group specified by the add target ID.
326 ## 2 || add the new node just before the node specified by the add target ID.
327 ## 3 || add the new node just after the node specified by the add target ID.
328 ## 4 || the new node replaces the node specified by the add target ID. The target node is freed.
331 Controls may be set when creating the synth. The control arguments are the same as for the n_set command.
333 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::.
335 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.
337 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.
339 subsection:: /s_get - get control value(s)
341 ## strong::int:: || synth ID
342 ## N * strong::int:: or strong::string:: || a control index or name
345 Replies to sender with the corresponding strong::/n_set:: command.
347 subsection:: /s_getn - get ranges of control value(s)
349 ## strong::int:: || synth ID
351 ## strong::int:: or strong::string:: || a control index or name
352 ## strong::int:: || number of sequential controls to get (M)
355 Get contiguous ranges of controls. Replies to sender with the corresponding strong::/n_setn:: command.
357 subsection:: /s_noid - auto-reassign synth's ID to a reserved value
359 ## N * strong::int:: || synth IDs
362 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.
364 section:: Group Commands
366 subsection:: /g_new - create a new group
369 ## strong::int:: || new group ID
370 ## strong::int:: || add action (0,1,2, 3 or 4 see below)
371 ## strong::int:: || add target ID
375 Create a new group and add it to the tree of nodes.
376 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::):
378 ## add actions: || table::
379 ## 0 || add the new group to the the head of the group specified by the add target ID.
380 ## 1 || add the new group to the the tail of the group specified by the add target ID.
381 ## 2 || add the new group just before the node specified by the add target ID.
382 ## 3 || add the new group just after the node specified by the add target ID.
383 ## 4 || the new node replaces the node specified by the add target ID. The target node is freed.
386 Multiple groups may be created in one command by adding arguments.
388 subsection:: /p_new - create a new parallel group
391 ## strong::int:: || new group ID
392 ## strong::int:: || add action (0,1,2, 3 or 4 see below)
393 ## strong::int:: || add target ID
396 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.
397 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::):
399 ## add actions: || table::
400 ## 0 || add the new group to the the head of the group specified by the add target ID.
401 ## 1 || add the new group to the the tail of the group specified by the add target ID.
402 ## 2 || add the new group just before the node specified by the add target ID.
403 ## 3 || add the new group just after the node specified by the add target ID.
404 ## 4 || the new node replaces the node specified by the add target ID. The target node is freed.
407 Multiple groups may be created in one command by adding arguments.
409 subsection:: /g_head - add node to head of group
412 ## strong::int:: || group ID
413 ## strong::int:: || node ID
417 Adds the node to the head (first to be executed) of the group.
419 subsection:: /g_tail - add node to tail of group
422 ## strong::int:: || group ID
423 ## strong::int:: || node ID
426 Adds the node to the tail (last to be executed) of the group.
428 subsection:: /g_freeAll - delete all nodes in a group.
430 ## N * strong::int:: || group ID(s)
432 Frees all nodes in the group. A list of groups may be specified.
434 subsection:: /g_deepFree - free all synths in this group and all its sub-groups.
436 ## N * strong::int:: || group ID(s)
438 Traverses all groups below this group and frees all the synths. Sub-groups are not freed. A list of groups may be specified.
440 subsection:: /g_dumpTree - post a representation of this group's node subtree.
443 ## strong::int:: || group ID
444 ## strong::int:: || flag; if not 0 the current control (arg) values for synths will be posted
448 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.
450 subsection:: /g_queryTree - get a representation of this group's node subtree.
453 ## strong::int:: || group ID
454 ## strong::int:: || flag: if not 0 the current control (arg) values for synths will be included
457 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:
459 ## strong::int:: || flag: if synth control values are included 1, else 0
460 ## strong::int:: || node ID of the requested group
461 ## strong::int:: || number of child nodes contained within the requested group
462 ## then for each node in the subtree: || table::
463 ## strong::int:: || node ID
464 ## strong::int:: || number of child nodes contained within this node. If -1 this is a synth, if >=0 it's a group
465 ## then, if this node is a synth:
466 ## strong::symbol:: || the SynthDef name for this node.
467 ## then, if flag (see above) is true:
468 ## strong::int:: || numControls for this synth (M)
470 ## strong::symbol:: or strong::int:: || control name or index
471 ## strong::float:: or strong::symbol:: || value or control bus mapping symbol (e.g. 'c1')
476 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.
478 section:: Unit Generator Commands
480 subsection:: /u_cmd - send a command to a unit generator
482 ## strong::int:: || node ID
483 ## strong::int:: || unit generator index
484 ## strong::string:: || command name
485 ## strong::...:: || any arguments
487 Sends all arguments following the command name to the unit generator to be performed. Commands are defined by unit generator plug ins.
489 section:: Buffer Commands
491 Buffers are stored in a global array, indexed by integers starting at zero.
493 subsection:: /b_alloc - allocate buffer space.
495 ## strong::int:: || buffer number
496 ## strong::int:: || number of frames
497 ## strong::int:: || number of channels (optional. default = 1 channel)
498 ## strong::bytes:: || an OSC message to execute upon completion. (optional)
500 Allocates zero filled buffer to number of channels and samples.
502 ## Asynchronous. || Replies to sender with strong::/done:: when complete.
505 subsection:: /b_allocRead - allocate buffer space and read a sound file.
507 ## strong::int:: || buffer number
508 ## strong::string:: || path name of a sound file.
509 ## strong::int:: || starting frame in file (optional. default = 0)
510 ## strong::int:: || number of frames to read (optional. default = 0, see below)
511 ## strong::bytes:: || an OSC message to execute upon completion. (optional)
513 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.
515 ## Asynchronous. || Replies to sender with strong::/done:: when complete.
518 subsection:: /b_allocReadChannel - allocate buffer space and read channels from a sound file.
520 ## strong::int:: || buffer number
521 ## strong::string:: || path name of a sound file
522 ## strong::int:: || starting frame in file
523 ## strong::int:: || number of frames to read
526 ## strong::int:: || source file channel index
528 ## strong::bytes:: || an OSC message to execute upon completion. (optional)
531 As b_allocRead, but reads individual channels into the allocated buffer in the order specified.
533 ## Asynchronous. || Replies to sender with strong::/done:: when complete.
537 subsection:: /b_read - read sound file data into an existing buffer.
539 ## strong::int:: || buffer number
540 ## strong::string:: || path name of a sound file.
541 ## strong::int:: || starting frame in file (optional. default = 0)
542 ## strong::int:: || number of frames to read (optional. default = -1, see below)
543 ## strong::int:: || starting frame in buffer (optional. default = 0)
544 ## strong::int:: || leave file open (optional. default = 0)
545 ## strong::bytes:: || an OSC message to execute upon completion. (optional)
547 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.
548 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.
550 ## Asynchronous. || Replies to sender with strong::/done:: when complete.
554 subsection:: /b_readChannel - read sound file channel data into an existing buffer
556 ## strong::int:: || buffer number
557 ## strong::string:: || path name of a sound file
558 ## strong::int:: || starting frame in file
559 ## strong::int:: || number of frames to read
560 ## strong::int:: || starting frame in buffer
561 ## strong::int:: || leave file open
564 ## strong::int:: || source file channel index
566 ## strong::bytes:: || completion message
569 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.
571 ## Asynchronous. || Replies to sender with strong::/done:: when complete.
575 subsection:: /b_write - write sound file data.
577 ## strong::int:: || buffer number
578 ## strong::string:: || path name of a sound file.
579 ## strong::string:: || header format.
580 ## strong::string:: || sample format.
581 ## strong::int:: || number of frames to write (optional. default = -1, see below)
582 ## strong::int:: || starting frame in buffer (optional. default = 0)
583 ## strong::int:: || leave file open (optional. default = 0)
584 ## strong::bytes:: || an OSC message to execute upon completion. (optional)
587 Write a buffer as a sound file.
589 ## Header format is one of: || "aiff", "next", "wav", "ircam"", "raw"
590 ## Sample format is one of: || "int8", "int16", "int24", "int32", "float", "double", "mulaw", "alaw"
592 Not all combinations of header format and sample format are possible.
593 If number of frames is less than zero, all samples from the starting frame to the end of the buffer are written.
594 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.
596 ## Asynchronous. || Replies to sender with strong::/done:: when complete.
600 subsection:: /b_free - free buffer data.
602 ## strong::int:: || buffer number
603 ## strong::bytes:: || an OSC message to execute upon completion. (optional)
605 Frees buffer space allocated for this buffer.
607 ## Asynchronous. || Replies to sender with strong::/done:: when complete.
611 subsection:: /b_zero - zero sample data
613 ## strong::int:: || buffer number
614 ## strong::bytes:: || an OSC message to execute upon completion. (optional)
616 Sets all samples in the buffer to zero.
618 ## Asynchronous. || Replies to sender with strong::/done:: when complete.
622 subsection:: /b_set - set sample value(s)
624 ## strong::int:: || buffer number
626 ## strong::int:: || a sample index
627 ## strong::float:: || a sample value
630 Takes a list of pairs of sample indices and values and sets the samples to those values.
632 subsection:: /b_setn - set ranges of sample value(s)
634 ## strong::int:: || buffer number
636 ## strong::int:: || sample starting index
637 ## strong::int:: || number of sequential samples to change (M)
638 ## M * strong::float:: || a sample value
641 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.
643 subsection:: /b_fill - fill ranges of sample value(s)
645 ## strong::int:: || buffer number
647 ## strong::int:: || sample starting index
648 ## strong::int:: || number of samples to fill (M)
649 ## strong::float:: || value
652 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.
655 subsection:: /b_gen - call a command to fill a buffer
657 ## strong::int:: || buffer number
658 ## strong::string:: || command name
659 ## strong::...:: || command arguments
661 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.
663 ## Asynchronous. || Replies to sender with strong::/done:: when complete.
667 subsection:: /b_close - close soundfile
669 ## strong::int:: || buffer number
671 After using a buffer with link::Classes/DiskOut::, close the soundfile and write header information.
673 ## Asynchronous. || Replies to sender with strong::/done:: when complete.
677 subsection:: /b_query - get buffer info
679 ## N * strong::int:: || buffer number(s)
682 Responds to the sender with a strong::/b_info:: message. The arguments to /b_info are as follows:
685 ## strong::int:: || buffer number
686 ## strong::int:: || number of frames
687 ## strong::int:: || number of channels
688 ## strong::float:: || sample rate
692 subsection:: /b_get - get sample value(s)
694 ## strong::int:: || buffer number
695 ## N * strong::int:: || a sample index
698 Replies to sender with the corresponding strong::/b_set:: command.
700 subsection:: /b_getn - get ranges of sample value(s)
702 ## strong::int:: || buffer number
704 ## strong::int:: || starting sample index
705 ## strong::int:: || number of sequential samples to get (M)
709 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.
712 section:: Control Bus Commands
714 subsection:: /c_set - set bus value(s)
717 ## strong::int:: || a bus index
718 ## strong::float:: or strong::int:: || a control value
721 Takes a list of pairs of bus indices and values and sets the buses to those values.
723 subsection:: /c_setn - set ranges of bus value(s)
726 ## strong::int:: || starting bus index
727 ## strong::int:: || number of sequential buses to change (M)
729 ## strong::float:: or strong::int:: || a control value
733 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.
735 subsection:: /c_fill - fill ranges of bus value(s)
738 ## strong::int:: || starting bus index
739 ## strong::int:: || number of buses to fill (M)
740 ## strong::float:: or strong::int:: || value
743 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.
745 subsection:: /c_get - get bus value(s)
747 ## N * strong::int:: || a bus index
749 Takes a list of buses and replies to sender with the corresponding strong::/c_set:: command.
751 subsection:: /c_getn - get ranges of bus value(s)
754 ## strong::int:: || starting bus index
755 ## strong::int:: || number of sequential buses to get (M)
758 Get contiguous ranges of buses. Replies to sender with the corresponding strong::/c_setn:: command.
761 section:: Non Real Time Mode Commands
763 subsection:: /nrt_end - end real time mode, close file
766 This message should be sent in a bundle in non real time mode.
767 The bundle timestamp will establish the ending time of the file.
768 This command will end non real time mode and close the sound file.
769 Replies to sender with strong::/done:: when complete.
772 section:: Replies to Commands
774 These messages are sent by the server in reponse to some commands.
776 subsection:: /done - an asynchronous message has completed.
778 ## strong::string:: || the name of the command
780 Sent in response to all asynchronous commands. Sent only to the sender of the original message.
782 subsection:: /fail - an error occurred.
784 ## strong::string:: || the name of the command
785 ## strong::string:: || the error message.
787 There was a problem. Sent only to the sender of the original message.
789 subsection:: /late - a command was received too late.
792 ## strong::int:: || the high 32 bits of the original time stamp.
793 ## strong::int:: || the low 32 bits of the original time stamp.
794 ## strong::int:: || the high 32 bits of the time it was executed.
795 ## strong::int:: || the low 32 bits of the time it was executed.
797 The command was received too late to be executed on time. Sent only to the sender of the original message.
799 section:: Node Notifications from Server
801 These messages are sent as notification of some event to all clients who have registered via the strong::/notify:: command.
803 All of these have the same arguments:
805 ## strong::int:: || node ID
806 ## strong::int:: || the node's parent group ID
807 ## strong::int:: || previous node ID, -1 if no previous node.
808 ## strong::int:: || next node ID, -1 if no next node.
809 ## strong::int:: || 1 if the node is a group, 0 if it is a synth
810 ## The following two arguments are only sent if the node is a group:
811 ## strong::int:: || the ID of the head node, -1 if there is no head node.
812 ## strong::int:: || the ID of the tail node, -1 if there is no tail node.
815 subsection:: /n_go - a node was started
816 This command is sent to all registered clients when a node is created.
818 subsection:: /n_end - a node ended
819 This command is sent to all registered clients when a node ends and is deallocated.
821 subsection:: /n_off - a node was turned off
822 This command is sent to all registered clients when a node is turned off.
824 subsection:: /n_on - a node was turned on
825 This command is sent to all registered clients when a node is turned on.
827 subsection:: /n_move - a node was moved
828 This command is sent to all registered clients when a node is moved.
830 subsection:: /n_info - reply to /n_query
831 This command is sent to all registered clients in response to an strong::/n_query:: command.
834 section:: Trigger Notification
835 These messages are sent as notification of some event to all clients who have registered via the strong::/notify:: command.
837 subsection:: /tr - a trigger message
839 ## strong::int:: || node ID
840 ## strong::int:: || trigger ID
841 ## strong::float:: || trigger value
843 This command is the mechanism that synths can use to trigger events in clients.
844 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.
847 section:: Buffer Fill Commands
849 These are the currently defined fill routines for use with the strong::/b_gen:: command.
851 subsection:: Wave Fill Commands
853 There are three defined fill routines for sine waves.
855 The flags are defined as follows:
857 ## 1 || normalize - Normalize peak amplitude of wave to 1.0.
858 ## 2 || wavetable - If set, then the buffer is written in wavetable format so that it can be read by interpolating oscillators.
859 ## 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.
865 ## strong::int:: || flags, see above
867 ## strong::float:: || partial amplitude
870 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.
874 ## strong::int:: || flags, see above
876 ## strong::float:: || partial frequency (in cycles per buffer)
877 ## strong::float:: || partial amplitude
880 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.
884 ## strong::int:: || flags, see above
886 ## strong::float:: || partial frequency (in cycles per buffer)
887 ## strong::float:: || partial amplitude
888 ## strong::float:: || partial phase
891 Similar to sine2 except that each partial may have a nonzero starting phase.
895 ## strong::int:: || flags, see above
897 ## strong::float:: || amplitude
900 Fills a buffer with a series of chebyshev polynomials, which can be defined as:
902 cheby(n) = amplitude * cos(n * acos(x))
904 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.
907 subsection:: Other Commands
912 ## strong::int:: || sample position in destination
913 ## strong::int:: || source buffer number
914 ## strong::int:: || sample position in source
915 ## strong::int:: || number of samples to copy
917 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.
919 ## Asynchronous. || Replies to sender with strong::/done:: when complete.
924 section:: Command Numbers
926 These are the currently defined command numbers. More may be added to the end of the list in the future.
966 cmd_b_allocRead = 29,
999 cmd_b_allocReadChannel = 54,
1000 cmd_b_readChannel = 55,
1002 cmd_g_dumpTree = 56,
1003 cmd_g_queryTree = 57,
1014 NUMBER_OF_COMMANDS = 63
1018 copyright © 2002 James McCartney
1020 soft::converted to ScDoc format 2011 by Jonatan Liljedahl::