-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathab_mono
38 lines (25 loc) · 895 Bytes
/
ab_mono
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
desc:A/B two mono channels
//tags: utility processing routing
//author: Tale
// Copyright (C) 2011-2017 Theo Niessink
// License: LGPL - http://www.gnu.org/licenses/lgpl.html
// In "normal" mode this effect lets you switch between two mono input
// channels. In "diff" mode it will output the difference between the two
// channels. In both modes it will send the output signal to both the left
// and right channels (i.e. its output is "dual mono").
slider1:0<0,1,1{A,B}>Channel
slider2:0<0,1,1{Normal,Diff}>Mode
in_pin:A
in_pin:B
out_pin:Mono
out_pin:Mono
import rc_filter.jsfx-inc
@init
ch.a = mode.rc_sett(0.0075);
@slider
ch = slider1 >= 0.5;
mode = slider2 >= 0.5;
@sample
ch.rc_lp(ch);
mode.rc_lp(mode);
spl0 = spl1 = (1 - mode.lp) * ((1 - ch.lp) * spl0 + ch.lp * spl1) + mode.lp * ((1 - ch.lp) * (spl0 - spl1) + ch.lp * (spl1 - spl0));