Module sorceress::server [−][src]
An OSC interface to SuperCollider.
This module provides a low level interface for interacting with the SuperCollider server using the Open Sound Control (OSC) protocol. The primary components provided by this module are:
- The
Server
type - A SuperCollider server client. Handles communication with a server, including converting messages to and from OSC. - The command structs and the
Command
trait - The SuperCollider server is controlled by sending it command messages. This module provides a struct for every command recognized by SuperCollider. All of these commands structs implement theCommand
trait which theServer::send
method accepts as an argument. - The async commands and the
AsyncCommand
trait - Many commands are not immediately processed by SuperCollider but are instead handled by a background thread so that they do not steal CPU time from the main audio synthesis thread. These commands send a reply back to the client when the complete. These commands all contain the word Asynchronous in their documentation and implement theAsyncCommand
trait in addition to theCommand
trait. This trait allows commands to be used with theServer::send_sync
method which blocks until the command is fully processed and the corresponding reply is received by the client. - The
Reply
type - An enum type containing all possible asynchronous replies sent by the SuperCollider server to the client.
Commands
This module provides a struct every command recognized by SuperCollider. Each command struct
provides a builder interface for creating it. The required fields for each command are given
as positional arguments to the constructor (the new
method on each type), and the optional
fields can be set using builder methods.
// Required fields let buffer_number = 1; let number_of_frames = 65536; let command = BufferAllocate::new(buffer_number, number_of_frames) // Optional field .number_of_channels(2);
Here is the full list of commands:
Note: commands that are not yet implemented will have broken links and will not render as links in a web browser.
Master Control Commands
Quit
,
Notify
,
Command
,
Sync
,
ClearSched
,
Error
,
Synth Definition Commands
Node Commmands
Synth Commands
Group Commands
Buffer Commands
BufferAllocate
,
BufferAllocateRead
,
BufferRead
,
BufferWrite
,
BufferFree
,
BufferClose
,
BufferQuery
,
Structs
BufferAllocate | Allocate buffer space. |
BufferAllocateRead | Allocate buffer space and reads a sound file. |
BufferClose | Close soundfile. |
BufferFree | Free buffer data. |
BufferInfo | Information on a specific buffer as obtained by |
BufferQuery | Get information on previously allocated buffers. |
BufferRead | Read sound file data into an existing buffer. |
BufferWrite | Write sound file data. |
Bundle | A list of commands and a time tag. |
ClearSched | Clear all scheduled bundles. |
Control | A synth control’s ID and value pair. |
ControlRange | A range of adjacent synth controls. |
Error | The error type returned by |
GroupFreeAll | Deletes all nodes in a group. |
NodeFree | Delete a node. |
NodeSet | Set a node’s control value(s). |
Notify | Register to receive notifications from server. |
Quit | Quit program. Exits the synthesis server. |
Server | A SuperCollider server. |
Sync | Notify when async commands have completed. |
SynthDefFree | Delete a synth definition. |
SynthDefRecv | Receive a synth definition file. |
SynthNew | Create a new synth. |
Enums
AddAction | An add action on the |
ControlID | An identifier for a synth definition’s control. |
ControlValue | The value of a synth definition’s control. |
HeaderFormat | An audio file header format. |
NotifySetting | A setting on |
Reply | An reply to an asynchronous command. |
SampleFormat | An audio file sample format. |
Traits
AsyncCommand | OSC commands that are executed on a background thread and send a reply back to the client when complete. |
Command | OSC commands accepted by SuperCollider. |
Type Definitions
Result | A specialized |