-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathChorus.effect
269 lines (256 loc) · 10.9 KB
/
Chorus.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
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
<effect>
<name>Chorus</name>
<enabled>true</enabled>
<numIns>2</numIns>
<numOuts>2</numOuts>
<code>if (<ChorusON> == 1) then
isin ftgentmp 0, 0, 65537, 10, 1
ilevl = .3 ; Output level
idpth = i(<Chorus_depth>) ; Depth in ms
imax = i(<Chorus_maxLfo>) ; Maximum LFO rate
imin = i(<Chorus_minLfo>) ; Minimum LFO rate
idelay = idpth * 2 + .1 ;imax;(idpth *2) + .01
iwave = isin ; LFO waveform
idiff = imax-imin
kwet = <Chorus_wetDry>
ain = ain1 + ain2 * .5
ain = ain * ilevl
i01 = rnd(idiff)
i02 = rnd(idiff)
i03 = rnd(idiff)
i04 = rnd(idiff)
i05 = rnd(idiff)
i06 = rnd(idiff)
i07 = rnd(idiff)
i08 = rnd(idiff)
i09 = rnd(idiff)
i10 = rnd(idiff)
i11 = rnd(idiff)
i12 = rnd(idiff)
alfo01 oscil idpth, i01 + imin, iwave
alfo02 oscil idpth, i02 + imin, iwave, .08
alfo03 oscil idpth, i03 + imin, iwave, .17
alfo04 oscil idpth, i04 + imin, iwave, .25
alfo05 oscil idpth, i05 + imin, iwave, .33
alfo06 oscil idpth, i06 + imin, iwave, .42
alfo07 oscil idpth, i07 + imin, iwave, .50
alfo08 oscil idpth, i08 + imin, iwave, .58
alfo09 oscil idpth, i09 + imin, iwave, .67
alfo10 oscil idpth, i10 + imin, iwave, .75
alfo11 oscil idpth, i11 + imin, iwave, .83
alfo12 oscil idpth, i12 + imin, iwave, .92
atemp delayr idelay * 2 ; + idpth +.1
a01 deltapi idelay + alfo01
a02 deltapi idelay + alfo02
a03 deltapi idelay + alfo03
a04 deltapi idelay + alfo04
a05 deltapi idelay + alfo05
a06 deltapi idelay + alfo06
a07 deltapi idelay + alfo07
a08 deltapi idelay + alfo08
a09 deltapi idelay + alfo09
a10 deltapi idelay + alfo10
a11 deltapi idelay + alfo11
a12 deltapi idelay + alfo12
delayw ain
achorusl sum a01, a02, a03, a04, a05, a06
achorusr sum a07, a08, a09, a10, a11, a12
ain1 delay ain1, .2 ;compensate for delaytime on direct signal
ain2 delay ain2, .2
aout1 = ain1 * (1-kwet) + achorusl * kwet
aout2 = ain2 * (1-kwet) + achorusr * kwet
else
aout1 = ain1
aout2 = ain2
endif</code>
<comments>
DESCRIPTION:
The chorus consists of 2x6 delay lines, with random LFO
frequency between min/max lfo frequency.
Note: The input is mixed to a mono signal before fed into
the chorus. This means that although the output is stereo,
any stereo information (such as panning) in the input signal
is lost in the chorused signal.
CONTROLLERS:
ON/OFF - bypass
depth - Depth of chorus in ms
maxLfo/minLfo - Maximum LFO rate, Minimum LFO rate
wet/dry - mix direct signal with effect
---
version 1.11, May 2020
- added comments on controllers
version 1.1, 2016
- new GUI and small code adaptations by Menno Knevel
version 1.0, 2006
- initial version by Atte Jensen
- Based on code by Perry Cook
- Additional lines + stereo capability by Atte André Jensen
- Originally adapted to BSB by Steve Yi from code posted by Atte Andre Jensen to the Csound Mailing List on May 1, 2006
- Depth, min/max frequency widgets added by Atte André Jensen</comments>
<opcodeList/>
<graphicInterface editEnabled='true'>
<gridSettings>
<width>10</width>
<height>10</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.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.BSBLabel' version='2'>
<objectName></objectName>
<x>180</x>
<y>10</y>
<label>Wet</label>
<font>
<name>System Regular</name>
<size>12.0</size>
</font>
</bsbObject>
<bsbObject type='blue.orchestra.blueSynthBuilder.BSBVSlider' version='2'>
<objectName>Chorus_wetDry</objectName>
<x>180</x>
<y>20</y>
<automationAllowed>true</automationAllowed>
<minimum>0.0</minimum>
<maximum>1.0</maximum>
<bdresolution>0.1</bdresolution>
<value>0.6</value>
<sliderHeight>50</sliderHeight>
<randomizable>true</randomizable>
<valueDisplayEnabled>false</valueDisplayEnabled>
</bsbObject>
<bsbObject type='blue.orchestra.blueSynthBuilder.BSBKnob' version='2'>
<objectName>Chorus_maxLfo</objectName>
<x>120</x>
<y>10</y>
<automationAllowed>true</automationAllowed>
<minimum>0.01</minimum>
<maximum>0.3</maximum>
<value>0.15674703</value>
<knobWidth>40</knobWidth>
<randomizable>true</randomizable>
<valueDisplayEnabled>true</valueDisplayEnabled>
<label>max</label>
<labelEnabled>true</labelEnabled>
<font>
<name>System Regular</name>
<size>12.0</size>
</font>
</bsbObject>
<bsbObject type='blue.orchestra.blueSynthBuilder.BSBLabel' version='2'>
<objectName></objectName>
<x>180</x>
<y>70</y>
<label>Dry</label>
<font>
<name>System Regular</name>
<size>12.0</size>
</font>
</bsbObject>
<bsbObject type='blue.orchestra.blueSynthBuilder.BSBLabel' version='2'>
<objectName></objectName>
<x>70</x>
<y>80</y>
<label>LFO Frequency</label>
<font>
<name>System Regular</name>
<size>12.0</size>
</font>
</bsbObject>
<bsbObject type='blue.orchestra.blueSynthBuilder.BSBKnob' version='2'>
<objectName>Chorus_minLfo</objectName>
<x>70</x>
<y>10</y>
<automationAllowed>true</automationAllowed>
<minimum>0.0</minimum>
<maximum>0.2</maximum>
<value>0.0063821496</value>
<knobWidth>40</knobWidth>
<randomizable>true</randomizable>
<valueDisplayEnabled>true</valueDisplayEnabled>
<label>min</label>
<labelEnabled>true</labelEnabled>
<font>
<name>System Regular</name>
<size>12.0</size>
</font>
</bsbObject>
<bsbObject type='blue.orchestra.blueSynthBuilder.BSBKnob' version='2'>
<objectName>Chorus_depth</objectName>
<x>10</x>
<y>10</y>
<automationAllowed>true</automationAllowed>
<minimum>0.0</minimum>
<maximum>0.07</maximum>
<value>0.020699998</value>
<knobWidth>40</knobWidth>
<randomizable>true</randomizable>
<valueDisplayEnabled>true</valueDisplayEnabled>
<label>depth</label>
<labelEnabled>true</labelEnabled>
<font>
<name>System Regular</name>
<size>12.0</size>
</font>
</bsbObject>
</bsbObject>
<bsbObject type='blue.orchestra.blueSynthBuilder.BSBCheckBox'>
<objectName>ChorusON</objectName>
<x>0</x>
<y>0</y>
<automationAllowed>true</automationAllowed>
<label/>
<selected>true</selected>
<randomizable>true</randomizable>
</bsbObject>
</bsbObject>
</graphicInterface>
<parameterList>
<parameter uniqueId='16615485' name='Chorus_depth' label='' min='0.0' max='0.07' bdresolution='-1' automationEnabled='false' value='0.020699998'>
<line name='' version='2' max='0.07' min='0.0' bdresolution='-1' color='-8355712' rightBound='false' endPointsLinked='false'>
<linePoint x='0.0' y='0.020699998'/>
</line>
</parameter>
<parameter uniqueId='-438722481' name='Chorus_wetDry' label='' min='0.0' max='1.0' bdresolution='0.1' automationEnabled='false' value='0.6'>
<line name='' version='2' max='1.0' min='0.0' bdresolution='0.1' color='-8355712' rightBound='false' endPointsLinked='false'>
<linePoint x='0.0' y='0.6'/>
</line>
</parameter>
<parameter uniqueId='-438722469' name='Chorus_maxLfo' label='' min='0.01' max='0.3' bdresolution='-1' automationEnabled='false' value='0.15674703'>
<line name='' version='2' max='0.3' min='0.01' bdresolution='-1' color='-8355712' rightBound='false' endPointsLinked='false'>
<linePoint x='0.0' y='0.15674703'/>
</line>
</parameter>
<parameter uniqueId='-438722467' name='Chorus_minLfo' label='' min='0.0' max='0.2' bdresolution='-1' automationEnabled='false' value='0.0063821496'>
<line name='' version='2' max='0.2' min='0.0' bdresolution='-1' color='-8355712' rightBound='false' endPointsLinked='false'>
<linePoint x='0.0' y='0.0063821496'/>
</line>
</parameter>
<parameter uniqueId='-104104271' name='ChorusON' 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>