-
Notifications
You must be signed in to change notification settings - Fork 1
/
blowBotle.dsp
44 lines (32 loc) · 1.12 KB
/
blowBotle.dsp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
declare name "Blowed Botle instrument";
declare author "Romain Michon";
declare version "1.0";
import("math.lib");
import("music.lib");
import("filter.lib");
import("table.lib");
//==================== GUI SPECIFICATION ================
freq = nentry("freq", 440, 20, 20000, 1);
gain = nentry("gain", 0.9, 0, 1, 0.01);
gate = button("gate");
vibratoGain = hslider("vibratoGain",0.1,0,1,0.01);
vibratoFreq = hslider("vibratoFreq",6,1,15,0.1);
noiseGain = hslider("noiseGain",0.5,0,1,0.01)*2;
pressure = hslider("pressure",1,0,1,0.01);
//==================== SIGNAL PROCESSING ================
botleRadius = 0.999;
//global envelope
envelopeG = gain*adsr(gain*0.01,0.01,80,0.5,gate);
//pressure envelope (ADSR)
envelope = pressure*adsr(gain*0.02,0.01,80,gain*0.02,gate);
//vibrato
vibrato = osc(vibratoFreq)*vibratoGain;
breathPressure = envelope+vibrato;
//breath noise
randPressure = noiseGain*noise*breathPressure ;
process =
//differential pressure
(breathPressure - _ <:
((1+_)*randPressure : breathPressure + _) - (jetTable*_),_ : bandPass(freq,botleRadius),_)~_ : !,_ :
//signal scaling
dcblocker*envelopeG*0.5 <: _,_;