Debian Codegraph @

pyo/examples/x02-controls/09-handling-channels-2.py

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