| 1 |
""" |
| 2 |
Receiving OSC messages as list of audio streams |
| 3 |
|
| 4 |
**04-receive-list.py** |
| 5 |
|
| 6 |
OscListReceive receives list of values over a network via the Open Sound |
| 7 |
Control protocol. It converts the values as audio streams that can be used |
| 8 |
to control audio process. |
| 9 |
|
| 10 |
""" |
| 11 |
from pyo import * |
| 12 |
|
| 13 |
s = Server().boot() |
| 14 |
|
| 15 |
source = SfPlayer("../snds/flute.aif", loop=True, mul=0.7) |
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
rec = OscListReceive(port=9002, address="/4/xy", num=2) |
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
rec.setValue("/4/xy", [0.5, 0.5]) |
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
disto = Disto(source, drive=Sqrt(rec["/4/xy"][0]), slope=Sqrt(rec["/4/xy"][1]), mul=0.5).mix(2).out() |
| 30 |
|
| 31 |
s.gui(locals()) |