-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFilterModule.binstr
824 lines (808 loc) · 33.7 KB
/
FilterModule.binstr
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
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
<instrument type='blue.orchestra.BlueSynthBuilder' editEnabled='true'>
<name>FilterModule</name>
<comment>
DESCRIPTION:
The Filter Module filters the audio signal in different ways
- depended on ADSR Module
- depended on Envelope Module (=GRAPH)
- amplitude or pitch follower
- mixes direct audio signal with filter
</comment>
<globalOrc/>
<globalSco/>
<instrumentText>
;2 inputs, 2 outputs
;================================filter=========================================
if <filterON> == 1 then
if i(<filter exponential switch>) == 1 then ; graphic filter envelope
kenvfilter loopxseg (<rate filter envelope>/p3), 0, 0, <envelope_filter envelope>, 0 ; exponential envelope
else
kenvfilter loopseg (<rate filter envelope>/p3), 0, 0, <envelope_filter envelope>, 0 ; or linear envelepe
endif
kcutoff expcurve <filter frequency cutoff>, 2 ; turn linear into exponential
if <filter follower> == 0 then ; disable follower
acutoff = kcutoff
elseif <filter follower> == 1 then ; amp --> filter
acutoff = iamp * kcutoff;
elseif <filter follower> == 2 then ; -(amp) --> filter
acutoff = kcutoff - (iamp * kcutoff)
elseif <filter follower> == 3 then ; key --> filter
acutoff = kcutoff * inum ;* kenvpitchbend
elseif <filter follower> == 4 then ; -(key) --> filter
acutoff = kcutoff * 1/inum; * kenvpitchbend
endif
if (<filter envelopes> == 0) then ; envelopes disabled
; do nothing, just pass through
elseif (<filter envelopes> == 1) then ; filter ADS envelope
aretrig init 1
agate = linseg:a(1, p3 - i(<ADSR release>), 1, 0, 0, i(<ADSR release>), 0)
acutenv adsr140 agate, aretrig, <filter attack>, <filter decay>, <filter sustain>, <filter release> * <ADSR release>
acutoff *= acutenv * <filter ADS depth>
elseif (<filter envelopes> == 2) then ; filter graphical envelope
acutoff *= (kenvfilter * <filter envelope depth>)
elseif (<filter envelopes> == 3) then ; filter ADS envelope and graphical combined
acuto = (kenvfilter * <filter envelope depth> * 10000)
aretrig init 1
agate = linseg:a(1, p3 - i(<ADSR release>), 1, 0, 0, i(<ADSR release>), 0)
afilterads adsr140 agate, aretrig, <filter attack>, <filter decay>, <filter sustain>, <filter release> * <ADSR release>
acutoff = acuto + (afilterads * <filter ADS depth> * 10000)
endif
acutoff *= <filter total depth> ; total depth of filter
acutoff limit acutoff, 20, 21000 ; limit frequency band of filter
; the filters
kQ = <filter resonance>
al, abpL, ahpL zdf_2pole_mode asigFL, acutoff, kQ ; don't use lowpass filter here
ar, abpR, ahpR zdf_2pole_mode asigFR, acutoff, kQ ; use only for bandpass and highpass (12 dB)
alpL zdf_ladder asigFL, acutoff, kQ ; but use this lowpass (24 dB)
alpR zdf_ladder asigFR, acutoff, kQ
alpL *= <filter lowpass gain> ; filters gain Left
ahpL *= <filter highpass gain>
abpL *= <filter bandpass gain>
alpR *= <filter lowpass gain> ; filters gain Right
ahpR *= <filter highpass gain>
abpR *= <filter bandpass gain>
aoutL = (ahpL + alpL + abpL) ; mix all filter gains
aoutR = (ahpR + alpR + abpR)
aoutL ntrpol aoutL, asigFL, <output filters>
aoutR ntrpol aoutR, asigFR, <output filters>
else
aoutL = asigFL
aoutR = asigFR
endif
;==============================================================================
;blueMixerOut aoutL, aoutR</instrumentText>
<alwaysOnInstrumentText></alwaysOnInstrumentText>
<graphicInterface editEnabled='false'>
<gridSettings>
<width>10</width>
<height>10</height>
<gridStyle>DOT</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>
<font>
<name>Roboto</name>
<size>12.0</size>
<style>0</style>
</font>
<bsbObject type='blue.orchestra.blueSynthBuilder.BSBGroup'>
<objectName></objectName>
<x>0</x>
<y>0</y>
<groupName>filters</groupName>
<backgroundColor>0x282828ff</backgroundColor>
<borderColor>0x000000ff</borderColor>
<labelTextColor>0xffffffff</labelTextColor>
<titleEnabled>true</titleEnabled>
<width>940</width>
<height>20</height>
<font>
<name>Roboto</name>
<size>12.0</size>
<style>2</style>
</font>
<bsbObject type='blue.orchestra.blueSynthBuilder.BSBGroup'>
<objectName></objectName>
<x>494</x>
<y>13</y>
<groupName>envelopes</groupName>
<backgroundColor>0x3a3a3aff</backgroundColor>
<borderColor>0x000000ff</borderColor>
<labelTextColor>0xffffffff</labelTextColor>
<titleEnabled>false</titleEnabled>
<width>313</width>
<height>91</height>
<font>
<name>Roboto</name>
<size>12.0</size>
<style>0</style>
</font>
<bsbObject type='blue.orchestra.blueSynthBuilder.BSBKnob' version='2'>
<objectName>filter attack</objectName>
<x>11</x>
<y>32</y>
<comment>attack portion of envelope</comment>
<automationAllowed>true</automationAllowed>
<minimum>0.0</minimum>
<maximum>3.0</maximum>
<value>2.7908887414584433</value>
<knobWidth>31</knobWidth>
<randomizable>true</randomizable>
<valueDisplayEnabled>false</valueDisplayEnabled>
<label>attack</label>
<labelEnabled>true</labelEnabled>
<font>
<name>Roboto</name>
<size>12.0</size>
<style>0</style>
</font>
</bsbObject>
<bsbObject type='blue.orchestra.blueSynthBuilder.BSBKnob' version='2'>
<objectName>filter sustain</objectName>
<x>91</x>
<y>32</y>
<comment>sustain portion of envelope</comment>
<automationAllowed>true</automationAllowed>
<minimum>0.0</minimum>
<maximum>1.0</maximum>
<value>1.0</value>
<knobWidth>31</knobWidth>
<randomizable>true</randomizable>
<valueDisplayEnabled>false</valueDisplayEnabled>
<label>sustain</label>
<labelEnabled>true</labelEnabled>
<font>
<name>Roboto</name>
<size>12.0</size>
<style>0</style>
</font>
</bsbObject>
<bsbObject type='blue.orchestra.blueSynthBuilder.BSBLabel' version='2'>
<objectName></objectName>
<x>284</x>
<y>55</y>
<label>exp</label>
<font>
<name>Roboto</name>
<size>12.0</size>
<style>0</style>
</font>
</bsbObject>
<bsbObject type='blue.orchestra.blueSynthBuilder.BSBLabel' version='2'>
<objectName></objectName>
<x>67</x>
<y>6</y>
<label>adsr</label>
<font>
<name>Roboto</name>
<size>18.0</size>
<style>0</style>
</font>
</bsbObject>
<bsbObject type='blue.orchestra.blueSynthBuilder.BSBLabel' version='2'>
<objectName></objectName>
<x>187</x>
<y>6</y>
<label>depth</label>
<font>
<name>Roboto</name>
<size>12.0</size>
<style>0</style>
</font>
</bsbObject>
<bsbObject type='blue.orchestra.blueSynthBuilder.BSBKnob' version='2'>
<objectName>filter release</objectName>
<x>140</x>
<y>32</y>
<comment>release portion of filter envelope.
Is relative to Amplitude envelope
</comment>
<automationAllowed>true</automationAllowed>
<minimum>0.0</minimum>
<maximum>1.0</maximum>
<value>0.7602193222705109</value>
<knobWidth>31</knobWidth>
<randomizable>true</randomizable>
<valueDisplayEnabled>false</valueDisplayEnabled>
<label>release</label>
<labelEnabled>true</labelEnabled>
<font>
<name>Roboto</name>
<size>12.0</size>
<style>0</style>
</font>
</bsbObject>
<bsbObject type='blue.orchestra.blueSynthBuilder.BSBVSlider' version='2'>
<objectName>filter envelope depth</objectName>
<x>298</x>
<y>20</y>
<comment>gain of filter envelope</comment>
<automationAllowed>true</automationAllowed>
<minimum>0.0</minimum>
<maximum>1.0</maximum>
<bdresolution>0.05</bdresolution>
<value>1.0</value>
<sliderHeight>57</sliderHeight>
<randomizable>true</randomizable>
<valueDisplayEnabled>false</valueDisplayEnabled>
</bsbObject>
<bsbObject type='blue.orchestra.blueSynthBuilder.BSBKnob' version='2'>
<objectName>filter decay</objectName>
<x>53</x>
<y>32</y>
<comment>decay portion of envelope</comment>
<automationAllowed>true</automationAllowed>
<minimum>0.0</minimum>
<maximum>1.0</maximum>
<value>0.5803389468748646</value>
<knobWidth>31</knobWidth>
<randomizable>true</randomizable>
<valueDisplayEnabled>false</valueDisplayEnabled>
<label>decay</label>
<labelEnabled>true</labelEnabled>
<font>
<name>Roboto</name>
<size>12.0</size>
<style>0</style>
</font>
</bsbObject>
<bsbObject type='blue.orchestra.blueSynthBuilder.BSBCheckBox'>
<objectName>filter exponential switch</objectName>
<x>283</x>
<y>39</y>
<comment>treat anvelope ar exponential</comment>
<automationAllowed>true</automationAllowed>
<label/>
<selected>true</selected>
<randomizable>true</randomizable>
</bsbObject>
<bsbObject type='blue.orchestra.blueSynthBuilder.BSBVSlider' version='2'>
<objectName>filter ADS depth</objectName>
<x>177</x>
<y>20</y>
<comment>gain of ADS envelope</comment>
<automationAllowed>true</automationAllowed>
<minimum>0.0</minimum>
<maximum>1.0</maximum>
<bdresolution>0.01</bdresolution>
<value>1.0</value>
<sliderHeight>57</sliderHeight>
<randomizable>true</randomizable>
<valueDisplayEnabled>false</valueDisplayEnabled>
</bsbObject>
<bsbObject type='blue.orchestra.blueSynthBuilder.BSBLabel' version='2'>
<objectName></objectName>
<x>305</x>
<y>6</y>
<label>depth</label>
<font>
<name>Roboto</name>
<size>12.0</size>
<style>0</style>
</font>
</bsbObject>
<bsbObject type='blue.orchestra.blueSynthBuilder.BSBLabel' version='2'>
<objectName></objectName>
<x>249</x>
<y>6</y>
<label>graph</label>
<font>
<name>Roboto</name>
<size>18.0</size>
<style>0</style>
</font>
</bsbObject>
<bsbObject type='blue.orchestra.blueSynthBuilder.BSBKnob' version='2'>
<objectName>rate filter envelope</objectName>
<x>239</x>
<y>32</y>
<comment>frequency rate of filter envelope</comment>
<automationAllowed>true</automationAllowed>
<minimum>1.0</minimum>
<maximum>30.0</maximum>
<value>1.0</value>
<knobWidth>31</knobWidth>
<randomizable>true</randomizable>
<valueDisplayEnabled>false</valueDisplayEnabled>
<label>rate</label>
<labelEnabled>true</labelEnabled>
<font>
<name>Roboto</name>
<size>12.0</size>
<style>0</style>
</font>
</bsbObject>
</bsbObject>
<bsbObject type='blue.orchestra.blueSynthBuilder.BSBLabel' version='2'>
<objectName></objectName>
<x>362</x>
<y>15</y>
<label>filter follow modes</label>
<font>
<name>Roboto</name>
<size>12.0</size>
<style>0</style>
</font>
</bsbObject>
<bsbObject type='blue.orchestra.blueSynthBuilder.BSBCheckBox'>
<objectName>filterON</objectName>
<x>10</x>
<y>10</y>
<comment>filters ON or OFF</comment>
<automationAllowed>true</automationAllowed>
<label>filters</label>
<selected>false</selected>
<randomizable>true</randomizable>
</bsbObject>
<bsbObject type='blue.orchestra.blueSynthBuilder.BSBGroup'>
<objectName></objectName>
<x>74</x>
<y>13</y>
<groupName>envelopes</groupName>
<backgroundColor>0x3a3a3aff</backgroundColor>
<borderColor>0x000000ff</borderColor>
<labelTextColor>0xffffffff</labelTextColor>
<titleEnabled>false</titleEnabled>
<width>20</width>
<height>90</height>
<font>
<name>Roboto</name>
<size>12.0</size>
<style>0</style>
</font>
<bsbObject type='blue.orchestra.blueSynthBuilder.BSBKnob' version='2'>
<objectName>filter frequency cutoff</objectName>
<x>116</x>
<y>6</y>
<comment>cutoff frequency of filters</comment>
<automationAllowed>true</automationAllowed>
<minimum>4.35</minimum>
<maximum>14.3</maximum>
<value>5.467451444675433</value>
<knobWidth>40</knobWidth>
<randomizable>true</randomizable>
<valueDisplayEnabled>true</valueDisplayEnabled>
<label>cutoff</label>
<labelEnabled>true</labelEnabled>
<font>
<name>Roboto</name>
<size>12.0</size>
<style>0</style>
</font>
</bsbObject>
<bsbObject type='blue.orchestra.blueSynthBuilder.BSBVSlider' version='2'>
<objectName>filter highpass gain</objectName>
<x>36</x>
<y>18</y>
<comment>gain of highpass filter</comment>
<automationAllowed>true</automationAllowed>
<minimum>0.0</minimum>
<maximum>0.5</maximum>
<bdresolution>0.1</bdresolution>
<value>0.0</value>
<sliderHeight>56</sliderHeight>
<randomizable>true</randomizable>
<valueDisplayEnabled>false</valueDisplayEnabled>
</bsbObject>
<bsbObject type='blue.orchestra.blueSynthBuilder.BSBVSlider' version='2'>
<objectName>filter lowpass gain</objectName>
<x>4</x>
<y>18</y>
<comment>gain of lowpass filter</comment>
<automationAllowed>true</automationAllowed>
<minimum>0.0</minimum>
<maximum>2.5</maximum>
<bdresolution>0.1</bdresolution>
<value>1.3</value>
<sliderHeight>56</sliderHeight>
<randomizable>true</randomizable>
<valueDisplayEnabled>false</valueDisplayEnabled>
</bsbObject>
<bsbObject type='blue.orchestra.blueSynthBuilder.BSBKnob' version='2'>
<objectName>filter total depth</objectName>
<x>217</x>
<y>6</y>
<comment>gain of filters</comment>
<automationAllowed>true</automationAllowed>
<minimum>0.0</minimum>
<maximum>1.0</maximum>
<value>1.0</value>
<knobWidth>40</knobWidth>
<randomizable>true</randomizable>
<valueDisplayEnabled>true</valueDisplayEnabled>
<label>depth</label>
<labelEnabled>true</labelEnabled>
<font>
<name>Roboto</name>
<size>12.0</size>
<style>0</style>
</font>
</bsbObject>
<bsbObject type='blue.orchestra.blueSynthBuilder.BSBLabel' version='2'>
<objectName></objectName>
<x>15</x>
<y>6</y>
<label>low</label>
<font>
<name>Roboto</name>
<size>12.0</size>
<style>0</style>
</font>
</bsbObject>
<bsbObject type='blue.orchestra.blueSynthBuilder.BSBVSlider' version='2'>
<objectName>filter bandpass gain</objectName>
<x>68</x>
<y>18</y>
<comment>gain of bandpass filter</comment>
<automationAllowed>true</automationAllowed>
<minimum>0.0</minimum>
<maximum>0.5</maximum>
<bdresolution>0.1</bdresolution>
<value>0.0</value>
<sliderHeight>56</sliderHeight>
<randomizable>true</randomizable>
<valueDisplayEnabled>false</valueDisplayEnabled>
</bsbObject>
<bsbObject type='blue.orchestra.blueSynthBuilder.BSBKnob' version='2'>
<objectName>filter resonance</objectName>
<x>160</x>
<y>6</y>
<comment>gain of feedback of filters</comment>
<automationAllowed>true</automationAllowed>
<minimum>0.5</minimum>
<maximum>25.0</maximum>
<value>20.69561487394158</value>
<knobWidth>40</knobWidth>
<randomizable>true</randomizable>
<valueDisplayEnabled>true</valueDisplayEnabled>
<label>resonance</label>
<labelEnabled>true</labelEnabled>
<font>
<name>Roboto</name>
<size>12.0</size>
<style>0</style>
</font>
</bsbObject>
<bsbObject type='blue.orchestra.blueSynthBuilder.BSBLabel' version='2'>
<objectName></objectName>
<x>42</x>
<y>6</y>
<label>high</label>
<font>
<name>Roboto</name>
<size>12.0</size>
<style>0</style>
</font>
</bsbObject>
<bsbObject type='blue.orchestra.blueSynthBuilder.BSBLabel' version='2'>
<objectName></objectName>
<x>72</x>
<y>6</y>
<label>bndP</label>
<font>
<name>Roboto</name>
<size>12.0</size>
<style>0</style>
</font>
</bsbObject>
</bsbObject>
<bsbObject type='blue.orchestra.blueSynthBuilder.BSBLabel' version='2'>
<objectName></objectName>
<x>885</x>
<y>85</y>
<label>filtered</label>
<font>
<name>Roboto</name>
<size>12.0</size>
<style>0</style>
</font>
</bsbObject>
<bsbObject type='blue.orchestra.blueSynthBuilder.BSBLabel' version='2'>
<objectName></objectName>
<x>885</x>
<y>25</y>
<label>direct</label>
<font>
<name>Roboto</name>
<size>12.0</size>
<style>0</style>
</font>
</bsbObject>
<bsbObject type='blue.orchestra.blueSynthBuilder.BSBLabel' version='2'>
<objectName></objectName>
<x>870</x>
<y>15</y>
<label>mix</label>
<font>
<name>Roboto</name>
<size>12.0</size>
<style>0</style>
</font>
</bsbObject>
<bsbObject type='blue.orchestra.blueSynthBuilder.BSBDropdown' version='2'>
<objectName>filter follower</objectName>
<x>355</x>
<y>35</y>
<comment>open and close filter depending on amplitude or frequency</comment>
<automationAllowed>true</automationAllowed>
<selectedIndex>1</selectedIndex>
<fontSize>12</fontSize>
<randomizable>true</randomizable>
<bsbDropdownItemList>
<bsbDropdownItem uniqueId='-1585864569'>
<name>envelopes</name>
<value>0</value>
</bsbDropdownItem>
<bsbDropdownItem uniqueId='-1585864568'>
<name>amp follow</name>
<value>1</value>
</bsbDropdownItem>
<bsbDropdownItem uniqueId='-1585864567'>
<name>amp follow invert</name>
<value>2</value>
</bsbDropdownItem>
<bsbDropdownItem uniqueId='-1585864566'>
<name>key follow</name>
<value>3</value>
</bsbDropdownItem>
<bsbDropdownItem uniqueId='-1585864565'>
<name>key follow invert</name>
<value>4</value>
</bsbDropdownItem>
</bsbDropdownItemList>
</bsbObject>
<bsbObject type='blue.orchestra.blueSynthBuilder.BSBDropdown' version='2'>
<objectName>filter envelopes</objectName>
<x>365</x>
<y>70</y>
<comment>bypass envelopes, or choose one of them or both of them</comment>
<automationAllowed>true</automationAllowed>
<selectedIndex>2</selectedIndex>
<fontSize>12</fontSize>
<randomizable>true</randomizable>
<bsbDropdownItemList>
<bsbDropdownItem uniqueId='-1585864573'>
<name>disabled</name>
<value>0</value>
</bsbDropdownItem>
<bsbDropdownItem uniqueId='-1585864572'>
<name>AttDecSusRel</name>
<value>1</value>
</bsbDropdownItem>
<bsbDropdownItem uniqueId='-1585864571'>
<name>Graphic</name>
<value>2</value>
</bsbDropdownItem>
<bsbDropdownItem uniqueId='-1585864570'>
<name>ADS+Graphic</name>
<value>3</value>
</bsbDropdownItem>
</bsbDropdownItemList>
</bsbObject>
<bsbObject type='blue.orchestra.blueSynthBuilder.BSBVSlider' version='2'>
<objectName>output filters</objectName>
<x>855</x>
<y>25</y>
<comment>mix direct with filtered signal</comment>
<automationAllowed>true</automationAllowed>
<minimum>0.0</minimum>
<maximum>1.0</maximum>
<bdresolution>0.001</bdresolution>
<value>0.0</value>
<sliderHeight>80</sliderHeight>
<randomizable>true</randomizable>
<valueDisplayEnabled>false</valueDisplayEnabled>
</bsbObject>
</bsbObject>
</bsbObject>
</graphicInterface>
<parameterList>
<parameter uniqueId='-1585864563' name='filter frequency cutoff' label='' min='4.35' max='14.3' bdresolution='-1' automationEnabled='false' value='5.467451444675433'>
<line name='' version='2' max='14.3' min='4.35' bdresolution='-1' color='-8355712' rightBound='false' endPointsLinked='false'>
<linePoint x='0.0' y='5.467451444675433'/>
</line>
</parameter>
<parameter uniqueId='-1585864561' name='filter bandpass gain' label='' min='0.0' max='0.5' bdresolution='0.1' automationEnabled='false' value='0.0'>
<line name='' version='2' max='0.5' min='0.0' bdresolution='0.1' color='-8355712' rightBound='false' endPointsLinked='false'>
<linePoint x='0.0' y='0.0'/>
</line>
</parameter>
<parameter uniqueId='-1585864559' name='filter resonance' label='' min='0.5' max='25.0' bdresolution='-1' automationEnabled='false' value='20.69561487394158'>
<line name='' version='2' max='25.0' min='0.5' bdresolution='-1' color='-8355712' rightBound='false' endPointsLinked='false'>
<linePoint x='0.0' y='20.69561487394158'/>
</line>
</parameter>
<parameter uniqueId='-1585864557' name='filter highpass gain' label='' min='0.0' max='0.5' bdresolution='0.1' automationEnabled='false' value='0.0'>
<line name='' version='2' max='0.5' min='0.0' bdresolution='0.1' color='-8355712' rightBound='false' endPointsLinked='false'>
<linePoint x='0.0' y='0.0'/>
</line>
</parameter>
<parameter uniqueId='-1585864555' name='filter lowpass gain' label='' min='0.0' max='2.5' bdresolution='0.1' automationEnabled='false' value='1.3'>
<line name='' version='2' max='2.5' min='0.0' bdresolution='0.1' color='-8355712' rightBound='false' endPointsLinked='false'>
<linePoint x='0.0' y='1.3'/>
</line>
</parameter>
<parameter uniqueId='-1585864553' name='filter total depth' 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>
<parameter uniqueId='-1585864551' name='filter envelope depth' label='' min='0.0' max='1.0' bdresolution='0.05' automationEnabled='false' value='1.0'>
<line name='' version='2' max='1.0' min='0.0' bdresolution='0.05' color='-8355712' rightBound='false' endPointsLinked='false'>
<linePoint x='0.0' y='1.0'/>
</line>
</parameter>
<parameter uniqueId='-1585864549' name='rate filter envelope' label='' min='1.0' max='30.0' bdresolution='-1' automationEnabled='false' value='1.0'>
<line name='' version='2' max='30.0' min='1.0' bdresolution='-1' color='-8355712' rightBound='false' endPointsLinked='false'>
<linePoint x='0.0' y='1.0'/>
</line>
</parameter>
<parameter uniqueId='-1585864547' name='filter exponential switch' 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>
<parameter uniqueId='-1585864545' name='filter attack' label='' min='0.0' max='3.0' bdresolution='-1' automationEnabled='false' value='2.7908887414584433'>
<line name='' version='2' max='3.0' min='0.0' bdresolution='-1' color='-8355712' rightBound='false' endPointsLinked='false'>
<linePoint x='0.0' y='2.7908887414584433'/>
</line>
</parameter>
<parameter uniqueId='-1585864543' name='filter release' label='' min='0.0' max='1.0' bdresolution='-1' automationEnabled='false' value='0.7602193222705109'>
<line name='' version='2' max='1.0' min='0.0' bdresolution='-1' color='-8355712' rightBound='false' endPointsLinked='false'>
<linePoint x='0.0' y='0.7602193222705109'/>
</line>
</parameter>
<parameter uniqueId='-1585864541' name='filter decay' label='' min='0.0' max='1.0' bdresolution='-1' automationEnabled='false' value='0.5803389468748646'>
<line name='' version='2' max='1.0' min='0.0' bdresolution='-1' color='-8355712' rightBound='false' endPointsLinked='false'>
<linePoint x='0.0' y='0.5803389468748646'/>
</line>
</parameter>
<parameter uniqueId='-1585864539' name='filter ADS depth' label='' min='0.0' max='1.0' bdresolution='0.01' automationEnabled='false' value='1.0'>
<line name='' version='2' max='1.0' min='0.0' bdresolution='0.01' color='-8355712' rightBound='false' endPointsLinked='false'>
<linePoint x='0.0' y='1.0'/>
</line>
</parameter>
<parameter uniqueId='-1585864537' name='filter sustain' 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>
<parameter uniqueId='-1585864535' name='filterON' 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='-1585864533' name='filter envelopes' label='' min='0.0' max='3.0' bdresolution='1' automationEnabled='false' value='2.0'>
<line name='' version='2' max='3.0' min='0.0' bdresolution='1' color='-8355712' rightBound='false' endPointsLinked='false'>
<linePoint x='0.0' y='2.0'/>
</line>
</parameter>
<parameter uniqueId='-1585864531' name='filter follower' label='' min='0.0' max='4.0' bdresolution='1' automationEnabled='false' value='1.0'>
<line name='' version='2' max='4.0' min='0.0' bdresolution='1' color='-8355712' rightBound='false' endPointsLinked='false'>
<linePoint x='0.0' y='1.0'/>
</line>
</parameter>
<parameter uniqueId='-1585864529' name='output filters' label='' min='0.0' max='1.0' bdresolution='0.001' automationEnabled='false' value='0.0'>
<line name='' version='2' max='1.0' min='0.0' bdresolution='0.001' color='-8355712' rightBound='false' endPointsLinked='false'>
<linePoint x='0.0' y='0.0'/>
</line>
</parameter>
</parameterList>
<presetGroup name='Presets'/>
<opcodeList>
<udo>
<opcodeName>adsr140_calc_coef</opcodeName>
<outTypes>k</outTypes>
<inTypes>kk</inTypes>
<codeBody>
knum_samps, kratio xin
xout exp( -log((1.0 + kratio) / kratio) / knum_samps)
</codeBody>
<comments></comments>
</udo>
<udo>
<opcodeName>adsr140</opcodeName>
<outTypes>a</outTypes>
<inTypes>aakkkk</inTypes>
<codeBody>agate, aretrig, kattack, kdecay, ksustain, krelease xin
kstate init 0 ; 0 = attack, 1 = decay, 2 = sustain
klasttrig init -1
kval init 0.0
asig init 0
kindx = 0
kattack_base init 0
kdecay_base init 0
krelease_base init 0
kattack_samps init 0
kdecay_samps init 0
krelease_samps init 0
kattack_coef init 0
kdecay_coef init 0
ksustain_coef init 0
klast_attack init -1
klast_decay init -1
klast_release init -1
if (klast_attack != kattack) then
klast_attack = kattack
if(kattack > 0) then
kattack_samps = kattack * sr
kattack_coef = adsr140_calc_coef(kattack_samps, 0.3)
kattack_base = (1.0 + 0.3) * (1 - kattack_coef)
else
kattack_samps = 0
kattack_coef = 0
kattack_base = 0
endif
endif
if (klast_decay != kdecay) then
klast_decay = kdecay
kdecay_samps = kdecay * sr
kdecay_coef = adsr140_calc_coef(kdecay_samps, 0.0001)
kdecay_base = (ksustain - 0.0001) * (1.0 - kdecay_coef)
endif
if (klast_release != krelease) then
klast_release = krelease
krelease_samps = krelease * sr
krelease_coef = adsr140_calc_coef(krelease_samps, 0.0001)
krelease_base = -0.0001 * (1.0 - krelease_coef)
endif
while (kindx < ksmps) do
if (agate[kindx] > 0) then
kretrig = aretrig[kindx]
if (kretrig > 0 && klasttrig <= 0) then
kstate = 0
endif
klasttrig = kretrig
if (kstate == 0) then
if(kattack <= 0) then
kval = 1.0
kstate = 1
else
kval = kattack_base + (kval * kattack_coef)
if(kval >= 1.0) then
kval = 1.0
kstate = 1
endif
asig[kindx] = kval
endif
elseif (kstate == 1) then
kval = kdecay_base + (kval * kdecay_coef)
if(kval <= ksustain) then
kval = ksustain
kstate = 2
endif
asig[kindx] = kval
else
asig[kindx] = ksustain
endif
else ; in a release state
kstate = 0
if (kval == 0.0) then
asig[kindx] = 0
else
; releasing
kval = krelease_base + (kval * krelease_coef)
if(kval <= 0.0) then
kval = 0.0
endif
asig[kindx] = kval
endif
endif
kindx += 1
od
xout asig
</codeBody>
<comments></comments>
</udo>
</opcodeList>
</instrument>