hsc3-0.15: Haskell SuperCollider

Safe HaskellSafe-Inferred
LanguageHaskell98

Sound.SC3.UGen.Graph.Transform

Contents

Description

Transformations over Graph structure.

Synopsis

Lift constants

constant_to_control :: NodeId -> Node -> (NodeId, Node) Source

Transform NodeC to NodeK, id for other Node types.

let r = (NodeK 8 KR Nothing "k_8" 0.1 K_KR,9)
in constant_to_control 8 (NodeC 0 0.1) == r

c_lift_from_port :: Graph -> NodeId -> FromPort -> (NodeId, Either FromPort Node) Source

If the FromPort is a constant generate a control Node, else retain FromPort.

c_lift_inputs :: Graph -> NodeId -> [FromPort] -> (NodeId, [FromPort], [Node]) Source

Lift a set of NodeU inputs from constants to controls. The result triple gives the incremented NodeId, the transformed FromPort list, and the list of newly minted control Nodes.