| 1 |
07-multichannel-expansion-2.py - Extended multichannel expansion. |
| 2 |
============================================================================================================================================ |
| 3 |
|
| 4 |
|
| 5 |
When using multichannel expansion with lists of different lengths, |
| 6 |
the longer list is used to set the number of streams and smaller |
| 7 |
lists will be wrap-around to fill the holes. |
| 8 |
|
| 9 |
This feature is very useful to create complex sonorities. |
| 10 |
|
| 11 |
.. code-block:: python |
| 12 |
|
| 13 |
from pyo import * |
| 14 |
|
| 15 |
s = Server().boot() |
| 16 |
|
| 17 |
# 12 streams with different combinations of `freq` and `ratio`. |
| 18 |
a = SumOsc( |
| 19 |
freq=[100, 150.2, 200.5, 250.7], |
| 20 |
ratio=[0.501, 0.753, 1.255], |
| 21 |
index=[0.3, 0.4, 0.5, 0.6, 0.7, 0.4, 0.5, 0.3, 0.6, 0.7, 0.3, 0.5], |
| 22 |
mul=0.05, |
| 23 |
) |
| 24 |
|
| 25 |
# Adds a stereo reverberation to the signal |
| 26 |
rev = Freeverb(a.mix(2), size=0.80, damp=0.70, bal=0.30).out() |
| 27 |
|
| 28 |
s.gui(locals()) |
| 29 |
|