Debian Codegraph @

docs/_sources/examples/02-controls/09-handling-channels-2.rst.txt

raw
1 09-handling-channels-2.py - The `out` method and the physical outputs.
2 ============================================================================================================================================
3
4
5 In a multichannel environment, we can carefully choose which stream
6 goes to which output channel. To achieve this, we use the `chnl` and
7 `inc` arguments of the out method.
8
9 chnl : Physical output assigned to the first audio stream of the object.
10 inc : Output channel increment value.
11
12 .. code-block:: python
13
14 from pyo import *
15
16 # Creates a Server with 8 channels
17 s = Server(nchnls=8).boot()
18
19 # Generates a sine wave
20 a = Sine(freq=500, mul=0.3)
21
22 # Mixes it up to four streams
23 b = a.mix(4)
24
25 # Outputs to channels 0, 2, 4 and 6
26 b.out(chnl=0, inc=2)
27
28 s.gui(locals())
29