forked from junh1024/Reaper-Surround
-
Notifications
You must be signed in to change notification settings - Fork 0
/
15.1 to 1oA Downmix (L).txt
127 lines (101 loc) · 2.75 KB
/
15.1 to 1oA Downmix (L).txt
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
desc:Downmix 15.1 to FuMa 1.2oA (WXYZR Fuma)
//Really, this is a big hack, but there's nothing free that does remotely the same thing.
//thx Bruce Wiggins for 1oA Hex & Aaron Heller (ADT) for 2oA R coefficients
slider1:0<0,1,1{Furse-Malham,Not ACN}>Channel Order (disabled)
slider2:1<0,1,1{No,Yes}>Downmix ELL
slider3:0<0,1,1{No,Yes}>(De)-Matrix Height
slider4:1<0,2,0.1>W Gain
slider5:1<0,2,0.1>X Gain
slider6:1<0,2,0.1>Y Gain
slider7:1<0,2,0.1>Z Gain
@init
Z_coeff=0.1987;
R_coeff=0.158;
// X is larger than R by 1.257785693x
// X is larger than U by 2.515571387
// R=-.158 for ELL ,+.0790 for Height
@slider
@sample
//De/Matrix
slider3 == 1 ? (
spl9 = spl9*-1;
spl13 = spl13*-1;
spl15 = spl15*-1;
);
W=0; X=0; Y=0; Z=0;
//bottom layer
W+=(spl10*0.2357)+(spl11*0.2357) ;
X+=(spl10*0.1987)+(spl11*0.1987) ;
Y+=(spl10*0.1147)+(spl11*-0.1147) ;
Z=(spl10+spl11)*Z_coeff;
R=(spl10+spl11)*(R_coeff/2);
U= (spl10+spl11)*(R_coeff/4);
//toplayer
W+=(spl8*0.2357)+(spl9*0.2357)+ (spl14*0.2357)+(spl15*0.2357)+ (spl12*0.2357) +(spl13*0.2357) ;
X+=(spl8*0.1987)+(spl9*0.1987)+ (spl14*0)+ (spl15*0)+ (spl12*-0.1987)+(spl13*-0.1987) ;
Y+=(spl8*0.1147)+(spl9*-0.1147)+(spl14*0.2294)+(spl15*-0.2294)+(spl12*0.1147) +(spl13*-0.1147) ;
Z+= (spl8*Z_coeff)+(spl9*Z_coeff)+(spl14*Z_coeff)+(spl15*Z_coeff)+(spl12*Z_coeff) +(spl13*Z_coeff) ;
R+=(spl8+spl9+ spl14+spl15+ spl12 +spl13 )*(R_coeff/2);
U+=((spl8+spl9+ spl14+spl15) *(R_coeff/4) ) +((spl12 +spl13 )*(R_coeff/-2));
// R=-.158 for ELL ,+.0790 for Height
// U=
// V=
//Downmix ELL
slider2 == 1?(
//downmix C
spl0+=spl2*0.7071 ;
spl1+=spl2*0.7071 ;
spl2=0;
//ell
W+=(spl0*0.2357)+(spl1*0.2357)+ (spl6*0.2357)+(spl7*0.2357)+ (spl4*0.2357) +(spl5*0.2357) ;
X+=(spl0*0.1987)+(spl1*0.1987)+ (spl6*0)+ (spl7*0)+ (spl4*-0.1987)+(spl5*-0.1987) ;
Y+=(spl0*0.1147)+(spl1*-0.1147)+(spl6*0.2294)+(spl7*-0.2294)+(spl4*0.1147) +(spl5*-0.1147) ;
R+=(spl0+spl1+spl6+spl7+spl4+spl5) *(-R_coeff);
// U+=((spl0+spl1+spl6+spl7) * (R_coeff/2)) + ((spl4+spl5) *(-R_coeff));
// U=
// V=
spl4 = 0;
spl5 = 0;
spl6 = 0;
spl7 = 0;
spl8 = 0;
spl9 = 0;
spl10 = 0;
spl11 = 0;
);
W*=slider4;
X*=slider5;
Y*=slider6;
Z*=slider7;
//Channel order - ACN
// slider1 == 1 ? (
// old_X=X;
// old_Y=Y;
// old_Z=Z;
// X=old_Y;
// Y=old_Z;
// Z=old_X;
// );
//stream output
//Downmix ELL
slider2 == 1?(
spl0=W ;
spl1=X ;
spl2=Y;
spl3=Z;
spl4=R;
//spl5=S;
// spl6=T;
// spl7=U;
)
:
( //dont downmix ELL
spl8 = W;
spl9 = X;
spl10 = Y;
spl11 = Z;
);
spl12= 0;
spl13= 0;
spl14= 0;
spl15= 0;