Synth

digraph InheritanceGraph { graph [bgcolor=transparent, color=lightsteelblue2, fontname=Arial, fontsize=10, outputorder=edgesfirst, overlap=prism, penwidth=2, rankdir=LR, splines=spline, style="dashed, rounded", truecolor=true]; node [colorscheme=pastel19, fontname=Arial, fontsize=10, height=0, penwidth=2, shape=box, style="filled, rounded", width=0]; edge [color=lightslategrey, penwidth=1]; subgraph cluster_builtins { graph [label=builtins]; node [color=1]; "builtins.object" [URL="https://docs.python.org/3.6/library/functions.html#object", label=object, target=_top]; } subgraph "cluster_supriya.realtime" { graph [label="supriya.realtime"]; node [color=2]; "supriya.realtime.Node.Node" [URL="../api/supriya/realtime/Node.html#supriya.realtime.Node.Node", label="Node", shape=oval, style=bold, target=_top]; "supriya.realtime.ServerObjectProxy.ServerObjectProxy" [URL="../api/supriya/realtime/ServerObjectProxy.html#supriya.realtime.ServerObjectProxy.ServerObjectProxy", label="Server\nObject\nProxy", shape=oval, style=bold, target=_top]; "supriya.realtime.Synth.Synth" [URL="../api/supriya/realtime/Synth.html#supriya.realtime.Synth.Synth", color=black, fontcolor=white, label=Synth, target=_top]; "supriya.realtime.Node.Node" -> "supriya.realtime.Synth.Synth"; "supriya.realtime.ServerObjectProxy.ServerObjectProxy" -> "supriya.realtime.Node.Node"; } subgraph "cluster_supriya.system" { graph [label="supriya.system"]; node [color=3]; "supriya.system.SupriyaObject.SupriyaObject" [URL="../api/supriya/realtime/../system/SupriyaObject.html#supriya.system.SupriyaObject.SupriyaObject", label="Supriya\nObject", target=_top]; } subgraph "cluster_uqbar.containers" { graph [label="uqbar.containers"]; node [color=4]; "uqbar.containers.UniqueTreeNode.UniqueTreeNode" [label="Unique\nTree\nNode"]; } "builtins.object" -> "supriya.system.SupriyaObject.SupriyaObject"; "builtins.object" -> "uqbar.containers.UniqueTreeNode.UniqueTreeNode"; "supriya.system.SupriyaObject.SupriyaObject" -> "supriya.realtime.ServerObjectProxy.ServerObjectProxy"; "uqbar.containers.UniqueTreeNode.UniqueTreeNode" -> "supriya.realtime.Node.Node"; }

class supriya.realtime.Synth.Synth(synthdef=None, name=None, register_controls=None, node_id_is_permanent=False, **kwargs)[source]

A synth.

>>> import supriya.realtime
>>> server = supriya.realtime.Server()
>>> server.boot()
<Server: udp://127.0.0.1:57751, 8i8o>
>>> import supriya.synthdefs
>>> import supriya.ugens
>>> with supriya.synthdefs.SynthDefBuilder(
...     amplitude=0.0,
...     frequency=440.0,
...     ) as builder:
...     sin_osc = supriya.ugens.SinOsc.ar(
...         frequency=builder['frequency'],
...         )
...     sin_osc *= builder['amplitude']
...     out = supriya.ugens.Out.ar(
...         bus=0,
...         source=[sin_osc, sin_osc],
...         )
...
>>> synthdef = builder.build()
>>> synthdef.allocate()
<SynthDef: e41193ac8b7216f49ff0d477876a3bf3>
>>> synth = supriya.realtime.Synth(
...     amplitude=0.5,
...     frequency=443,
...     synthdef=synthdef
...     )
>>> synth
<- Synth: ???>
>>> synth.allocate()
<+ Synth: 1000>
>>> synth['frequency'] = 666.0
>>> synth['frequency']
666.0
>>> server.quit()
<Server: offline>

Attributes Summary

__getitem__
__iter__
__setitem__
__str__ Return str(self).
allocate
controls
register_controls
release
synthdef

Special methods

(Node).__float__()
__getitem__(item)[source]
(Node).__graph__()
(Node).__int__()
__iter__()[source]
(Node).__repr__()

Return repr(self).

__setitem__(items, values)[source]
__str__()[source]

Return str(self).


Methods

allocate(add_action=None, node_id_is_permanent=False, sync=True, target_node=None, **kwargs)[source]
(Node).free()
(Node).pause()
(UniqueTreeNode).precede_by(expr)
release()[source]
(UniqueTreeNode).replace_with(expr)
(UniqueTreeNode).succeed_by(expr)
(Node).unpause()

Class & static methods

static (Node).expr_as_target(expr)

Read/write properties

(UniqueTreeNode).name

Read-only properties

controls
(UniqueTreeNode).depth
(UniqueTreeNode).graph_order
(Node).is_allocated
(Node).is_paused
(Node).node_id
(Node).node_id_is_permanent
(UniqueTreeNode).parent
(UniqueTreeNode).parentage
register_controls
(UniqueTreeNode).root
synthdef