Hello,
I'm trying to get a 2D, 2nd order ambisonics system to run using
ambi_encode and ambi_decode.
The results I become seem to be faulty.
Am I right when I put the encoder result in a matrix (vector), multiply
it with the decoder matrix?
Like, p=C*B
where p is the weighting of each loudspeaker for a particular position,
C the decoder matrix
and B the Spherical Harmonics matrix (vector).
And then multiply the signal with each value of p to get the loudspeaker
output!?
Results seem to be right for positions, which are the same as the
loudspeaker positons.
But for positions in between I get something not comprehensible.
Maybe you can help me!
my patch is attached.
regards
Fabio
------------------------------------------------------------------------
#N canvas 321 0 826 699 10;
#X floatatom -84 69 5 0 0 0 - - -;
#X obj -85 94 ambi_encode 2;
#X obj 389 173 ambi_decode3 2 2 5 0;
#X obj 420 99 pp real_ls;
#X msg 399 122 begin_pseudo_inverse;
#X msg 387 143 end_pseudo_inverse;
#X obj 369 54 t b b b;
#X obj 385 228 mtx_print decode;
#X obj 172 250 mtx_mul;
#X obj 190 275 mtx_print mul;
#X obj -88 140 mtx_print 2d_enc;
#X obj -85 116 mtx 5 1;
#X msg 422 75 1 -30 \, 2 0 \, 3 30 \, 4 120 \, 5 -120;
#X obj 116 409 pink~;
#X obj 164 475 *~;
#X obj 194 474 *~;
#X obj 221 475 *~;
#X obj 246 475 *~;
#X obj 271 474 *~;
#X obj 163 497 *~;
#X obj 193 496 *~;
#X obj 220 497 *~;
#X obj 245 497 *~;
#X obj 270 496 *~;
#X obj 354 363 vsl 15 128 0 1 0 0 empty empty empty 0 -9 0 10 -262144
-1 -1 0 1;
#X obj 183 530 dac~ 1 2 3 5 6;
#X floatatom 157 332 5 0 0 0 - - -;
#X floatatom 190 332 5 0 0 0 - - -;
#X floatatom 224 332 5 0 0 0 - - -;
#X floatatom 257 332 5 0 0 0 - - -;
#X floatatom 290 333 5 0 0 0 - - -;
#X obj 175 308 unpack 0 0 0 0 0 0 0 0;
#X msg 355 341 0;
#X obj -80 46 hsl 128 15 -180 180 0 0 empty empty empty -2 -8 0 10
-262144 -1 -1 4500 1;
#X obj 389 195 mtx 5 5;
#X obj 198 171 t b;
#X obj -75 453 readsf~;
#X msg -100 428 1;
#X msg -113 461 0;
#X msg -64 408 open ../doc/sound/voice.wav;
#X obj -97 355 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
-1 -1;
#X obj -35 430 t b;
#X obj -61 335 metro 2000;
#X obj 375 30 loadbang;
#X text -47 68 Phi;
#X text 7 93 Encode 2D;
#X text 324 260;
#X text -31 118 spherical Harmonics vector b;
#X text 521 164 pseudo inverse decoder matrix D 2D \, 5 real speakers
;
#X text 230 240 p=D*b p...weighting of speakers;
#X connect 0 0 1 0;
#X connect 1 0 11 0;
#X connect 2 0 34 0;
#X connect 3 0 2 0;
#X connect 4 0 2 0;
#X connect 5 0 2 0;
#X connect 6 0 5 0;
#X connect 6 1 4 0;
#X connect 6 2 12 0;
#X connect 8 0 31 0;
#X connect 8 0 9 0;
#X connect 11 0 8 1;
#X connect 11 0 35 0;
#X connect 11 0 10 0;
#X connect 12 0 3 0;
#X connect 14 0 19 0;
#X connect 15 0 20 0;
#X connect 16 0 21 0;
#X connect 17 0 22 0;
#X connect 18 0 23 0;
#X connect 19 0 25 0;
#X connect 20 0 25 1;
#X connect 21 0 25 2;
#X connect 22 0 25 3;
#X connect 23 0 25 4;
#X connect 24 0 23 1;
#X connect 24 0 22 1;
#X connect 24 0 21 1;
#X connect 24 0 20 1;
#X connect 24 0 19 1;
#X connect 26 0 14 1;
#X connect 27 0 15 1;
#X connect 28 0 16 1;
#X connect 29 0 17 1;
#X connect 30 0 18 1;
#X connect 31 3 26 0;
#X connect 31 4 27 0;
#X connect 31 5 28 0;
#X connect 31 6 29 0;
#X connect 31 7 30 0;
#X connect 32 0 24 0;
#X connect 33 0 0 0;
#X connect 34 0 8 0;
#X connect 34 0 7 0;
#X connect 35 0 34 0;
#X connect 36 0 15 0;
#X connect 36 0 14 0;
#X connect 36 0 16 0;
#X connect 36 0 17 0;
#X connect 36 0 18 0;
#X connect 37 0 36 0;
#X connect 38 0 36 0;
#X connect 39 0 36 0;
#X connect 39 0 41 0;
#X connect 40 0 42 0;
#X connect 41 0 37 0;
#X connect 42 0 39 0;
#X connect 43 0 6 0;