hsc3-0.14: Haskell SuperCollider

Safe HaskellNone

Sound.SC3.Server.Synthdef.Internal

Synopsis

Documentation

find_node :: Graph -> NodeId -> Maybe NodeSource

Find Node with indicated NodeId.

is_implicit_control :: Node -> BoolSource

Is Node an implicit control UGen?

node_label :: Node -> StringSource

Generate a label for Node using the type and the node_id.

is_node_c :: Node -> BoolSource

Is Node a constant.

is_node_k :: Node -> BoolSource

Is Node a control.

is_node_u :: Node -> BoolSource

Is Node a UGen.

edges :: [Node] -> [Edge]Source

Calculate all edges given a set of NodeU.

graph_maximum_id :: Graph -> NodeIdSource

Find the maximum NodeId used at Graph (this ought normally be the nextId).

ktype :: Rate -> Bool -> KTypeSource

Determine class of control given Rate and trigger status.

remove_implicit :: Graph -> GraphSource

Remove implicit control UGens from Graph

add_implicit :: Graph -> GraphSource

Add implicit control UGens to Graph.

find_c_p :: Float -> Node -> BoolSource

Predicate to determine if Node is a constant with indicated value.

push_c :: Float -> Graph -> (Node, Graph)Source

Insert a constant Node into the Graph.

mk_node_c :: Constant -> Graph -> (Node, Graph)Source

Either find existing Constant Node, or insert a new Node.

find_k_p :: String -> Node -> BoolSource

Predicate to determine if Node is a control with indicated name. Names must be unique.

push_k :: (Rate, String, Float, Bool) -> Graph -> (Node, Graph)Source

Insert a control node into the Graph.

mk_node_k :: Control -> Graph -> (Node, Graph)Source

Either find existing Control Node, or insert a new Node.

find_u_p :: UGenParts -> Node -> BoolSource

Predicate to locate primitive, names must be unique.

push_u :: UGenParts -> Graph -> (Node, Graph)Source

Insert a primitive NodeU into the Graph.

mk_node_u :: Primitive -> Graph -> (Node, Graph)Source

Either find existing Primitive node, or insert a new Node.

mk_node_p :: Node -> PortIndex -> Graph -> (Node, Graph)Source

Proxies do not get stored in the graph.

type Maps = (Map, [Node], Map, Map, [(KType, Int)])Source

data Input Source

Constructors

Input Int Int 

Instances

node_ktype :: Node -> Maybe KTypeSource

Determine KType of a control UGen at NodeU, or not.

mk_ktype_map :: [Node] -> [(KType, Int)]Source

Map associating KType with UGen index.

ktype_map_lookup :: KType -> [(KType, Int)] -> IntSource

Lookup KType index from map (erroring variant of lookup).

mk_maps :: Graph -> MapsSource

Generate Maps translating node identifiers to synthdef indexes.

fetch :: NodeId -> Map -> IntSource

Locate index in map given node identifer NodeId.

fetch_k :: NodeId -> KType -> [Node] -> IntSource

Controls are a special case. We need to know not the overall index but the index in relation to controls of the same type.

make_input :: Maps -> FromPort -> InputSource

Construct Input form required by byte-code generator.

encode_input :: Input -> ByteStringSource

Byte-encode Input value.

encode_node_k :: Maps -> Node -> ByteStringSource

Byte-encode NodeK control node.

encode_node_u :: Maps -> Node -> ByteStringSource

Byte-encode NodeU primitive node.

encode_graphdef :: Graph -> ByteStringSource

Construct instrument definition bytecode.

type KS_COUNT = (Int, Int, Int, Int)Source

4-tuple to count KTypes.

ks_count :: [Node] -> KS_COUNTSource

Count the number of controls if each KType.

mk_implicit :: [Node] -> [Node]Source

Construct implicit control unit generator Nodes. Unit generators are only constructed for instances of control types that are present.

prepare_root :: UGen -> UGenSource

Transform mce nodes to mrg nodes