hsc3-0.17: Haskell SuperCollider

Safe HaskellSafe
LanguageHaskell98

Sound.SC3.UGen.UGen

Contents

Description

UGen data structure representation and associated functions.

Synopsis

Documentation

toUId :: ID a => a -> UGenId Source #

UId of resolveID.

ugen_user_name :: String -> Special -> String Source #

Lookup operator name for operator UGens, else UGen name.

UGen graph functions

ugenTraverse :: (UGen -> UGen) -> UGen -> UGen Source #

Depth first traversal of graph at u applying f to each node.

ugenFoldr :: (UGen -> a -> a) -> a -> UGen -> a Source #

Right fold of UGen graph.

Unit generator node constructors

control_f64 :: Rate -> Maybe Int -> String -> Sample -> UGen Source #

Control input node constructor.

control :: Rate -> String -> Double -> UGen Source #

Control input node constructor.

Note that if the name begins with a t_ prefix the control is not converted to a triggered control. Please see tr_control.

meta_control :: Rate -> String -> Double -> C_Meta_T5 Double -> UGen Source #

Variant of control with meta data.

tr_control_f64 :: Maybe Int -> String -> Sample -> UGen Source #

Triggered (kr) control input node constructor.

tr_control :: String -> Double -> UGen Source #

Triggered (kr) control input node constructor.

control_set :: [UGen] -> [UGen] Source #

Set indices at a list of controls.

mrg2 :: UGen -> UGen -> UGen Source #

Multiple root graph node constructor.

Multiple channel expansion

mce2 :: UGen -> UGen -> UGen Source #

Multiple channel expansion for two inputs.

mce2c :: UGen -> (UGen, UGen) Source #

Extract two channels from possible MCE, if there is only one channel it is duplicated.

unmce2 :: UGen -> (UGen, UGen) Source #

Variant of mce2c that requires input to have two channels.

mce3 :: UGen -> UGen -> UGen -> UGen Source #

Multiple channel expansion for two inputs.

mceMap :: (UGen -> UGen) -> UGen -> UGen Source #

Apply a function to each channel at a unit generator.

map_ix :: ((Int, a) -> b) -> [a] -> [b] Source #

Map with element index.

mce_map_ix :: ((Int, UGen) -> UGen) -> UGen -> UGen Source #

Variant of mceMap with element index.

mceEdit :: ([UGen] -> [UGen]) -> UGen -> UGen Source #

Apply UGen list operation on MCE contents.

mceReverse :: UGen -> UGen Source #

Reverse order of channels at MCE.

mceChannel :: Int -> UGen -> UGen Source #

Obtain indexed channel at MCE.

mceTranspose :: UGen -> UGen Source #

Transpose rows and columns, ie. {{a,b},{c,d}} to {{a,c},{b,d}}.

mceSum :: UGen -> UGen Source #

Collapse mce by summing (see also mix and mixN).

Transform

halt_mce_transform_f :: (a -> [a]) -> [a] -> [a] Source #

Given unmce function make halt mce transform.

halt_mce_transform :: [UGen] -> [UGen] Source #

The halt MCE transform, ie. lift channels of last input into list.

halt_mce_transform [1,2,mce2 3 4] == [1,2,3,4]

prepare_root :: UGen -> UGen Source #

If the root node of a UGen graph is mce, transform to mrg.

Multiple root graphs

Labels

label :: String -> UGen Source #

Lift a String to a UGen label (ie. for poll).

unpackLabel :: UGen -> [UGen] Source #

Unpack a label to a length prefixed list of Constants. There is a special case for mce nodes, but it requires labels to be equal length. Properly, poll would not unpack the label, it would be done by the synthdef builder.

Envelope

Bitwise

(.<<.) :: UGen -> UGen -> UGen Source #

shiftLeft operator.

(.>>.) :: UGen -> UGen -> UGen Source #

shiftRight operator.