Safe Haskell | None |
---|---|
Language | Haskell98 |
- Buffer commands (b_)
- Control bus commands (c_)
- Instrument definition commands (d_)
- Group node commands (g_)
- Node commands (n_)
- Par commands (p_)
- Synthesis node commands (s_)
- UGen commands (u_)
- Server operation commands
- Modify existing message to include completion message
- Variants to simplify common cases
- Buffer segmentation and indices
- UGen commands.
Generic constructors for the command set implemented by the SuperCollider synthesis server.
- b_alloc :: Integral i => i -> i -> i -> Message
- b_allocRead :: Integral i => i -> String -> i -> i -> Message
- b_allocReadChannel :: Integral i => i -> String -> i -> i -> [i] -> Message
- b_close :: Integral i => i -> Message
- b_fill :: (Integral i, Real n) => i -> [(i, i, n)] -> Message
- b_free :: Integral i => i -> Message
- b_gen :: Integral i => i -> String -> [Datum] -> Message
- b_gen_sine1 :: (Integral i, Real n) => i -> [B_Gen] -> [n] -> Message
- b_gen_sine2 :: (Integral i, Real n) => i -> [B_Gen] -> [(n, n)] -> Message
- b_gen_sine3 :: (Integral i, Real n) => i -> [B_Gen] -> [(n, n, n)] -> Message
- b_gen_cheby :: (Integral i, Real n) => i -> [B_Gen] -> [n] -> Message
- b_gen_copy :: Integral i => i -> i -> i -> i -> Maybe i -> Message
- b_get :: Integral i => i -> [i] -> Message
- b_getn :: Integral i => i -> [(i, i)] -> Message
- b_query :: Integral i => [i] -> Message
- b_read :: Integral i => i -> String -> i -> i -> i -> Bool -> Message
- b_readChannel :: Integral i => i -> String -> i -> i -> i -> Bool -> [i] -> Message
- b_set :: (Integral i, Real n) => i -> [(i, n)] -> Message
- b_setn :: (Integral i, Real n) => i -> [(i, [n])] -> Message
- b_write :: Integral i => i -> String -> SoundFileFormat -> SampleFormat -> i -> i -> Bool -> Message
- b_zero :: Integral i => i -> Message
- c_fill :: (Integral i, Real n) => [(i, i, n)] -> Message
- c_get :: Integral i => [i] -> Message
- c_getn :: Integral i => [(i, i)] -> Message
- c_set :: (Integral i, Real n) => [(i, n)] -> Message
- c_setn :: (Integral i, Real n) => [(i, [n])] -> Message
- d_recv' :: Graphdef -> Message
- d_recv :: Synthdef -> Message
- d_load :: String -> Message
- d_loadDir :: String -> Message
- d_free :: [String] -> Message
- g_deepFree :: Integral i => [i] -> Message
- g_freeAll :: Integral i => [i] -> Message
- g_head :: Integral i => [(i, i)] -> Message
- g_new :: Integral i => [(i, AddAction, i)] -> Message
- g_tail :: Integral i => [(i, i)] -> Message
- g_dumpTree :: Integral i => [(i, Bool)] -> Message
- g_queryTree :: Integral i => [(i, Bool)] -> Message
- n_after :: Integral i => [(i, i)] -> Message
- n_before :: Integral i => [(i, i)] -> Message
- n_fill :: (Integral i, Real f) => i -> [(String, i, f)] -> Message
- n_free :: Integral i => [i] -> Message
- n_map :: Integral i => i -> [(String, i)] -> Message
- n_mapn :: Integral i => i -> [(String, i, i)] -> Message
- n_mapa :: Integral i => i -> [(String, i)] -> Message
- n_mapan :: Integral i => i -> [(String, i, i)] -> Message
- n_query :: Integral i => [i] -> Message
- n_run :: Integral i => [(i, Bool)] -> Message
- n_set :: (Integral i, Real n) => i -> [(String, n)] -> Message
- n_setn :: (Integral i, Real n) => i -> [(String, [n])] -> Message
- n_trace :: Integral i => [i] -> Message
- n_order :: Integral i => AddAction -> i -> [i] -> Message
- p_new :: Integral i => [(i, AddAction, i)] -> Message
- s_get :: Integral i => i -> [String] -> Message
- s_getn :: Integral i => i -> [(String, i)] -> Message
- s_new :: (Integral i, Real n) => String -> i -> AddAction -> i -> [(String, n)] -> Message
- s_noid :: Integral i => [i] -> Message
- u_cmd :: Integral i => i -> i -> String -> [Datum] -> Message
- cmd :: String -> [Datum] -> Message
- clearSched :: Message
- dumpOSC :: PrintLevel -> Message
- errorMode :: ErrorScope -> ErrorMode -> Message
- notify :: Bool -> Message
- nrt_end :: Message
- quit :: Message
- status :: Message
- sync :: Integral i => i -> Message
- withCM :: OSC o => Message -> o -> Message
- b_alloc_setn1 :: (Integral i, Real n) => i -> i -> [n] -> Message
- b_getn1 :: Integral i => i -> (i, i) -> Message
- b_query1 :: Integral i => i -> Message
- b_set1 :: (Integral i, Real n) => i -> i -> n -> Message
- b_setn1 :: (Integral i, Real n) => i -> i -> [n] -> Message
- c_getn1 :: Integral i => (i, i) -> Message
- c_set1 :: (Integral i, Real n) => i -> n -> Message
- c_setn1 :: (Integral i, Real n) => (i, [n]) -> Message
- n_set1 :: (Integral i, Real n) => i -> String -> n -> Message
- s_new0 :: Integral i => String -> i -> AddAction -> i -> Message
- b_segment :: Integral i => i -> i -> [i]
- b_indices :: Integral i => i -> i -> i -> [(i, i)]
- pc_preparePartConv :: Integral i => i -> i -> i -> Message
Buffer commands (b_)
b_alloc :: Integral i => i -> i -> i -> Message Source
Allocates zero filled buffer to number of channels and samples. (Asynchronous)
b_allocRead :: Integral i => i -> String -> i -> i -> Message Source
Allocate buffer space and read a sound file. (Asynchronous)
b_allocReadChannel :: Integral i => i -> String -> i -> i -> [i] -> Message Source
Allocate buffer space and read a sound file, picking specific channels. (Asynchronous)
b_close :: Integral i => i -> Message Source
Close attached soundfile and write header information. (Asynchronous)
b_gen :: Integral i => i -> String -> [Datum] -> Message Source
Call a command to fill a buffer. (Asynchronous)
b_gen_sine1 :: (Integral i, Real n) => i -> [B_Gen] -> [n] -> Message Source
Call sine1
b_gen
command.
b_gen_sine2 :: (Integral i, Real n) => i -> [B_Gen] -> [(n, n)] -> Message Source
Call sine2
b_gen
command.
b_gen_sine3 :: (Integral i, Real n) => i -> [B_Gen] -> [(n, n, n)] -> Message Source
Call sine3
b_gen
command.
b_gen_cheby :: (Integral i, Real n) => i -> [B_Gen] -> [n] -> Message Source
Call cheby
b_gen
command.
b_read :: Integral i => i -> String -> i -> i -> i -> Bool -> Message Source
Read sound file data into an existing buffer. (Asynchronous)
b_readChannel :: Integral i => i -> String -> i -> i -> i -> Bool -> [i] -> Message Source
Read sound file data into an existing buffer, picking specific channels. (Asynchronous)
b_write :: Integral i => i -> String -> SoundFileFormat -> SampleFormat -> i -> i -> Bool -> Message Source
Write sound file data. (Asynchronous)
Control bus commands (c_)
Instrument definition commands (d_)
d_loadDir :: String -> Message Source
Load a directory of instrument definitions files. (Asynchronous)
Group node commands (g_)
g_deepFree :: Integral i => [i] -> Message Source
Free all synths in this group and all its sub-groups.
g_dumpTree :: Integral i => [(i, Bool)] -> Message Source
Post a representation of a group's node subtree, optionally including the current control values for synths.
g_queryTree :: Integral i => [(i, Bool)] -> Message Source
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:
int32 - if synth control values are included 1, else 0 int32 - node ID of the requested group int32 - number of child nodes contained within the requested group For each node in the subtree: [ int32 - node ID int32 - 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: int32 - 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.
Node commands (n_)
n_fill :: (Integral i, Real f) => i -> [(String, i, f)] -> Message Source
Fill ranges of a node's control values.
n_mapn :: Integral i => i -> [(String, i, i)] -> Message Source
Map a node's controls to read from buses.
n_mapa :: Integral i => i -> [(String, i)] -> Message Source
Map a node's controls to read from an audio bus.
n_mapan :: Integral i => i -> [(String, i, i)] -> Message Source
Map a node's controls to read from audio buses.
n_setn :: (Integral i, Real n) => i -> [(String, [n])] -> Message Source
Set ranges of a node's control values.
Par commands (p_)
p_new :: Integral i => [(i, AddAction, i)] -> Message Source
Create a new parallel group (supernova specific).
Synthesis node commands (s_)
s_new :: (Integral i, Real n) => String -> i -> AddAction -> i -> [(String, n)] -> Message Source
Create a new synth.
UGen commands (u_)
u_cmd :: Integral i => i -> i -> String -> [Datum] -> Message Source
Send a command to a unit generator.
Server operation commands
Remove all bundles from the scheduling queue.
dumpOSC :: PrintLevel -> Message Source
Select printing of incoming Open Sound Control messages.
errorMode :: ErrorScope -> ErrorMode -> Message Source
Set error posting scope and mode.
sync :: Integral i => i -> Message Source
Request /synced message when all current asynchronous commands complete.
Modify existing message to include completion message
withCM :: OSC o => Message -> o -> Message Source
Add a completion message (or bundle, the name is misleading) to an existing asynchronous command.
let {m = n_set1 0 "0" 0 ;m' = encodeMessage m} in withCM (b_close 0) m == Message "/b_close" [Int 0,Blob m']
Variants to simplify common cases
b_alloc_setn1 :: (Integral i, Real n) => i -> i -> [n] -> Message Source
Pre-allocate for b_setn1, values preceding offset are zeroed.
n_set1 :: (Integral i, Real n) => i -> String -> n -> Message Source
Set a single node control value.
Buffer segmentation and indices
b_segment :: Integral i => i -> i -> [i] Source
Segment a request for m places into sets of at most n.
b_segment 1024 2056 == [8,1024,1024] b_segment 1 5 == replicate 5 1
b_indices :: Integral i => i -> i -> i -> [(i, i)] Source
Variant of b_segment
that takes a starting index and returns
(index,size) duples.
b_indices 1 5 0 == zip [0..4] (replicate 5 1) b_indices 1024 2056 16 == [(16,8),(24,1024),(1048,1024)]
UGen commands.
pc_preparePartConv :: Integral i => i -> i -> i -> Message Source
Generate accumulation buffer given time-domain IR buffer and FFT size.