BusGroup

class supriya.tools.nonrealtimetools.BusGroup(session, bus_count=1, calculation_rate=None, session_id=None)[source]

A non-realtime bus group.

>>> session = nonrealtimetools.Session()
>>> bus_group = session.add_bus_group(3)
>>> print(repr(bus_group))
<BusGroup(
    bus_count=3,
    calculation_rate=CalculationRate.CONTROL,
    session_id=0
    )>
>>> with session.at(1):
...     bus_group[0].set_(0.333)
...
>>> with session.at(3):
...     bus_group.fill(0.5)
...
>>> with session.at(5):
...     bus_group[1].set_(0.666)
...     bus_group[2].set_(0.75)
...
>>> for offset in range(7):
...     with session.at(offset):
...         values = bus_group.get()
...         print(offset, values)
...
0 [0.0, 0.0, 0.0]
1 [0.333, 0.0, 0.0]
2 [0.333, 0.0, 0.0]
3 [0.5, 0.5, 0.5]
4 [0.5, 0.5, 0.5]
5 [0.5, 0.666, 0.75]
6 [0.5, 0.666, 0.75]

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_nonrealtimetools { graph [label=nonrealtimetools]; "supriya.tools.nonrealtimetools.AudioInputBusGroup.AudioInputBusGroup" [color=2, group=1, label=AudioInputBusGroup, shape=box]; "supriya.tools.nonrealtimetools.AudioOutputBusGroup.AudioOutputBusGroup" [color=2, group=1, label=AudioOutputBusGroup, shape=box]; "supriya.tools.nonrealtimetools.BusGroup.BusGroup" [color=black, fontcolor=white, group=1, label=<<B>BusGroup</B>>, shape=box, style="filled, rounded"]; "supriya.tools.nonrealtimetools.SessionObject.SessionObject" [color=2, group=1, label=SessionObject, shape=oval, style=bold]; "supriya.tools.nonrealtimetools.BusGroup.BusGroup" -> "supriya.tools.nonrealtimetools.AudioInputBusGroup.AudioInputBusGroup"; "supriya.tools.nonrealtimetools.BusGroup.BusGroup" -> "supriya.tools.nonrealtimetools.AudioOutputBusGroup.AudioOutputBusGroup"; "supriya.tools.nonrealtimetools.SessionObject.SessionObject" -> "supriya.tools.nonrealtimetools.BusGroup.BusGroup"; } subgraph cluster_systemtools { graph [label=systemtools]; "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"; } "builtins.object" -> "supriya.tools.systemtools.SupriyaObject.AbstractBase"; "supriya.tools.systemtools.SupriyaObject.SupriyaObject" -> "supriya.tools.nonrealtimetools.SessionObject.SessionObject"; }

Bases

Attribute summary

bus_count
buses
calculation_rate
fill(value)
get()
get_map_symbol(bus_id)
index(item)
require_offset(function)
session
__contains__(item)
__eq__(expr) Is true when ID of expr equals ID of Supriya object.
__format__([format_specification]) Formats Supriya object.
__getitem__(item)
__hash__() Hashes Supriya object.
__iter__()
__len__()
__repr__() Gets interpreter representation of Supriya object.
__str__()

Read-only properties

BusGroup.bus_count
BusGroup.buses
BusGroup.calculation_rate
(SessionObject).session

Methods

BusGroup.fill(value)[source]
BusGroup.get()[source]
BusGroup.get_map_symbol(bus_id)[source]
BusGroup.index(item)[source]

Class & static methods

(SessionObject).require_offset(function)

Special methods

BusGroup.__contains__(item)[source]
(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.

BusGroup.__getitem__(item)[source]
(SupriyaObject).__hash__()

Hashes Supriya object.

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

Returns integer.

BusGroup.__iter__()[source]
BusGroup.__len__()[source]
(SupriyaObject).__repr__()

Gets interpreter representation of Supriya object.

Returns string.

BusGroup.__str__()[source]