hsc3-dot-0.11: haskell supercollider graph drawing

Sound.SC3.UGen.Dot

Description

Module to provide graph drawing of unit generator graphs. The output is in the form of a dot graph, which can be layed out using the graphviz tools, see http://graphviz.org.

 import Sound.SC3.ID
 import Sound.SC3.UGen.Dot

Simple a-rate only graph.

 draw (out 0 (sinOsc AR 440 0 * 0.1))

With k-rate subgraph.

 let f = lfSaw KR 1 0 * 220 + 440
 in draw (out 0 (sinOsc AR f 0 * 0.1))

With i-rate subgraph

 let {l = rand 'a' 200 400
     ;m = rand 'b' l 600
     ;a = rand 'c' 500 900
     ;f = lfSaw KR 1 0 * m + a}
 in draw (out 0 (sinOsc AR f 0 * 0.1))

With control input

 let f = control KR "freq" 440
 in draw (out 0 (sinOsc AR f 0 * 0.1))

With multiple channel expansion.

 let f = mce2 440 220
 in draw (out 0 (sinOsc AR f 0 * 0.1))

With multiple root graph.

 let {f = mce2 440 220 + in' 2 KR 0
     ;o1 = sinOsc AR f 0 * 0.1
     ;o2 = sinOsc KR (mce2 0.25 0.35) 0 * mce2 10 15 }
 in draw (mrg [out 0 o1,out 0 o2])

Synopsis

Documentation

class Drawable a whereSource

Draw the unit generator graph provided using the viewer at the environment variable DOTVIEWER, or dotty if that variable is not defined.

Methods

dot :: a -> StringSource

draw :: a -> IO ()Source