AudioOutputBusGroup

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.AudioOutputBusGroup.AudioOutputBusGroup" [URL="../api/supriya/realtime/AudioOutputBusGroup.html#supriya.realtime.AudioOutputBusGroup.AudioOutputBusGroup", color=black, fontcolor=white, label="Audio\nOutput\nBus\nGroup", target=_top]; "supriya.realtime.BusGroup.BusGroup" [URL="../api/supriya/realtime/BusGroup.html#supriya.realtime.BusGroup.BusGroup", label="Bus\nGroup", 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.BusGroup.BusGroup" -> "supriya.realtime.AudioOutputBusGroup.AudioOutputBusGroup"; "supriya.realtime.ServerObjectProxy.ServerObjectProxy" -> "supriya.realtime.BusGroup.BusGroup"; } 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]; } "builtins.object" -> "supriya.system.SupriyaObject.SupriyaObject"; "supriya.system.SupriyaObject.SupriyaObject" -> "supriya.realtime.ServerObjectProxy.ServerObjectProxy"; }

class supriya.realtime.AudioOutputBusGroup.AudioOutputBusGroup(server)[source]

Audio output bus group.

Allocated automatically on server boot.

>>> import supriya
>>> server = supriya.Server().boot()
>>> bus_group = server.audio_output_bus_group
>>> bus_group
<+ AudioOutputBusGroup{8}: 0 (audio)>
>>> bus_group.is_allocated
True

Attributes Summary

allocate
free

Special methods

(BusGroup).__contains__(item)

Test if a bus belongs to the bus group.

>>> bus_group = supriya.BusGroup.control(4)
>>> bus_group[0] in bus_group
True
>>> bus = supriya.Bus.audio()
>>> bus in bus_group
False
(BusGroup).__float__()
(BusGroup).__getitem__(item)

Get item in bus group.

>>> server = supriya.Server().boot()
>>> bus_group = supriya.BusGroup.control(4).allocate()
>>> bus_group[0]
<+ Bus: 0 (control)>
>>> bus_group[1:]
<+ BusGroup{3}: 1 (control)>
(BusGroup).__int__()
(BusGroup).__iter__()
(BusGroup).__len__()
(BusGroup).__repr__()

Return repr(self).

(BusGroup).__str__()

Gets map symbol representation of bus group.

>>> server = supriya.Server().boot()
>>> control_bus_group = supriya.BusGroup.control(4).allocate()
>>> audio_bus_group = supriya.BusGroup.audio(4).allocate()
>>> print(str(control_bus_group))
c0
>>> print(str(audio_bus_group))
a16

Methods

allocate()[source]
(BusGroup).ar()

Creates an audio-rate input ugen subgraph.

>>> import supriya.realtime
>>> audio_bus_group = supriya.realtime.BusGroup(
...     bus_id=8,
...     bus_count=4,
...     calculation_rate='audio',
...     )
>>> ugen = audio_bus_group.ar()
>>> graph(ugen)  
>>> print(ugen)
synthdef:
    name: 0af6b551a643cad01e9994845ff4ae40
    ugens:
    -   In.ar:
            bus: 8.0
>>> control_bus_group = supriya.realtime.BusGroup(
...     bus_id=8,
...     bus_count=4,
...     calculation_rate='control',
...     )
>>> ugen = control_bus_group.ar()
>>> graph(ugen)  
>>> print(ugen)
synthdef:
    name: ecaa7fe9417cb0742cdcda87657fe9de
    ugens:
    -   In.kr:
            bus: 8.0
    -   K2A.ar/0:
            source: In.kr[0]
    -   K2A.ar/1:
            source: In.kr[1]
    -   K2A.ar/2:
            source: In.kr[2]
    -   K2A.ar/3:
            source: In.kr[3]

Returns ugen.

(BusGroup).fill(value)

Fill buses in bus group with value.

>>> server = supriya.Server().boot()
>>> bus_group = supriya.BusGroup.control(4).allocate()
>>> bus_group.get()
(0.0, 0.0, 0.0, 0.0)
>>> bus_group.fill(0.5)
>>> bus_group.get()
(0.5, 0.5, 0.5, 0.5)
>>> bus_group = supriya.BusGroup.audio(4)
>>> bus_group.fill(0.5)
Traceback (most recent call last):
...
supriya.exceptions.BusNotAllocated
>>> bus_group.allocate().fill(0.5)
Traceback (most recent call last):
...
supriya.exceptions.IncompatibleRate
free()[source]
(BusGroup).get()

Get bus group values.

>>> server = supriya.Server().boot()
>>> bus_group = supriya.BusGroup().control(4).allocate()
>>> bus_group.get()
(0.0, 0.0, 0.0, 0.0)
(BusGroup).index(item)
(BusGroup).kr()

Creates a control-rate input ugen subgraph.

>>> import supriya.realtime
>>> audio_bus_group = supriya.realtime.BusGroup(
...     bus_id=8,
...     bus_count=4,
...     calculation_rate='audio',
...     )
>>> ugen = audio_bus_group.kr()
>>> graph(ugen)  
>>> print(ugen)
synthdef:
    name: ffeda833c370bc644251437469e243ef
    ugens:
    -   In.ar:
            bus: 8.0
    -   A2K.kr/0:
            source: In.ar[0]
    -   A2K.kr/1:
            source: In.ar[1]
    -   A2K.kr/2:
            source: In.ar[2]
    -   A2K.kr/3:
            source: In.ar[3]
>>> control_bus_group = supriya.realtime.BusGroup(
...     bus_id=8,
...     bus_count=4,
...     calculation_rate='control',
...     )
>>> ugen = control_bus_group.kr()
>>> graph(ugen)  
>>> print(ugen)
synthdef:
    name: b64857a04b384841694ba85f74f0fd0b
    ugens:
    -   In.kr:
            bus: 8.0

Returns ugen.

(BusGroup).set(values)

Set bus group values.

>>> server = supriya.Server().boot()
>>> bus_group = supriya.BusGroup.control(4).allocate()
>>> bus_group.get()
(0.0, 0.0, 0.0, 0.0)
>>> bus_group.set((-0.5, 0.5, -0.5, 0.5))
>>> bus_group.get()
(-0.5, 0.5, -0.5, 0.5)

Class & static methods

classmethod (BusGroup).audio(bus_count=1)
classmethod (BusGroup).control(bus_count=1)

Read-only properties

(BusGroup).bus_id
(BusGroup).buses
(BusGroup).calculation_rate
(BusGroup).is_allocated
(BusGroup).map_symbol