-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDodd the Distorter.effect
232 lines (218 loc) · 8.62 KB
/
Dodd the Distorter.effect
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
<effect>
<name>Dodd the Distorter</name>
<enabled>true</enabled>
<numIns>2</numIns>
<numOuts>2</numOuts>
<code>if (<DoddON> == 1) then
setksmps 1
alast1 init 0
alast2 init 0
alsto1 init 0
alsto2 init 0
inorm = 0dbfs
kdry = <Dodd_dry>
idelamp = i(<Dodd_delay Amp>)
kdelfrq = <Dodd_delay Freq>
adel1 jspline idelamp *.5, kdelfrq, kdelfrq
adel2 jspline idelamp *.5, kdelfrq, kdelfrq
adel1 = adel1 + (idelamp * .5)
adel2 = adel2 + (idelamp * .5)
ain1 = ain1 / inorm ; notmalize signal to 1
ain2 = ain2 / inorm
adiff1 = abs(ain1 - alast1) ; abracadabra
adiff2 = abs(ain2 - alast2)
asign1 divz adiff1, ain1 - alast1, 1
asign2 divz adiff2, ain2 - alast2, 1
aout1 = alsto1 + (sqrt(sqrt(adiff1)) * asign1)
aout2 = alsto2 + (sqrt(sqrt(adiff2)) * asign2)
if (idelamp == 0) then
alast1 = ain1
alast2 = ain2
else
alast1 vdelay ain1, adel1, idelamp
alast2 vdelay ain2, adel2, idelamp
endif
alsto1 = aout1
alsto2 = aout2
aout1 = aout1 * inorm / <Dodd_scale> ;reconstruct original amplitude
aout2 = aout2 * inorm / <Dodd_scale>
if (<Dodd_dcBlock> > 0) then
aout1 dcblock aout1
aout2 dcblock aout2
endif
aout1 = (ain1*kdry)+(aout1*(1-kdry))
aout2 = (ain2*kdry)+(aout2*(1-kdry))
else
aout1 = ain1
aout2 = ain2
endif</code>
<comments>DESCRIPTION:
Experimental distortion unit of my own design.
Basically, it tries to exagerate differences between adjascent samples, which winds up having the effect of sharpening all curves.
The comparative samples can be delayed, adding more character to the distortion. Scale factor helps tame the resultant signal amplitude.
CONTROLLERS:
ON/OFF - bypass
delay - amount of delay of the comparative samples
jitter - frequency of jitter
scale - tame the resultant signal amplitude
mix - mix direct signal with effect
DC block - blocks DC offset
---
version 1.11, May 2020
- added comments on controllers
version 1.1, 2017
- new GUI and small code adaptations by Menno Knevel
version 1.0, 2008?
- initial version by Michael Bechard
</comments>
<opcodeList/>
<graphicInterface editEnabled='true'>
<gridSettings>
<width>5</width>
<height>5</height>
<gridStyle>LINE</gridStyle>
<snapGridEnabled>true</snapGridEnabled>
</gridSettings>
<bsbObject type='blue.orchestra.blueSynthBuilder.BSBGroup'>
<objectName></objectName>
<x>0</x>
<y>0</y>
<groupName>Group</groupName>
<backgroundColor>0x00000033</backgroundColor>
<borderColor>0x000000ff</borderColor>
<labelTextColor>0xffffffff</labelTextColor>
<titleEnabled>true</titleEnabled>
<width>20</width>
<height>20</height>
<bsbObject type='blue.orchestra.blueSynthBuilder.BSBCheckBox'>
<objectName>DoddON</objectName>
<x>0</x>
<y>0</y>
<automationAllowed>true</automationAllowed>
<label/>
<selected>true</selected>
<randomizable>true</randomizable>
</bsbObject>
<bsbObject type='blue.orchestra.blueSynthBuilder.BSBGroup'>
<objectName></objectName>
<x>10</x>
<y>10</y>
<groupName>Group</groupName>
<backgroundColor>0x4d8080ff</backgroundColor>
<borderColor>0x000000ff</borderColor>
<labelTextColor>0xffffffff</labelTextColor>
<titleEnabled>false</titleEnabled>
<width>20</width>
<height>20</height>
<bsbObject type='blue.orchestra.blueSynthBuilder.BSBKnob' version='2'>
<objectName>Dodd_delay Amp</objectName>
<x>10</x>
<y>10</y>
<automationAllowed>true</automationAllowed>
<minimum>0.0</minimum>
<maximum>1.0</maximum>
<value>0.0</value>
<knobWidth>40</knobWidth>
<randomizable>true</randomizable>
<valueDisplayEnabled>true</valueDisplayEnabled>
<label>delay</label>
<labelEnabled>true</labelEnabled>
<font>
<name>System Regular</name>
<size>12.0</size>
</font>
</bsbObject>
<bsbObject type='blue.orchestra.blueSynthBuilder.BSBCheckBox'>
<objectName>Dodd_dcBlock</objectName>
<x>215</x>
<y>10</y>
<automationAllowed>false</automationAllowed>
<label>DCBlock</label>
<selected>true</selected>
<randomizable>true</randomizable>
</bsbObject>
<bsbObject type='blue.orchestra.blueSynthBuilder.BSBKnob' version='2'>
<objectName>Dodd_scale</objectName>
<x>120</x>
<y>10</y>
<automationAllowed>true</automationAllowed>
<minimum>0.0</minimum>
<maximum>20.0</maximum>
<value>11.800000000000002</value>
<knobWidth>40</knobWidth>
<randomizable>true</randomizable>
<valueDisplayEnabled>true</valueDisplayEnabled>
<label>scale</label>
<labelEnabled>true</labelEnabled>
<font>
<name>System Regular</name>
<size>12.0</size>
</font>
</bsbObject>
<bsbObject type='blue.orchestra.blueSynthBuilder.BSBKnob' version='2'>
<objectName>Dodd_dry</objectName>
<x>170</x>
<y>10</y>
<automationAllowed>true</automationAllowed>
<minimum>0.0</minimum>
<maximum>1.0</maximum>
<value>0.2800000000000001</value>
<knobWidth>40</knobWidth>
<randomizable>true</randomizable>
<valueDisplayEnabled>true</valueDisplayEnabled>
<label>mix</label>
<labelEnabled>true</labelEnabled>
<font>
<name>System Regular</name>
<size>12.0</size>
</font>
</bsbObject>
<bsbObject type='blue.orchestra.blueSynthBuilder.BSBKnob' version='2'>
<objectName>Dodd_delay Freq</objectName>
<x>60</x>
<y>10</y>
<automationAllowed>true</automationAllowed>
<minimum>0.0</minimum>
<maximum>500.0</maximum>
<value>0.0</value>
<knobWidth>40</knobWidth>
<randomizable>true</randomizable>
<valueDisplayEnabled>true</valueDisplayEnabled>
<label>jitter</label>
<labelEnabled>true</labelEnabled>
<font>
<name>System Regular</name>
<size>12.0</size>
</font>
</bsbObject>
</bsbObject>
</bsbObject>
</graphicInterface>
<parameterList>
<parameter uniqueId='-327896685' name='Dodd_scale' label='' min='0.0' max='20.0' bdresolution='-1' automationEnabled='false' value='11.800000000000002'>
<line name='' version='2' max='20.0' min='0.0' bdresolution='-1' color='-8355712' rightBound='false' endPointsLinked='false'>
<linePoint x='0.0' y='11.800000000000002'/>
</line>
</parameter>
<parameter uniqueId='-327896683' name='Dodd_dry' label='' min='0.0' max='1.0' bdresolution='-1' automationEnabled='false' value='0.2800000000000001'>
<line name='' version='2' max='1.0' min='0.0' bdresolution='-1' color='-8355712' rightBound='false' endPointsLinked='false'>
<linePoint x='0.0' y='0.2800000000000001'/>
</line>
</parameter>
<parameter uniqueId='-327896679' name='Dodd_delay Amp' label='' min='0.0' max='1.0' bdresolution='-1' automationEnabled='false' value='0.0'>
<line name='' version='2' max='1.0' min='0.0' bdresolution='-1' color='-8355712' rightBound='false' endPointsLinked='false'>
<linePoint x='0.0' y='0.0'/>
</line>
</parameter>
<parameter uniqueId='-327896677' name='Dodd_delay Freq' label='' min='0.0' max='500.0' bdresolution='-1' automationEnabled='false' value='0.0'>
<line name='' version='2' max='500.0' min='0.0' bdresolution='-1' color='-8355712' rightBound='false' endPointsLinked='false'>
<linePoint x='0.0' y='0.0'/>
</line>
</parameter>
<parameter uniqueId='-104104211' name='DoddON' label='' min='0.0' max='1.0' bdresolution='1' automationEnabled='false' value='1.0'>
<line name='' version='2' max='1.0' min='0.0' bdresolution='1' color='-8355712' rightBound='false' endPointsLinked='false'>
<linePoint x='0.0' y='1.0'/>
</line>
</parameter>
</parameterList>
</effect>