hsc3-0.11: Haskell SuperCollider

Sound.SC3.Server.Command

Contents

Description

Constructors for the command set implemented by the SuperCollider synthesis server.

Synopsis

Instrument definition commands

d_recv :: Synthdef -> OSCSource

Install a bytecode instrument definition. (Asynchronous)

d_load :: String -> OSCSource

Load an instrument definition from a named file. (Asynchronous)

d_loadDir :: String -> OSCSource

Load a directory of instrument definitions files. (Asynchronous)

d_free :: [String] -> OSCSource

Remove definition once all nodes using it have ended.

Node commands

n_after :: [(Int, Int)] -> OSCSource

Place a node after another.

n_before :: [(Int, Int)] -> OSCSource

Place a node before another.

n_fill :: Int -> [(String, Int, Double)] -> OSCSource

Fill ranges of a node's control values.

n_free :: [Int] -> OSCSource

Delete a node.

n_map :: Int -> [(String, Int)] -> OSCSource

Map a node's controls to read from a bus.

n_mapn :: Int -> [(String, Int, Int)] -> OSCSource

Map a node's controls to read from buses.

n_mapa :: Int -> [(String, Int)] -> OSCSource

Map a node's controls to read from an audio bus.

n_mapan :: Int -> [(String, Int, Int)] -> OSCSource

Map a node's controls to read from audio buses.

n_query :: [Int] -> OSCSource

Get info about a node.

n_run :: [(Int, Bool)] -> OSCSource

Turn node on or off.

n_set :: Int -> [(String, Double)] -> OSCSource

Set a node's control values.

n_setn :: Int -> [(String, [Double])] -> OSCSource

Set ranges of a node's control values.

n_trace :: [Int] -> OSCSource

Trace a node.

n_order :: AddAction -> Int -> [Int] -> OSCSource

Move an ordered sequence of nodes.

Synthesis node commands

s_get :: Int -> [String] -> OSCSource

Get control values.

s_getn :: Int -> [(String, Int)] -> OSCSource

Get ranges of control values.

data AddAction Source

Enumeration of possible locations to add new nodes (s_new and g_new).

s_new :: String -> Int -> AddAction -> Int -> [(String, Double)] -> OSCSource

Create a new synth.

s_noid :: [Int] -> OSCSource

Auto-reassign synth's ID to a reserved value.

Group node commands

g_deepFree :: [Int] -> OSCSource

Free all synths in this group and all its sub-groups.

g_freeAll :: [Int] -> OSCSource

Delete all nodes in a group.

g_head :: [(Int, Int)] -> OSCSource

Add node to head of group.

g_new :: [(Int, AddAction, Int)] -> OSCSource

Create a new group.

g_tail :: [(Int, Int)] -> OSCSource

Add node to tail of group.

g_dumpTree :: [(Int, Bool)] -> OSCSource

Post a representation of a group's node subtree, optionally including the current control values for synths.

g_queryTree :: [(Int, Bool)] -> OSCSource

Request a representation of a group's node subtree, optionally including the current control values for synths.

Replies to the sender with a /g_queryTree.reply message listing all of the nodes contained within the group in the following format:

 int - if synth control values are included 1, else 0
 int - node ID of the requested group
 int - number of child nodes contained within the requested group

 For each node in the subtree:
 [
   int - node ID
   int - number of child nodes contained within this node. If -1 this is a synth, if >= 0 it's a group.

   If this node is a synth:
     symbol - the SynthDef name for this node.

   If flag (see above) is true:
     int - numControls for this synth (M)
     [
       symbol or int: control name or index
       float or symbol: value or control bus mapping symbol (e.g. 'c1')
     ] * M
 ] * the number of nodes in the subtree

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.

p_new :: [(Int, AddAction, Int)] -> OSCSource

Create a new parallel group (supernova specific).

Plugin commands

cmd :: String -> [Datum] -> OSCSource

Send a plugin command.

Unit Generator commands

u_cmd :: Int -> Int -> String -> [Datum] -> OSCSource

Send a command to a unit generator.

Buffer commands

b_alloc :: Int -> Int -> Int -> OSCSource

Allocates zero filled buffer to number of channels and samples. (Asynchronous)

b_allocRead :: Int -> String -> Int -> Int -> OSCSource

Allocate buffer space and read a sound file. (Asynchronous)

b_allocReadChannel :: Int -> String -> Int -> Int -> [Int] -> OSCSource

Allocate buffer space and read a sound file, picking specific channels. (Asynchronous)

b_close :: Int -> OSCSource

Close attached soundfile and write header information. (Asynchronous)

b_fill :: Int -> [(Int, Int, Double)] -> OSCSource

Fill ranges of sample values.

b_free :: Int -> OSCSource

Free buffer data. (Asynchronous)

b_gen :: Int -> String -> [Double] -> OSCSource

Call a command to fill a buffer. (Asynchronous)

b_get :: Int -> [Int] -> OSCSource

Get sample values.

b_getn :: Int -> [(Int, Int)] -> OSCSource

Get ranges of sample values.

b_query :: [Int] -> OSCSource

Request /b_info messages.

b_read :: Int -> String -> Int -> Int -> Int -> Bool -> OSCSource

Read sound file data into an existing buffer. (Asynchronous)

b_readChannel :: Int -> String -> Int -> Int -> Int -> Bool -> [Int] -> OSCSource

Read sound file data into an existing buffer, picking specific channels. (Asynchronous)

b_set :: Int -> [(Int, Double)] -> OSCSource

Set sample values.

b_setn :: Int -> [(Int, [Double])] -> OSCSource

Set ranges of sample values.

b_write :: Int -> String -> String -> String -> Int -> Int -> Bool -> OSCSource

Write sound file data. (Asynchronous)

b_zero :: Int -> OSCSource

Zero sample data. (Asynchronous)

Control bus commands

c_fill :: [(Int, Int, Double)] -> OSCSource

Fill ranges of bus values.

c_get :: [Int] -> OSCSource

Get bus values.

c_getn :: [(Int, Int)] -> OSCSource

Get ranges of bus values.

c_set :: [(Int, Double)] -> OSCSource

Set bus values.

c_setn :: [(Int, [Double])] -> OSCSource

Set ranges of bus values.

Server operation commands

clearSched :: OSCSource

Remove all bundles from the scheduling queue.

data PrintLevel Source

Enumeration of OSC printer types.

dumpOSC :: PrintLevel -> OSCSource

Select printing of incoming Open Sound Control messages.

notify :: Bool -> OSCSource

Select reception of notification messages. (Asynchronous)

quit :: OSCSource

Stop synthesis server.

status :: OSCSource

Request /status.reply message.

sync :: Int -> OSCSource

Request /synced message when all current asynchronous commands complete.

data ErrorScope Source

Error posting scope.

Constructors

Globally

Global scope

Locally

Bundle scope

data ErrorMode Source

Error posting mode.

Constructors

ErrorsOff

Turn error posting off

ErrorsOn

Turn error posting on

errorMode :: ErrorScope -> ErrorMode -> OSCSource

Set error posting scope and mode.

Variants to simplify common cases

b_alloc_setn1 :: Int -> Int -> [Double] -> OSCSource

Pre-allocate for b_setn1, values preceding offset are zeroed.

b_set1 :: Int -> Int -> Double -> OSCSource

Set single sample value.

b_setn1 :: Int -> Int -> [Double] -> OSCSource

Set a range of sample values.

c_set1 :: Int -> Double -> OSCSource

Set single bus values.

n_set1 :: Int -> String -> Double -> OSCSource

Set a signle node control value.

Modify existing message to include completion message

async_cmds :: [String]Source

List of asynchronous server commands.

isAsync :: OSC -> BoolSource

True if OSC is an asynchronous Message.

withCM :: OSC -> OSC -> OSCSource

Add a completion message to an existing asynchronous command.