hsc3-0.19.1: Haskell SuperCollider
Safe HaskellNone
LanguageHaskell2010

Sound.SC3.Server.Graphdef.Graph

Contents

Description

Transform U_Graph to Graphdef.

Synopsis

Maps

type Int_Map = IntMap Int Source #

(Int,Int) map.

type Encoding_Maps = (Int_Map, [U_Node], Int_Map, Int_Map, [(K_Type, Int)]) Source #

(constants-map,controls,controls-map,ugen-map,ktype-map)

mk_encoding_maps :: U_Graph -> Encoding_Maps Source #

Generate Encoding_Maps translating node identifiers to synthdef indexes.

uid_lookup :: UID_t -> Int_Map -> Int Source #

Locate index in map given node identifer UID_t.

ktype_map_lookup :: K_Type -> [(K_Type, Int)] -> Int Source #

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

Encoding

make_input :: Encoding_Maps -> From_Port -> Input Source #

Byte-encode From_Port primitive node.

make_control :: Encoding_Maps -> U_Node -> Control Source #

Byte-encode U_Node_K primitive node.

make_ugen :: Encoding_Maps -> U_Node -> UGen Source #

Byte-encode U_Node_U primitive node.

graph_to_graphdef :: String -> U_Graph -> Graphdef Source #

Construct instrument definition bytecode.