nodes

class Group(children=None, name=None, node_id_is_permanent=False)

Bases: supriya.realtime.nodes.Node, uqbar.containers.UniqueTreeList.UniqueTreeList

A group.

>>> import supriya.realtime
>>> server = supriya.Server()
>>> server.boot()
<Server: udp://127.0.0.1:57110, 8i8o>
>>> group = supriya.realtime.Group()
>>> group.allocate(server)
<+ Group: 1000>
>>> group.free()
<- Group: ???>
>>> server.quit()
<Server: offline>
__graph__()
__setitem__(i, expr)

Sets expr in self at index i.

>>> group_one = supriya.realtime.Group()
>>> group_two = supriya.realtime.Group()
>>> group_one.append(group_two)
allocate(target_node, add_action=None, node_id_is_permanent=False, sync=False)
property controls: supriya.realtime.interfaces.GroupInterface
free()
prepend(expr: supriya.realtime.nodes.Node)
class Node(name=None, node_id_is_permanent=False)

Bases: uqbar.containers.UniqueTreeNode.UniqueTreeNode

__float__()
__graph__()
__int__()
add_group(add_action: Optional[Union[supriya.enums.AddAction, SupportsInt, str]] = None) supriya.realtime.nodes.Group

Add a group relative to this node via add_action.

>>> server = supriya.Server().boot()
>>> print(server.query())
NODE TREE 0 group
    1 group
>>> node = server.add_group()
>>> group = node.add_group()
>>> print(server.query())
NODE TREE 0 group
    1 group
        1000 group
            1001 group
add_synth(synthdef: Optional[supriya.synthdefs.synthdefs.SynthDef] = None, add_action: Optional[Union[supriya.enums.AddAction, SupportsInt, str]] = None, **kwargs) supriya.realtime.nodes.Synth

Add a synth relative to this node via add_action.

>>> server = supriya.Server().boot()
>>> print(server.query())
NODE TREE 0 group
    1 group
>>> node = server.add_group()
>>> synth = node.add_synth()
>>> print(server.query())
NODE TREE 0 group
    1 group
        1000 group
            1001 default
                out: 0.0, amplitude: 0.1, frequency: 440.0, gate: 1.0, pan: 0.5
free() supriya.realtime.nodes.Node
property is_allocated: bool
property is_paused: bool
move_node(node: supriya.realtime.nodes.Node, add_action: Optional[Union[supriya.enums.AddAction, SupportsInt, str]] = None) supriya.realtime.nodes.Node

Move node relative to this node via add_action.

>>> server = supriya.Server().boot()
>>> group_one = server.add_group()
>>> group_two = server.add_group()
>>> print(server.query())
NODE TREE 0 group
    1 group
        1001 group
        1000 group
>>> _ = group_two.move_node(group_one, "add_to_head")
>>> print(server.query())
NODE TREE 0 group
    1 group
        1001 group
            1000 group
property node_id: Optional[int]
property node_id_is_permanent: bool
pause()
precede_by(expr)
query()
replace_with(expr)
property server: Optional[supriya.realtime.servers.Server]
succeed_by(expr)
unpause()
class RootNode(server)

Bases: supriya.realtime.nodes.Group

allocate()
free()
property node_id: int
property parent: None
pause()
unpause()
class Synth(synthdef: Optional[supriya.synthdefs.synthdefs.SynthDef] = None, name=None, node_id_is_permanent=False, **kwargs)

Bases: supriya.realtime.nodes.Node

A synth.

>>> import supriya.realtime
>>> server = supriya.Server()
>>> server.boot()
<Server: udp://127.0.0.1:57110, 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(server)
<SynthDef: e41193ac8b7216f49ff0d477876a3bf3>
>>> synth = supriya.realtime.Synth(amplitude=0.5, frequency=443, synthdef=synthdef)
>>> synth
<- Synth: ??? e41193ac8b7216f49ff0d477876a3bf3>
>>> synth.allocate(server)
<+ Synth: 1000 e41193ac8b7216f49ff0d477876a3bf3>
>>> synth["frequency"] = 666.0
>>> synth["frequency"]
666.0
>>> server.quit()
<Server: offline>
__getitem__(item)
__iter__()
__setitem__(items, values)
allocate(target_node, add_action=None, node_id_is_permanent=False, sync=True, **kwargs)
property controls: supriya.realtime.interfaces.SynthInterface
release()
property synthdef: supriya.synthdefs.synthdefs.SynthDef