BusGroup

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.nonrealtime" { graph [label="supriya.nonrealtime"]; node [color=2]; "supriya.nonrealtime.AudioInputBusGroup.AudioInputBusGroup" [URL="../api/supriya/nonrealtime/AudioInputBusGroup.html#supriya.nonrealtime.AudioInputBusGroup.AudioInputBusGroup", label="Audio\nInput\nBus\nGroup", target=_top]; "supriya.nonrealtime.AudioOutputBusGroup.AudioOutputBusGroup" [URL="../api/supriya/nonrealtime/AudioOutputBusGroup.html#supriya.nonrealtime.AudioOutputBusGroup.AudioOutputBusGroup", label="Audio\nOutput\nBus\nGroup", target=_top]; "supriya.nonrealtime.BusGroup.BusGroup" [URL="../api/supriya/nonrealtime/BusGroup.html#supriya.nonrealtime.BusGroup.BusGroup", color=black, fontcolor=white, label="Bus\nGroup", target=_top]; "supriya.nonrealtime.SessionObject.SessionObject" [URL="../api/supriya/nonrealtime/SessionObject.html#supriya.nonrealtime.SessionObject.SessionObject", label="Session\nObject", shape=oval, style=bold, target=_top]; "supriya.nonrealtime.BusGroup.BusGroup" -> "supriya.nonrealtime.AudioInputBusGroup.AudioInputBusGroup"; "supriya.nonrealtime.BusGroup.BusGroup" -> "supriya.nonrealtime.AudioOutputBusGroup.AudioOutputBusGroup"; "supriya.nonrealtime.SessionObject.SessionObject" -> "supriya.nonrealtime.BusGroup.BusGroup"; } subgraph "cluster_supriya.system" { graph [label="supriya.system"]; node [color=3]; "supriya.system.SupriyaObject.SupriyaObject" [URL="../api/supriya/nonrealtime/../system/SupriyaObject.html#supriya.system.SupriyaObject.SupriyaObject", label="Supriya\nObject", target=_top]; } "builtins.object" -> "supriya.system.SupriyaObject.SupriyaObject"; "supriya.system.SupriyaObject.SupriyaObject" -> "supriya.nonrealtime.SessionObject.SessionObject"; }

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

A non-realtime bus group.

>>> import supriya.nonrealtime
>>> session = supriya.nonrealtime.Session()
>>> bus_group = session.add_bus_group(3)
>>> print(repr(bus_group))
<BusGroup(
    <Session>,
    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]

Attributes Summary

__contains__
__getitem__
__iter__
__len__
__repr__ Return repr(self).
__str__ Return str(self).
bus_count
buses
calculation_rate
fill
get
get_map_symbol
index
session_id

Special methods

__contains__(item)[source]
__getitem__(item)[source]
__iter__()[source]
__len__()[source]
__repr__()[source]

Return repr(self).

__str__()[source]

Return str(self).


Methods

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

Class & static methods

static (SessionObject).require_offset(function)

Read-only properties

bus_count
buses
calculation_rate
(SessionObject).session
session_id