SynthDefGrapher

class supriya.tools.synthdeftools.SynthDefGrapher[source]

Graphs SynthDefs.

>>> ugen_graph = ugentools.LFNoise2.ar()
>>> result = ugen_graph.transpose([0, 3, 7])
>>> graph(result)  
>>> print(result.__graph__())
digraph synthdef_c481c3d42e3cfcee0267250247dab51f {
    graph [bgcolor=transparent,
        color=lightslategrey,
        dpi=72,
        fontname=Arial,
        outputorder=edgesfirst,
        overlap=prism,
        penwidth=2,
        rankdir=LR,
        ranksep=1,
        splines=spline,
        style="dotted, rounded"];
    node [fontname=Arial,
        fontsize=12,
        penwidth=2,
        shape=Mrecord,
        style="filled, rounded"];
    edge [penwidth=2];
    ugen_0 [fillcolor=lightsteelblue2,
        label="<f_0> LFNoise2\n(audio) | { { <f_1_0_0> frequency:\n500.0 } | { <f_1_1_0> 0 } }"];
    ugen_1 [fillcolor=lightsteelblue2,
        label="<f_0> UnaryOpUGen\n[HZ_TO_MIDI]\n(audio) | { { <f_1_0_0> source } | { <f_1_1_0> 0 } }"];
    ugen_2 [fillcolor=lightsteelblue2,
        label="<f_0> UnaryOpUGen\n[MIDI_TO_HZ]\n(audio) | { { <f_1_0_0> source } | { <f_1_1_0> 0 } }"];
    ugen_3 [fillcolor=lightsteelblue2,
        label="<f_0> BinaryOpUGen\n[ADDITION]\n(audio) | { { <f_1_0_0> left | <f_1_0_1> right:\n3.0 } | { <f_1_1_0> 0 } }"];
    ugen_4 [fillcolor=lightsteelblue2,
        label="<f_0> UnaryOpUGen\n[MIDI_TO_HZ]\n(audio) | { { <f_1_0_0> source } | { <f_1_1_0> 0 } }"];
    ugen_5 [fillcolor=lightsteelblue2,
        label="<f_0> BinaryOpUGen\n[ADDITION]\n(audio) | { { <f_1_0_0> left | <f_1_0_1> right:\n7.0 } | { <f_1_1_0> 0 } }"];
    ugen_6 [fillcolor=lightsteelblue2,
        label="<f_0> UnaryOpUGen\n[MIDI_TO_HZ]\n(audio) | { { <f_1_0_0> source } | { <f_1_1_0> 0 } }"];
    ugen_0:f_1_1_0:e -> ugen_1:f_1_0_0:w [color=steelblue];
    ugen_1:f_1_1_0:e -> ugen_2:f_1_0_0:w [color=steelblue];
    ugen_1:f_1_1_0:e -> ugen_3:f_1_0_0:w [color=steelblue];
    ugen_1:f_1_1_0:e -> ugen_5:f_1_0_0:w [color=steelblue];
    ugen_3:f_1_1_0:e -> ugen_4:f_1_0_0:w [color=steelblue];
    ugen_5:f_1_1_0:e -> ugen_6:f_1_0_0:w [color=steelblue];
}

Lineage

digraph InheritanceGraph { graph [background=transparent, bgcolor=transparent, color=lightslategrey, fontname=Arial, outputorder=edgesfirst, overlap=prism, penwidth=2, rankdir=LR, root="__builtin__.object", splines=spline, style="dotted, rounded", truecolor=true]; node [colorscheme=pastel19, fontname=Arial, fontsize=12, penwidth=2, style="filled, rounded"]; edge [color=lightsteelblue2, penwidth=2]; subgraph cluster_builtins { graph [label=builtins]; "builtins.object" [color=1, group=0, label=object, shape=box]; } subgraph cluster_synthdeftools { graph [label=synthdeftools]; "supriya.tools.synthdeftools.SynthDefGrapher.SynthDefGrapher" [color=black, fontcolor=white, group=1, label=<<B>SynthDefGrapher</B>>, shape=box, style="filled, rounded"]; } subgraph cluster_systemtools { graph [label=systemtools]; "supriya.tools.systemtools.Grapher.Grapher" [color=3, group=2, label=Grapher, shape=box]; "supriya.tools.systemtools.SupriyaObject.AbstractBase" [color=3, group=2, label=AbstractBase, shape=box]; "supriya.tools.systemtools.SupriyaObject.SupriyaObject" [color=3, group=2, label=SupriyaObject, shape=box]; "supriya.tools.systemtools.SupriyaObject.AbstractBase" -> "supriya.tools.systemtools.SupriyaObject.SupriyaObject"; "supriya.tools.systemtools.SupriyaObject.SupriyaObject" -> "supriya.tools.systemtools.Grapher.Grapher"; } "builtins.object" -> "supriya.tools.systemtools.SupriyaObject.AbstractBase"; "supriya.tools.systemtools.Grapher.Grapher" -> "supriya.tools.synthdeftools.SynthDefGrapher.SynthDefGrapher"; }

Bases

Attribute summary

graph(synthdef)
__eq__(expr) Is true when ID of expr equals ID of Supriya object.
__format__([format_specification]) Formats Supriya object.
__hash__() Hashes Supriya object.
__repr__() Gets interpreter representation of Supriya object.

Class & static methods

static SynthDefGrapher.graph(synthdef)[source]

Special methods

(SupriyaObject).__eq__(expr)

Is true when ID of expr equals ID of Supriya object. Otherwise false.

Returns boolean.

(SupriyaObject).__format__(format_specification='')

Formats Supriya object.

Set format_specification to ‘’ or ‘storage’. Interprets ‘’ equal to ‘storage’.

Returns string.

(SupriyaObject).__hash__()

Hashes Supriya object.

Required to be explicitely re-defined on Python 3 if __eq__ changes.

Returns integer.

(SupriyaObject).__repr__()

Gets interpreter representation of Supriya object.

Returns string.