File: 06_lfo_controls.py

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 (21 lines) | stat: -rw-r--r-- 573 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/usr/bin/env python
# encoding: utf-8
"""
Audio control with LFOs.

"""
from pyo import *

s = Server(duplex=0).boot()

# LFO (sine wave) +/- 5 (mul) around 10 (add), range = 5 -> 15.
# Control the frequency of the square wave LFO.
freqctl = Sine(freq=0.1, mul=5, add=10)

# LFO (square wave) +/- 0.05 (mul) around 0.07 (add), range = 0.02 -> 0.12.
# Control the feedback of the SineLoop oscillator.
feedctl = LFO(freq=freqctl, sharp=0.8, type=2, mul=0.05, add=0.07)

synth = SineLoop(freq=[201.32, 199.76, 200, 201.55], feedback=feedctl, mul=0.1).out()

s.gui(locals())