-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathhoa.2d.rotate~-help.pd
210 lines (210 loc) · 9.01 KB
/
hoa.2d.rotate~-help.pd
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
#N struct 1060-t-scope float x array bufr 1060-t-scope-value-r array
bufg 1060-t-scope-value-g;
#N struct 1060-t-scope-value-r float x float y;
#N struct 1060-t-scope-value-g float x float y;
#N canvas 616 120 625 516 10;
#X obj 477 207 phasor~ 0.1;
#X msg 23 352 \; pd dsp 1;
#X msg 23 390 \; pd dsp 0;
#X obj 477 277 misc//hoa.number~;
#X obj 119 185 misc//hoa.hgain~;
#X obj 308 185 misc//hoa.hgain~;
#X obj 209 346 hoa.2d.rotate~ 4, f 28;
#X obj 209 452 hoa.2d.decoder~ 4 regular 10;
#X obj 119 234 hoa.2d.encoder~ 4, f 25;
#X obj 308 234 hoa.2d.encoder~ 4, f 25;
#X obj 149 484 hoa-help;
#X obj 6 7 cnv 15 200 20 empty empty hoa.2d.rotate~ 4 10 0 14 -233017
-66577 0;
#X obj 209 484 hoa.dac~ 1:10, f 28;
#N canvas 0 22 450 300 \$0-scope 0;
#X scalar 1060-t-scope 0 \; 0 0 \; 0 0 \; 0 0 \; 0 0 \; 0 0 \; 0 0
\; 0 0 \; 0 0 \; 0 0 \; 0 0 \; 0 0 \; 0 0 \; 0 0 \; 0 0 \; 0 0 \; 0
0 \; 0 0 \; 0 0 \; 0 0 \; 0 0 \; 0 0 \; 0 0 \; 0 0 \; 0 0 \; 0 0 \;
0 0 \; 0 0 \; 0 0 \; 0 0 \; 0 0 \; 0 0 \; 0.00797709 0.0152241 \; 0.027766
0.0578422 \; 0.0423248 0.0967339 \; 0.052 0.131203 \; 0.0572409 0.160672
\; 0.0585803 0.184694 \; 0.0566158 0.202959 \; 0.0519891 0.215302 \;
0.0453647 0.221703 \; 0.0374091 0.222285 \; 0.0287702 0.217305 \; 0.0200582
0.20715 \; 0.0118282 0.192316 \; 0.00456582 0.1734 \; -0.00132596 0.151076
\; -0.00553554 0.126076 \; -0.00784896 0.0991725 \; -0.00815273 0.0711538
\; -0.00643317 0.0428023 \; -0.00277266 0.0148748 \; -0 0 \; -0 0 \;
-0 0 \; -0 0 \; -0 0 \; -0 0 \; -0 0 \; -0 0 \; -0 0 \; -0 0 \; -0
0 \; -0 0 \; -0 0 \; -0 0 \; -0 0 \; -0 0 \; -0 0 \; -0 0 \; -0 0 \;
-0 0 \; -0.00902268 0.00685022 \; -0.0252346 0.017798 \; -0.0412689
0.0269894 \; -0.0566475 0.0342706 \; -0.0709053 0.0395657 \; -0.0836054
0.0428765 \; -0.0943535 0.0442779 \; -0.102809 0.0439122 \; -0.1087
0.0419812 \; -0.111825 0.038736 \; -0.112068 0.0344655 \; -0.109395
0.0294837 \; -0.103862 0.024117 \; -0.0956074 0.0186904 \; -0.0848498
0.013515 \; -0.0718833 0.00887581 \; -0.0570655 0.00502049 \; -0.0408084
0.00215056 \; -0.0235654 0.000413579 \; -0.00581549 -0.000102091 \;
-0 -0 \; -0 -0 \; -0 -0 \; -0 -0 \; -0 -0 \; -0 -0 \; -0 -0 \; -0 -0
\; -0 -0 \; -0 -0 \; -0 -0 \; -0 -0 \; -0 -0 \; -0 -0 \; -0 -0 \; -0
-0 \; -0 -0 \; -0 -0 \; -0 -0 \; -0 -0 \; -0.0101935 -0.00958589 \;
-0.0222383 -0.0224344 \; -0.0329374 -0.0356473 \; -0.0420287 -0.0488178
\; -0.0493142 -0.0615214 \; -0.0546651 -0.0733288 \; -0.0580234 -0.0838197
\; -0.0594048 -0.0925986 \; -0.058895 -0.0993079 \; -0.0566453 -0.103641
\; -0.0528664 -0.105352 \; -0.0478195 -0.10427 \; -0.0418049 -0.100304
\; -0.0351508 -0.093446 \; -0.0281998 -0.0837787 \; -0.0212957 -0.0714713
\; -0.0147694 -0.0567787 \; -0.00892681 -0.0400359 \; -0.00403494 -0.0216473
\; -0.000312513 -0.00207933 \; -0 -0 \; -0 -0 \; -0 -0 \; -0 -0 \;
0 -0 \; 0 -0 \; 0 -0 \; 0 -0 \; 0 -0 \; 0 -0 \; 0 -0 \; 0 -0 \; 0 -0
\; 0 -0 \; 0 -0 \; 0 -0 \; 0 -0 \; 0 -0 \; 0 -0 \; 0.000104288 -0.000169014
\; 0.0155232 -0.0232871 \; 0.032854 -0.0457236 \; 0.0516887 -0.0668539
\; 0.0715263 -0.08609 \; 0.0917833 -0.102899 \; 0.111806 -0.116821
\; 0.130886 -0.127484 \; 0.14828 -0.134615 \; 0.163227 -0.138051 \;
0.174969 -0.137747 \; 0.182776 -0.133776 \; 0.185964 -0.126332 \; 0.183919
-0.115724 \; 0.176114 -0.102367 \; 0.162132 -0.0867749 \; 0.141678
-0.0695455 \; 0.114592 -0.0513408 \; 0.0808625 -0.0328722 \; 0.0406316
-0.0148783 \; 0 -0 \; 0 -0 \; 0 -0 \; 0 -0 \; 0 -0 \; 0 -0 \; 0 -0
\; 0 -0 \; 0 -0 \; 0 0 \; \; 0.586402 0 \; 0.650627 0.0228474 \; 0.71066
0.0499727 \; 0.765441 0.0809039 \; 0.814003 0.115048 \; 0.85549 0.151706
\; 0.889178 0.190088 \; 0.914492 0.229335 \; 0.93102 0.268539 \; 0.938523
0.306767 \; 0.936938 0.343088 \; 0.926378 0.376595 \; 0.907133 0.406428
\; 0.879656 0.431801 \; 0.844555 0.45202 \; 0.802579 0.466505 \; 0.754593
0.474802 \; 0.701561 0.476601 \; 0.644523 0.471739 \; 0.584564 0.46021
\; 0.522797 0.442165 \; 0.460326 0.417905 \; 0.398228 0.38788 \; 0.337528
0.352673 \; 0.279172 0.312986 \; 0.224012 0.269626 \; 0.172782 0.223477
\; 0.126094 0.175489 \; 0.084418 0.126641 \; 0.0480836 0.0779272 \;
0.0172726 0.0303254 \; -0 -0 \; -0 -0 \; -0 -0 \; -0 -0 \; -0 -0 \;
-0 -0 \; -0 -0 \; -0 -0 \; -0 -0 \; -0 -0 \; -0 -0 \; -0 -0 \; -0 -0
\; -0 -0 \; 0 -0 \; 0 -0 \; 0 -0 \; 0 -0 \; 0 -0 \; 0 -0 \; -0.00265703
0.0119163 \; -0.00960482 0.0369235 \; -0.0177516 0.059576 \; -0.0267249
0.0793957 \; -0.0361139 0.0960051 \; -0.0454859 0.109134 \; -0.0544033
0.118625 \; -0.0624402 0.124429 \; -0.0691983 0.126607 \; -0.0743216
0.125319 \; -0.07751 0.120819 \; -0.0785297 0.113442 \; -0.0772225
0.103587 \; -0.0735114 0.0917075 \; -0.0674038 0.0782912 \; -0.0589919
0.0638449 \; -0.0484502 0.0488771 \; -0.03603 0.0338819 \; -0.0220509
0.0193238 \; -0.0068916 0.00562421 \; 0 -0 \; 0 -0 \; 0 -0 \; 0 -0
\; 0 -0 \; 0 -0 \; 0 -0 \; 0 -0 \; 0 -0 \; 0 -0 \; 0 -0 \; 0 -0 \;
0 -0 \; 0 -0 \; 0 -0 \; 0 -0 \; 0 -0 \; 0 -0 \; 0 -0 \; 0 0 \; -0.0119492
-0.000629763 \; -0.0292394 -0.00257255 \; -0.0455831 -0.00562859 \;
-0.060542 -0.00964354 \; -0.0737211 -0.0144122 \; -0.084783 -0.0196872
\; -0.0934566 -0.0251884 \; -0.0995451 -0.0306148 \; -0.102931 -0.0356557
\; -0.103578 -0.0400038 \; -0.101533 -0.0433676 \; -0.0969216 -0.0454835
\; -0.0899428 -0.0461271 \; -0.0808632 -0.0451228 \; -0.0700064 -0.0423529
\; -0.0577422 -0.0377631 \; -0.044473 -0.0313672 \; -0.0306221 -0.0232492
\; -0.0166176 -0.0135617 \; -0.00287946 -0.00252337 \; 0 0 \; 0 0 \;
0 0 \; 0 0 \; 0 0 \; 0 0 \; 0 0 \; 0 0 \; 0 0 \; 0 0 \; 0 0 \; 0 0
\; 0 0 \; 0 0 \; 0 0 \; 0 0 \; 0 0 \; 0 0 \; 0 0 \; 0 0 \; -0.00208001
-0.0181543 \; -0.00304739 -0.0385064 \; -0.00256449 -0.058414 \; -0.000678191
-0.0773121 \; 0.00249274 -0.0946529 \; 0.00676113 -0.109922 \; 0.0118771
-0.122655 \; 0.0175364 -0.13245 \; 0.0233911 -0.138986 \; 0.029062
-0.142026 \; 0.034153 -0.141435 \; 0.0382661 -0.137176 \; 0.0410174
-0.129319 \; 0.0420534 -0.11804 \; 0.0410659 -0.103613 \; 0.0378071
-0.0864076 \; 0.0321029 -0.0668762 \; 0.0238637 -0.0455428 \; 0.0130935
-0.0229879 \; -0 0 \; -0 0 \; -0 0 \; -0 0 \; -0 0 \; -0 0 \; -0 0
\; -0 0 \; -0 0 \; -0 0 \; -0 0 \; -0 0 \; -0 0 \; -0 0 \; -0 0 \;
-0 0 \; -0 0 \; -0 0 \; -0 0 \; -0 0 \; 0.00580864 -0.00189859 \; 0.0580078
-0.0167312 \; 0.115369 -0.0289315 \; 0.177157 -0.0378717 \; 0.242515
-0.0430046 \; 0.310474 -0.0438799 \; 0.379981 -0.0401606 \; 0.449914
-0.0316354 \; 0.519116 -0.0182269 \; 0.58641 2.61913e-06 \; \;;
#X coords -1 -1 1 1 164 165 2 100 100;
#X restore 420 336 pd \$0-scope;
#X obj 22 459 text define -k \$0-scope-attrs;
#A set gain 150 \; interval 150 \;;
#X obj 209 379 hoa.2d.process~ 4 hoa.2d.scope~ harmonics \$0-scope
\$0-scope-attrs, f 28;
#X obj 404 207 hoa.pi~ 1;
#X obj 216 208 hoa.pi~ 0;
#X obj 477 234 hoa.pi~ 2;
#X text 486 249 Angle of rotation θ in radian (-π & π), f 20;
#X text 474 157 The argument is the order of decomposition N., f 22
;
#X text 474 114 The last inlet set the angle of the rotation θ in
radian., f 22;
#X text 5 29 hoa.2d.rotate~ applies a rotation on the ambisonic sound
field. The rotation amounts for each degree l to combine and to weight
the signals of its two component harmonics to resynthesize them following
the formula:;
#X text 5 86 Y'[0 \, Ø](θ) = Y[0 \, Ø];
#X text 5 103 Y'[l \, -l](θ) = Y[l \, l]sin(lθ) + Y[l \, -l]cos(lθ)
;
#X text 5 120 Y'[l \, l](θ) = Y[l \, l]cos(lθ) - Y[l \, -l]sin(lθ)
;
#X obj 22 484 misc/hoa.credits;
#N canvas 0 22 450 300 source1~ 0;
#X obj 83 49 max~ 0;
#X obj 32 73 *~, f 9;
#X obj 32 27 noise~;
#X obj 83 27 osc~ 5;
#X obj 32 49 *~ 0.6;
#X obj 32 117 outlet~;
#X obj 32 95 lop~ 1400;
#X connect 0 0 1 1;
#X connect 1 0 6 0;
#X connect 2 0 4 0;
#X connect 3 0 0 0;
#X connect 4 0 1 0;
#X connect 6 0 5 0;
#X restore 119 150 pd source1~;
#N canvas 0 22 450 300 source2~ 0;
#X obj 22 78 *~, f 19;
#X obj 22 32 osc~ 87;
#X obj 73 31 osc~ 189;
#X obj 22 54 *~, f 9;
#X obj 133 54 max~ 0;
#X obj 133 32 osc~ 10;
#X obj 22 100 outlet~;
#X connect 0 0 6 0;
#X connect 1 0 3 0;
#X connect 2 0 3 1;
#X connect 3 0 0 0;
#X connect 4 0 0 1;
#X connect 5 0 4 0;
#X restore 308 150 pd source2~;
#X connect 0 0 18 0;
#X connect 4 0 8 0;
#X connect 5 0 9 0;
#X connect 6 0 7 0;
#X connect 6 0 15 0;
#X connect 6 1 7 1;
#X connect 6 1 15 1;
#X connect 6 2 7 2;
#X connect 6 2 15 2;
#X connect 6 3 7 3;
#X connect 6 3 15 3;
#X connect 6 4 7 4;
#X connect 6 4 15 4;
#X connect 6 5 7 5;
#X connect 6 5 15 5;
#X connect 6 6 7 6;
#X connect 6 6 15 6;
#X connect 6 7 7 7;
#X connect 6 7 15 7;
#X connect 6 8 7 8;
#X connect 6 8 15 8;
#X connect 7 0 12 0;
#X connect 7 1 12 1;
#X connect 7 2 12 2;
#X connect 7 3 12 3;
#X connect 7 4 12 4;
#X connect 7 5 12 5;
#X connect 7 6 12 6;
#X connect 7 7 12 7;
#X connect 7 8 12 8;
#X connect 7 9 12 9;
#X connect 8 0 6 0;
#X connect 8 1 6 1;
#X connect 8 2 6 2;
#X connect 8 3 6 3;
#X connect 8 4 6 4;
#X connect 8 5 6 5;
#X connect 8 6 6 6;
#X connect 8 7 6 7;
#X connect 8 8 6 8;
#X connect 9 0 6 0;
#X connect 9 1 6 1;
#X connect 9 2 6 2;
#X connect 9 3 6 3;
#X connect 9 4 6 4;
#X connect 9 5 6 5;
#X connect 9 6 6 6;
#X connect 9 7 6 7;
#X connect 9 8 6 8;
#X connect 16 0 9 1;
#X connect 17 0 8 1;
#X connect 18 0 3 0;
#X connect 18 0 6 9;
#X connect 27 0 4 0;
#X connect 28 0 5 0;
#X coords 0 516 1 515 100 60 0;