| 1 |
""" |
| 2 |
06-hand-made-chorus.py - Hand-written 8 delay lines stereo chorus. |
| 3 |
|
| 4 |
A chorus (or ensemble) is a modulation effect used to create a richer, |
| 5 |
thicker sound and add subtle movement. The effect roughly simulates |
| 6 |
the slight variations in pitch and timing that occur when multiple |
| 7 |
performers sing or play the same part. |
| 8 |
|
| 9 |
A single voice chorus uses a single delay that creates a single modulated |
| 10 |
duplicate of the incoming audio. Basic chorus effects and inexpensive guitar |
| 11 |
pedals are often single-voice. |
| 12 |
|
| 13 |
A multiple voice chorus uses multiple modulated delays to create a richer |
| 14 |
sound with more movement than a single voice chorus. |
| 15 |
|
| 16 |
The Chorus object (from pyo) implements an 8 delay lines chorus and should |
| 17 |
use less CPU than the hand-written version. this example's purpose is only |
| 18 |
to show how it works or to be used as a starting point to build an extended |
| 19 |
version. |
| 20 |
|
| 21 |
""" |
| 22 |
from pyo import * |
| 23 |
|
| 24 |
s = Server(duplex=0).boot() |
| 25 |
|
| 26 |
|
| 27 |
sf = SfPlayer("../snds/baseballmajeur_m.aif", speed=1, loop=True, mul=0.3) |
| 28 |
|
| 29 |
sf2 = sf.mix(2).out() |
| 30 |
|
| 31 |
|
| 32 |
|
| 33 |
freqs = [0.254, 0.465, 0.657, 0.879, 1.23, 1.342, 1.654, 1.879] |
| 34 |
|
| 35 |
cdelay = [0.0087, 0.0102, 0.0111, 0.01254, 0.0134, 0.01501, 0.01707, 0.0178] |
| 36 |
|
| 37 |
adelay = [0.001, 0.0012, 0.0013, 0.0014, 0.0015, 0.0016, 0.002, 0.0023] |
| 38 |
|
| 39 |
|
| 40 |
lfos = Sine(freqs, mul=adelay, add=cdelay) |
| 41 |
|
| 42 |
|
| 43 |
|
| 44 |
|
| 45 |
delays = Delay(sf, lfos, feedback=0.5, mul=0.5).out() |
| 46 |
|
| 47 |
s.gui(locals()) |