-
Notifications
You must be signed in to change notification settings - Fork 3
/
distortion1.dsp
42 lines (35 loc) · 1.62 KB
/
distortion1.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
declare name "distortion1";
declare version "0.01";
declare author "brummer";
declare license "BSD";
declare copyright "(c)brummer 2008";
import("math.lib");
import("music.lib");
import("effect.lib");
import("filter.lib");
import("guitarix.lib");
//----------distortion---------
//-speaker emulation
sbp1 = vslider("low_freq[name:low freq][tooltip:low-freq cutoff Hz]",130,20,1000,10);
sbp2 = vslider("high_freq[name:high freq][tooltip:high-freq cutoff Hz]",5000,1000,12000,10);
switch1 = checkbox("on_off[name:low highcutoff]");
sbp = hgroup("low_highcutoff", bypass(switch1, +(anti_denormal_ac) : speakerbp(sbp1,sbp2)));
//-low and highpass
lowpassfreq = nentry("low_freq[name:low freq]", 5000, 20, 12000, 10);
highpassfreq = nentry("high_freq[name:high freq]", 130, 20, 7040, 10);
switch = checkbox("on_off[name:low highpass]");
passo = +(anti_denormal_ac) : lowpass1(lowpassfreq) : highpass1(highpassfreq );
pass = hgroup("low_highpass", bypass(switch, passo));
//-distortion
drivelevel = vslider("level", 0.01, 0, 0.5, 0.01);
drivegain1 = vslider("gain", 2, -10, 10, 0.1)-10 : db2linear : smoothi(0.999);
drive = vslider("drive", 0.64, 0, 1, 0.01);
distortion = cubicnl(drive,drivelevel);
//-resonator
switch2 = checkbox("resonator.on_off[name:resonat]");
resonator = (+ <: (delay(4096, d-1) + delay(4096, d)) / 2) ~ *(1.0-a)
with {
d = vslider("vibrato", 1, 0, 1, 0.01);
a = vslider("trigger", 0.12, 0, 1, 0.01);
};
process = bypass(switch2, resonator) : +(anti_denormal_ac) : pass : add_dc : sbp : component("HighShelf.dsp").hs : distortion : *(drivegain1) : component("HighShelf.dsp").hs : sbp;