Debian Codegraph @

pyo/examples/x08-dynamics/03-gated-verb.py

raw symbols SCIP
1 """
2 03-gated-verb.py - Gated reverb applied to a drum loop.
3
4 The gated reverb effect, which was most popular in the 1980s, is made using a
5 combination of strong reverb and a noise gate. The drum sound passes through
6 a strong reverb, which is rapidly cut off with a gate driven by the dry signal.
7
8 """
9 from pyo import *
10
11 s = Server().boot()
12
13 # Play the drum lopp..
14 sf = SfPlayer("../snds/drumloop.wav", loop=True)
15
16 # Use a gate to generate the gain curve that will be applied to the reverb.
17 gate = Gate(sf, thresh=-50, risetime=0.005, falltime=0.04, lookahead=4, outputAmp=True)
18
19 # Strong reverb.
20 rev = Freeverb(sf.mix(2), size=0.95, damp=0.3, bal=1.0)
21
22 # Compress the reverb signal and control its amplitude with the gating signal.
23 cmp = Compress(rev, thresh=-12, ratio=3, risetime=0.005, falltime=0.05, lookahead=4, knee=0.5, mul=gate,)
24
25 # Balance between the dry and wet (gated-reverb) signals.
26 output = Interp(sf.mix(2), cmp, interp=0.2).out()
27
28 s.gui(locals())