aboutsummaryrefslogtreecommitdiff
path: root/help/help-ambi_decode3.pd
blob: acc1c6dff15b18a78d64bccf42f8321623e232d8 (plain)
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
#N canvas 4 4 856 655 10;
#X obj 60 572 print;
#X text 513 156 1.arg: <float> ambisonic order;
#X obj 60 549 round_zero 1e-006;
#X text 348 312 ambisonic-order = n_ao;
#X text 536 387 ambisonic-order-group;
#X text 324 428 -90 <= delta <= +90;
#X text 324 440 -180 <= phi <= +180;
#X text 265 387 input: <ambi_weight> one mul-factor for each;
#X text 21 12 ambi_decode;
#X text 105 12 calculates a decoder-matrix;
#X obj 38 33 bng 35 250 50 0 empty empty empty 0 -6 0 8 -24198 -42246
-1;
#X text 265 336 input: <ls> index + phi [degree] .. 2-dimensional;
#X text 265 346 input: <ls> index + delta + phi [degree] .. 3-dimensional
;
#X text 265 360 input: <phls> index + phi [degree .. 2-dimensional
;
#X text 265 371 input: <phls> index + delta + phi [degree] .. 3-dimensional
;
#X text 289 518 <float> n_col = (2*n_ao+1) = number of ambisonic-channels
;
#X text 277 527 + <float> n_row = (n_ls) = number of loudspeakers;
#X text 517 313 number of loudspeakers = n_ls;
#X text 280 587 + <float> n_row = (n_ls) = number of loudspeakers;
#X text 265 568 output in case of 3d: <matrix> ((n_ao+1)*(n_ao+1)*n_ls+2)
;
#X text 263 507 output in case of 2d: <matrix> ((2*n_ao+1)*n_ls+2)
;
#X text 610 568 <float> :;
#X text 567 506 <float> :;
#X text 507 578 number of ambisonic-channels;
#X text 292 578 <float> n_col = (n_ao+1)*(n_ao+1) =;
#X text 478 597 <float> elements of a matrix;
#X text 280 597 + (n_ao + 1) * (n_ao + 1) * n_ls;
#X text 277 537 + (2*n_ao + 1) * n_ls <float> elements of a matrix
;
#X text 258 460 input: <pinv> calculates the pseudo-inverse of the
encoded;
#X text 314 471 loudspeaker-positions (+ the phantom-speakers);
#X text 328 482 and output a matrix-message;
#X text 339 417 1 <= index <= n_ao;
#X text 603 268 a regular matrix to inverse it);
#X text 426 399 to suppress the side-lobe-phenomena;
#X text 526 258 (it is sometimes necessary to add phantom-ls. for achieving
;
#X msg 272 130 ambi_weight 1 1 1 0.3904;
#X msg 123 129 ambi_weight 1 1 1 1;
#X msg 138 106 mirror_weight 0.7;
#X obj 94 237 pp pht_ls;
#X obj 38 77 t b b b b b b b;
#X text 528 174 (1 .. 5 in case of 3 dimensional);
#X text 528 165 (1 .. 12 in case of 2 dimensional);
#X text 514 196 3.arg: <float> number of independent loudspeakers;
#X text 513 184 2.arg: <float> dimension (2 or 3);
#X text 513 247 5.arg: <float> number of canceled phantom_loudspeakers
;
#X text 514 208 4.arg: <float> number of merged and mirrored loudspeakers
;
#X text 560 221 (the merged loudspeakers are at the border of the arc
;
#X text 573 233 or the hemisphere \, the mirrored loudspeakers are
;
#X obj 742 385 pp ind_ls;
#X msg 742 362 1 90 0 \, 2 45 45 \, 3 45 135 \, 4 45 225 \, 5 45 315
;
#X obj 728 450 pp mrg_ls;
#X msg 728 415 1 0 0 \, 2 0 45 \, 3 0 90 \, 4 0 135 \, 5 0 180 \, 6
0 225 \, 7 0 270 \, 8 0 315;
#X obj 714 507 pp mir_ls;
#X msg 714 472 1 -45 0 \, 2 -45 45 \, 3 -45 90 \, 4 -45 135 \, 5 -45
180 \, 6 -45 225 \, 7 -45 270 \, 8 -45 315;
#X obj 700 553 pp pht_ls;
#X msg 700 530 1 -90 0;
#X msg 108 155 1 90 0 \, 2 45 45 \, 3 45 135 \, 4 45 225 \, 5 45 315
\, 6 0 0 \, 7 0 45 \, 8 0 90 \, 9 0 135 \, 10 0 180 \, 11 0 225 \,
12 0 270 \, 13 0 315;
#X obj 108 190 pp real_ls;
#X msg 80 263 begin_pseudo_inverse;
#X obj 60 527 ambi_decode3 3 3 13 6;
#X msg 30 501 end_pseudo_inverse;
#X msg 94 215 1 -45 0 \, 2 -45 90 \, 3 -45 180 \, 4 -45 270 \, 6 -90
0;
#X msg 47 476 ipht_ireal_muladd \$1 \$2 \$3;
#N canvas 337 146 559 509 /SUBPATCH/ 0;
#X msg 142 186 1 6 \$1;
#X obj 102 58 inlet;
#X obj 101 441 outlet;
#X obj 162 59 inlet;
#X obj 71 135 f;
#X obj 103 135 f;
#X obj 157 106 * 0.25;
#X obj 214 106 * 0.5;
#X msg 163 211 2 8 \$1;
#X msg 40 187 1 13 \$1 \, 1 7 \$1;
#X msg 61 212 2 7 \$1 \, 2 9 \$1;
#X msg 179 241 3 10 \$1;
#X msg 77 242 3 9 \$1 \, 3 11 \$1;
#X msg 199 271 4 12 \$1;
#X msg 87 271 4 11 \$1 \, 4 13 \$1;
#X obj 162 81 route mirror_weight;
#X connect 0 0 2 0;
#X connect 1 0 4 0;
#X connect 1 0 5 0;
#X connect 3 0 15 0;
#X connect 4 0 9 0;
#X connect 4 0 10 0;
#X connect 4 0 12 0;
#X connect 4 0 14 0;
#X connect 5 0 0 0;
#X connect 5 0 8 0;
#X connect 5 0 11 0;
#X connect 5 0 13 0;
#X connect 6 0 4 1;
#X connect 7 0 5 1;
#X connect 8 0 2 0;
#X connect 9 0 2 0;
#X connect 10 0 2 0;
#X connect 11 0 2 0;
#X connect 12 0 2 0;
#X connect 13 0 2 0;
#X connect 14 0 2 0;
#X connect 15 0 7 0;
#X connect 15 0 6 0;
#X restore 47 436 pd;
#X connect 2 0 0 0;
#X connect 10 0 39 0;
#X connect 35 0 59 0;
#X connect 36 0 59 0;
#X connect 37 0 63 1;
#X connect 38 0 59 0;
#X connect 39 0 60 0;
#X connect 39 1 63 0;
#X connect 39 2 58 0;
#X connect 39 3 61 0;
#X connect 39 4 56 0;
#X connect 39 5 36 0;
#X connect 39 6 37 0;
#X connect 49 0 48 0;
#X connect 51 0 50 0;
#X connect 53 0 52 0;
#X connect 55 0 54 0;
#X connect 56 0 57 0;
#X connect 57 0 59 0;
#X connect 58 0 59 0;
#X connect 59 0 2 0;
#X connect 60 0 59 0;
#X connect 61 0 38 0;
#X connect 62 0 59 0;
#X connect 63 0 62 0;