Mix

abstract class supriya.tools.ugentools.Mix[source]

A down-to-mono signal mixer.

>>> with synthdeftools.SynthDefBuilder() as builder:
...     oscillators = [ugentools.DC.ar(1) for _ in range(5)]
...     mix = ugentools.Mix.new(oscillators)
...
>>> synthdef = builder.build(name='mix1')
>>> print(synthdef)
SynthDef mix1 {
    const_0:1.0 -> 0_DC[0:source]
    const_0:1.0 -> 1_DC[0:source]
    const_0:1.0 -> 2_DC[0:source]
    const_0:1.0 -> 3_DC[0:source]
    0_DC[0] -> 4_Sum4[0:input_one]
    1_DC[0] -> 4_Sum4[1:input_two]
    2_DC[0] -> 4_Sum4[2:input_three]
    3_DC[0] -> 4_Sum4[3:input_four]
    const_0:1.0 -> 5_DC[0:source]
    4_Sum4[0] -> 6_BinaryOpUGen:ADDITION[0:left]
    5_DC[0] -> 6_BinaryOpUGen:ADDITION[1:right]
}
>>> with synthdeftools.SynthDefBuilder() as builder:
...     oscillators = [ugentools.DC.ar(1) for _ in range(15)]
...     mix = ugentools.Mix.new(oscillators)
...
>>> synthdef = builder.build('mix2')
>>> print(synthdef)
SynthDef mix2 {
    const_0:1.0 -> 0_DC[0:source]
    const_0:1.0 -> 1_DC[0:source]
    const_0:1.0 -> 2_DC[0:source]
    const_0:1.0 -> 3_DC[0:source]
    0_DC[0] -> 4_Sum4[0:input_one]
    1_DC[0] -> 4_Sum4[1:input_two]
    2_DC[0] -> 4_Sum4[2:input_three]
    3_DC[0] -> 4_Sum4[3:input_four]
    const_0:1.0 -> 5_DC[0:source]
    const_0:1.0 -> 6_DC[0:source]
    const_0:1.0 -> 7_DC[0:source]
    const_0:1.0 -> 8_DC[0:source]
    5_DC[0] -> 9_Sum4[0:input_one]
    6_DC[0] -> 9_Sum4[1:input_two]
    7_DC[0] -> 9_Sum4[2:input_three]
    8_DC[0] -> 9_Sum4[3:input_four]
    const_0:1.0 -> 10_DC[0:source]
    const_0:1.0 -> 11_DC[0:source]
    const_0:1.0 -> 12_DC[0:source]
    const_0:1.0 -> 13_DC[0:source]
    10_DC[0] -> 14_Sum4[0:input_one]
    11_DC[0] -> 14_Sum4[1:input_two]
    12_DC[0] -> 14_Sum4[2:input_three]
    13_DC[0] -> 14_Sum4[3:input_four]
    const_0:1.0 -> 15_DC[0:source]
    const_0:1.0 -> 16_DC[0:source]
    const_0:1.0 -> 17_DC[0:source]
    15_DC[0] -> 18_Sum3[0:input_one]
    16_DC[0] -> 18_Sum3[1:input_two]
    17_DC[0] -> 18_Sum3[2:input_three]
    4_Sum4[0] -> 19_Sum4[0:input_one]
    9_Sum4[0] -> 19_Sum4[1:input_two]
    14_Sum4[0] -> 19_Sum4[2:input_three]
    18_Sum3[0] -> 19_Sum4[3:input_four]
}

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_systemtools { graph [label=systemtools]; "supriya.tools.systemtools.SupriyaObject.AbstractBase" [color=2, group=1, label=AbstractBase, shape=box]; "supriya.tools.systemtools.SupriyaObject.SupriyaObject" [color=2, group=1, label=SupriyaObject, shape=box]; "supriya.tools.systemtools.SupriyaObject.AbstractBase" -> "supriya.tools.systemtools.SupriyaObject.SupriyaObject"; } subgraph cluster_ugentools { graph [label=ugentools]; "supriya.tools.ugentools.Mix.Mix" [color=black, fontcolor=white, group=2, label=<<B>Mix</B>>, shape=oval, style="filled, rounded"]; "supriya.tools.ugentools.PseudoUGen.PseudoUGen" [color=3, group=2, label=PseudoUGen, shape=oval, style=bold]; "supriya.tools.ugentools.PseudoUGen.PseudoUGen" -> "supriya.tools.ugentools.Mix.Mix"; } "builtins.object" -> "supriya.tools.systemtools.SupriyaObject.AbstractBase"; "supriya.tools.systemtools.SupriyaObject.SupriyaObject" -> "supriya.tools.ugentools.PseudoUGen.PseudoUGen"; }

Bases

Attribute summary

multichannel(sources, channel_count)
new(sources)
__eq__(expr) Is true when ID of expr equals ID of Supriya object.
__format__([format_specification]) Formats Supriya object.
__hash__() Hashes Supriya object.
__repr__() Gets interpreter representation of Supriya object.

Class & static methods

classmethod Mix.multichannel(sources, channel_count)[source]
classmethod Mix.new(sources)[source]

Special methods

(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.

(SupriyaObject).__hash__()

Hashes Supriya object.

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

Returns integer.

(SupriyaObject).__repr__()

Gets interpreter representation of Supriya object.

Returns string.