Distortion, Polynomial, 2nd-Degree

Download

     Disclaimer...

23   desc:Distortion: Polynomial, 2nd-Degree, v1.0.0
24  
25   slider1:0.5<0,1.0,0.01>Linear Gain
26  
27   @init
28   gain = 0.5;
29  
30   @slider
31   gain = slider1;
32  
33   @sample
34   output = spl0;
35   spl0 > 0 ? ( output = gain * spl0 * spl0 + spl0; );
36   spl0 < 0 ? ( output = -1.0 * gain * spl0 * spl0 + spl0; );
37   spl0 = output;
38  
39   spl1 = spl1;
40  

Download

Distortion, Polynomial, 3rd-Degree

Download

     Disclaimer...

23   desc:Distortion: Polynomial, 3rd-Degree, v1.0.0
24  
25   slider1:0.5<0,1.0,0.01>Linear Gain
26  
27   @init
28   gain = 0.5;
29  
30   @slider
31   gain = slider1;
32  
33   @sample
34   output = 1.5 * spl0 - 0.5 * spl0 * spl0 * spl0;
35   spl0 = gain * output + spl0;
36  
37   spl1 = spl1;
38  

Download

Distortion, Chebyshev, 2nd-Order

Download

     Disclaimer...

23   desc:Distortion: Chebyshev, 2nd-Order, v1.0.0
24  
25   slider1:0.5<0,1.0,0.01>Linear Gain
26  
27   @init
28   gain = 0.5;
29  
30   @slider
31   gain = slider1;
32  
33   @sample
34   output = 2.0 * spl0 * spl0 - 1.0;
35   spl0 = gain * output + spl0;
36  
37   spl1 = spl1;
38  

Download

Distortion, Non-Linear, Asymmetry

Download

     Disclaimer...

23   desc:Distortion: Non-Linearity, Asymmetry, v1.0.0
24  
25   slider1:0.5<0,1.0,0.01>Linear Gain
26  
27   @init
28   gain = 0.5;
29  
30   @slider
31   gain = 1.0 - slider1;
32  
33   @sample
34   spl0 = spl0;
35   spl0 < 0 ? ( spl0 *= gain; );
36  
37   spl1 = spl1;
38  

Download

Distortion, Clipping, Symmetrical

Download

     Disclaimer...

23   desc:Distortion: Clipping, Symmetrical, v1.0.0
24  
25   slider1:0.5<0,1.0,0.01>Threshold
26  
27   @init
28   thresh = 0.5;
29  
30   @slider
31   thresh = slider1;
32  
33   @sample
34   spl0 = spl0;
35   spl0 > thresh ? ( spl0 = thresh; );
36   spl0 < -thresh ? ( spl0 = -thresh; );
37  
38   spl1 = spl1;
39  

Download

Distortion, Clipping, Asymmetric

Download

     Disclaimer...

23   desc:Distortion: Clipping, Asymmetric, v1.0.0
24  
25   slider1:0.5<0,1.0,0.01>Threshold
26  
27   @init
28   thresh = 0.5;
29  
30   @slider
31   thresh = slider1;
32  
33   @sample
34   spl0 = spl0;
35   spl0 < -thresh ? ( spl0 = -thresh; );
36  
37   spl1 = spl1;
38  

Download

Distortion, Rectifier, Half-Wave

Download

     Disclaimer...

23   desc:Distortion: Rectifier, Half-Wave, v1.0.0
24  
25   @init
26  
27   @slider
28  
29   @sample
30   spl0 < 0 ? ( spl0 = 0; ) : ( spl0 = spl0; );
31  
32   spl1 = spl1;
33  

Download

Distortion, Clipping [B] Soft

Download

     Disclaimer...

23   desc:Distortion: Soft Clipping, B, v1.0.0
24  
25   slider1:0.5<0,1.0,0.01>Linear Gain
26  
27   @init
28   gain = 0.5;
29  
30   @slider
31   gain = 4 * slider1; // +12 dB
32  
33   @sample
34   spl0 = spl0 * gain;
35   spl0 > 0 ? ( spl0 = 1.0 - exp(-spl0); );
36   spl0 < -0 ? ( spl0 = -1.0 + exp(spl0); );
37  
38   spl1 = spl1;
39  

Download

Distortion, Clipping [A] Soft

Download

     Disclaimer...

23   desc:Distortion: Soft Clipping, A, v1.0.0
24  
25   slider1:0.5<0,1.0,0.01>Linear Gain
26  
27   @init
28   thresh1 = 1.0/3.0;
29   thresh2 = 2.0/3.0;
30   gain = 0.5;
31  
32   @slider
33   gain = 2 * slider1; // +6 dB
34  
35   @sample
36   spl0 = spl0 * gain;
37   spl0 > thresh1 ? (
38   spl0 > thresh2 ? (
39   spl0 = 1.0;
40   ) : (
41   spl0 = (3.0 - (2.0 - 3.0*spl0)*(2.0 - 3.0*spl0)) / 3.0;
42   );
43   );
44   spl0 < -thresh1 ? (
45   spl0 < -thresh2 ? (
46   spl0 = -1.0;
47   ) : (
48   spl0 = - (3.0 - (2.0 + 3.0*spl0)*(2.0 + 3.0*spl0)) / 3.0;
49   );
50   );
51  
52   spl1 = spl1;
53  

Download