Bus

class supriya.tools.servertools.Bus(bus_group_or_index=None, calculation_rate=None)[source]

A bus.

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=2, group=1, label=object, shape=box]; } subgraph cluster_bindingtools { graph [label=bindingtools]; "supriya.tools.bindingtools.BindingTarget.BindingTarget" [color=1, group=0, label=BindingTarget, shape=oval, style=bold]; } subgraph cluster_servertools { graph [label=servertools]; "supriya.tools.servertools.Bus.Bus" [color=black, fontcolor=white, group=2, label=<<B>Bus</B>>, shape=box, style="filled, rounded"]; "supriya.tools.servertools.ServerObjectProxy.ServerObjectProxy" [color=3, group=2, label=ServerObjectProxy, shape=oval, style=bold]; "supriya.tools.servertools.ServerObjectProxy.ServerObjectProxy" -> "supriya.tools.servertools.Bus.Bus"; } subgraph cluster_systemtools { graph [label=systemtools]; "supriya.tools.systemtools.SupriyaObject.AbstractBase" [color=4, group=3, label=AbstractBase, shape=box]; "supriya.tools.systemtools.SupriyaObject.SupriyaObject" [color=4, group=3, label=SupriyaObject, shape=box]; "supriya.tools.systemtools.SupriyaObject.AbstractBase" -> "supriya.tools.systemtools.SupriyaObject.SupriyaObject"; } "builtins.object" -> "supriya.tools.systemtools.SupriyaObject.AbstractBase"; "supriya.tools.bindingtools.BindingTarget.BindingTarget" -> "supriya.tools.servertools.Bus.Bus"; "supriya.tools.systemtools.SupriyaObject.SupriyaObject" -> "supriya.tools.bindingtools.BindingTarget.BindingTarget"; "supriya.tools.systemtools.SupriyaObject.SupriyaObject" -> "supriya.tools.servertools.ServerObjectProxy.ServerObjectProxy"; }

Attribute summary

allocate([server, sync])
ar() Creates an audio-rate input ugen subgraph.
audio()
bus_group
bus_id
calculation_rate
control()
free()
get([completion_callback])
is_allocated
is_bound
kr() Creates a control-rate input ugen subgraph.
map_symbol
server
set(value)
unbind([binding])
value
__eq__(expr) Is true when ID of expr equals ID of Supriya object.
__float__()
__format__([format_specification]) Formats Supriya object.
__hash__() Hashes Supriya object.
__int__()
__repr__()
__str__()

Read-only properties

Bus.bus_group
Bus.bus_id
Bus.calculation_rate
Bus.is_allocated
(BindingTarget).is_bound
Bus.map_symbol
Bus.server
Bus.value

Methods

Bus.allocate(server=None, sync=False)[source]
Bus.ar()[source]

Creates an audio-rate input ugen subgraph.

>>> from supriya.tools import servertools
>>> audio_bus = servertools.Bus(8, 'audio')
>>> ugen = audio_bus.ar()
>>> print(str(ugen))
SynthDef fb63450852ac2df2fad1242e27a913d6 {
    const_0:8.0 -> 0_In[0:bus]
}
>>> control_bus = servertools.Bus(8, 'control')
>>> ugen = control_bus.ar()
>>> print(str(ugen))
SynthDef d48f76506e364201100db95a248cc8e2 {
    const_0:8.0 -> 0_In[0:bus]
    0_In[0] -> 1_K2A[0:source]
}

Returns ugen.

Bus.free()[source]
Bus.get(completion_callback=None)[source]
Bus.kr()[source]

Creates a control-rate input ugen subgraph.

>>> from supriya.tools import servertools
>>> audio_bus = servertools.Bus(8, 'audio')
>>> ugen = audio_bus.kr()
>>> print(str(ugen))
SynthDef 65ceebd3294ae43fa3dd12035e1895fd {
    const_0:8.0 -> 0_In[0:bus]
    0_In[0] -> 1_A2K[0:source]
}
>>> control_bus = servertools.Bus(8, 'control')
>>> ugen = control_bus.kr()
>>> print(str(ugen))
SynthDef ef2c11e55da5af28e2ae77c5c8934f3d {
    const_0:8.0 -> 0_In[0:bus]
}

Returns ugen.

Bus.set(value)[source]
(BindingTarget).unbind(binding=None)

Class & static methods

static Bus.audio()[source]
static Bus.control()[source]

Special methods

(SupriyaObject).__eq__(expr)

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

Returns boolean.

Bus.__float__()[source]
(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.

Bus.__int__()[source]
Bus.__repr__()[source]
Bus.__str__()[source]