hsc3-0.14: Haskell SuperCollider

Safe HaskellNone

Sound.SC3.Server.Command.Generic

Contents

Description

Generic constructors for the command set implemented by the SuperCollider synthesis server.

Synopsis

Node commands

n_after :: Integral i => [(i, i)] -> MessageSource

Place a node after another.

n_before :: Integral i => [(i, i)] -> MessageSource

Place a node before another.

n_fill :: (Integral i, Real n) => i -> [(String, i, n)] -> MessageSource

Fill ranges of a node's control values.

n_free :: Integral i => [i] -> MessageSource

Delete a node.

n_map :: Integral i => i -> [(String, i)] -> MessageSource

n_mapn :: Integral i => i -> [(String, i, i)] -> MessageSource

Map a node's controls to read from buses.

n_mapa :: Integral i => i -> [(String, i)] -> MessageSource

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

n_mapan :: Integral i => i -> [(String, i, i)] -> MessageSource

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

n_query :: Integral i => [i] -> MessageSource

Get info about a node.

n_run :: Integral i => [(i, Bool)] -> MessageSource

Turn node on or off.

n_set :: (Integral i, Real n) => i -> [(String, n)] -> MessageSource

Set a node's control values.

n_setn :: (Integral i, Real n) => i -> [(String, [n])] -> MessageSource

Set ranges of a node's control values.

n_trace :: Integral i => [i] -> MessageSource

Trace a node.

n_order :: Integral i => AddAction -> i -> [i] -> MessageSource

Move an ordered sequence of nodes.

Synthesis node commands

s_get :: Integral i => i -> [String] -> MessageSource

Get control values.

s_getn :: Integral i => i -> [(String, i)] -> MessageSource

Get ranges of control values.

s_new :: (Integral i, Real n) => String -> i -> AddAction -> i -> [(String, n)] -> MessageSource

Create a new synth.

s_noid :: Integral i => [i] -> MessageSource

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

Group node commands

g_deepFree :: Integral i => [i] -> MessageSource

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

g_freeAll :: Integral i => [i] -> MessageSource

Delete all nodes in a group.

g_head :: Integral i => [(i, i)] -> MessageSource

Add node to head of group.

g_new :: Integral i => [(i, AddAction, i)] -> MessageSource

Create a new group.

g_tail :: Integral i => [(i, i)] -> MessageSource

Add node to tail of group.

g_dumpTree :: Integral i => [(i, Bool)] -> MessageSource

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

g_queryTree :: Integral i => [(i, Bool)] -> MessageSource

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.

p_new :: Integral i => [(i, AddAction, i)] -> MessageSource

Create a new parallel group (supernova specific).

Unit Generator commands

u_cmd :: Integral i => i -> i -> String -> [Datum] -> MessageSource

Send a command to a unit generator.

Buffer commands

b_alloc :: Integral i => i -> i -> i -> MessageSource

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

b_allocRead :: Integral i => i -> String -> i -> i -> MessageSource

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

b_allocReadChannel :: Integral i => i -> String -> i -> i -> [i] -> MessageSource

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

b_close :: Integral i => i -> MessageSource

Close attached soundfile and write header information. (Asynchronous)

b_fill :: (Integral i, Real n) => i -> [(i, i, n)] -> MessageSource

Fill ranges of sample values.

b_free :: Integral i => i -> MessageSource

Free buffer data. (Asynchronous)

b_gen :: Integral i => i -> String -> [Datum] -> MessageSource

Call a command to fill a buffer. (Asynchronous)

b_gen_sine1 :: (Integral i, Real n) => i -> [B_Gen] -> [n] -> MessageSource

Call sine1 b_gen command.

b_gen_sine2 :: (Integral i, Real n) => i -> [B_Gen] -> [(n, n)] -> MessageSource

Call sine2 b_gen command.

b_gen_sine3 :: (Integral i, Real n) => i -> [B_Gen] -> [(n, n, n)] -> MessageSource

Call sine3 b_gen command.

b_gen_cheby :: (Integral i, Real n) => i -> [B_Gen] -> [n] -> MessageSource

Call cheby b_gen command.

b_gen_copy :: Integral i => i -> i -> i -> i -> Maybe i -> MessageSource

Call copy b_gen command.

b_get :: Integral i => i -> [i] -> MessageSource

Get sample values.

b_getn :: Integral i => i -> [(i, i)] -> MessageSource

Get ranges of sample values.

b_query :: Integral i => [i] -> MessageSource

Request /b_info messages.

b_read :: Integral i => i -> String -> i -> i -> i -> Bool -> MessageSource

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

b_readChannel :: Integral i => i -> String -> i -> i -> i -> Bool -> [i] -> MessageSource

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

b_set :: (Integral i, Real n) => i -> [(i, n)] -> MessageSource

Set sample values.

b_setn :: (Integral i, Real n) => i -> [(i, [n])] -> MessageSource

Set ranges of sample values.

b_write :: Integral i => i -> String -> SoundFileFormat -> SampleFormat -> i -> i -> Bool -> MessageSource

Write sound file data. (Asynchronous)

b_zero :: Integral i => i -> MessageSource

Zero sample data. (Asynchronous)

Control bus commands

c_fill :: (Integral i, Real n) => [(i, i, n)] -> MessageSource

Fill ranges of bus values.

c_get :: Integral i => [i] -> MessageSource

Get bus values.

c_getn :: Integral i => [(i, i)] -> MessageSource

Get ranges of bus values.

c_set :: (Integral i, Real n) => [(i, n)] -> MessageSource

Set bus values.

c_setn :: (Integral i, Real n) => [(i, [n])] -> MessageSource

Set ranges of bus values.

Server operation commands

sync :: Integral i => i -> MessageSource

Request /synced message when all current asynchronous commands complete.

Variants to simplify common cases

b_alloc_setn1 :: (Integral i, Real n) => i -> i -> [n] -> MessageSource

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

b_getn1 :: Integral i => i -> (i, i) -> MessageSource

Get ranges of sample values.

b_set1 :: (Integral i, Real n) => i -> i -> n -> MessageSource

Set single sample value.

b_setn1 :: (Integral i, Real n) => i -> i -> [n] -> MessageSource

Set a range of sample values.

b_query1 :: Integral i => i -> MessageSource

Variant on b_query.

c_set1 :: (Integral i, Real n) => i -> n -> MessageSource

Set single bus values.

n_set1 :: (Integral i, Real n) => i -> String -> n -> MessageSource

Set a single node control value.

s_new0 :: Integral i => String -> i -> AddAction -> i -> MessageSource

s_new with no parameters.

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 -> MessageSource

Generate accumulation buffer given time-domain IR buffer and FFT size.