File: 11-handling-channels-4.rst.txt

package info (click to toggle)
python-pyo 1.0.6-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 52,332 kB
  • sloc: python: 135,133; ansic: 127,822; javascript: 16,116; sh: 395; makefile: 388; cpp: 242
file content (25 lines) | stat: -rw-r--r-- 700 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
11-handling-channels-4.py - Explicit control of the physical outputs.
============================================================================================================================================


If `chnl` is a list, successive values in the list will be assigned
to successive streams.

.. code-block:: python

    from pyo import *
    
    # Creates a Server with 8 channels
    s = Server(nchnls=8).boot()
    
    amps = [0.05, 0.1, 0.15, 0.2, 0.25, 0.3, 0.35, 0.4]
    
    # Generates 8 sine waves with
    # increasing amplitudes
    a = Sine(freq=500, mul=amps)
    
    # Sets the output channels ordering
    a.out(chnl=[3, 4, 2, 5, 1, 6, 0, 7])
    
    s.gui(locals())