You are here: Home / xchange / Products / CUBEmixer / Documentation / Tutorials / Installing CUBEmixer / Decoder matrix creation
Personal tools
Document Actions

Decoder matrix creation

How you can calculate your decoder matrix with the amdecalc tool. You need this to have a working Ambisonics system
This is a short tutorial how to install the CUBEmixer under your favorite OS. (as a first usage Linux, especially Debian is used)
Page 5 of 7.

The calculation of a good decoder matrix for Ambisonics is not a standardized task, since there is a lot of discussion going on this topic and many ways proposed to solve it. Anyway a good decoder matrix should be done manually by an expert knowing the rehearsal situation, constrains and the target application for the Ambisonics system.

Anyhow we want to get our CUBEmixer work at least for a first start, afterwards later, we can go optimizing the matrix out of the experience we made. So if you need a rather perfect decoder matrix only few experts worldwide are known to do this right, among them Thomas Musil at IEM, who wrote this Ambidecalc tool.

It seems, in our experience, a 2D matrix can be calculated quite perfect with this tool, on an 3D-Ambisionics solution, a equal distribution of speakers helps a lot, and we mostly tested the hemisphere, since a complete speaker sphere is hard to find.

Explanation: The patch uses a external of the Ambisonics PD library from IEM and tries to do a kind of inversion of the speaker matrix, which cannot be solved for every setting and sometimes leads to large or very low numbers (singularities).

The Ambidecalc patch is located under the tools directory of the CUBEmixer folder and can be started with a script in the bin folder bin/ambidecalc.sh. It looks like this:

Ambidecalc.png

In the dialog you can just follow the steps numbered. Here some hints.

Step 1-5 Choose your your Ambisonics domain

circle
2D Ambisonics means speakers are aligned on an circle (or small cylinder) so only one angle is relevant for the position of the speaker.
hemisphere
3D Ambisonics using only the upper side of the sphere, the two angles azimuth and elevation for each speaker has to be entered
sphere
3D Ambisonics using only the whole sphere, the two angles azimuth and elevation for each speaker has to be entered.

With the Ambisonics-Order you also choose the minimum number of speakers needed. You can afterwards increase the number of speaker your system uses, also this is known as room-oversampling. There is some discussion, sweet spot will increase, but some also that it also distort the Ambisonics behavior. Just test it and hear the results and add a comment below.

NOTE: use the same order specified in the Configurator before !

Step 6 Enter your layout

Afterwards open one preset file or prepared file or click New/Clear and enter your values left

The text-file can be a preset (see top of dialog) or you choose one with angles like for 2D 12-speaker:

#matrix 12 1
0
330
300
...

or 3D 11 speaker:

#matrix 11 2
0 0
0 60
0 120
...
30 45
30 135
...

where the synthax is for 2D:

#matrix <rows N> 1
 <azimuth spk1>
 <azimuth spk2>
 ...
 <azimuth spkN>

Format for 3D:

#matrix <rows N> 2
 <elevation spk1> <azimuth spk1>
 <elevation spk2> <azimuth spk2>
 ...
 <elevation spkN> <azimuth spkN>

Step 7-8 Decode and Save

Here you have to look at the PD console, if there is:

ambi2_decode_hemi ERROR: matrix_inverse singular !!!!

then you should change the speaker layout or do some tricks with virtual speakers since there is no decoder matrix. Then press again and you should find a solution where you read:

ambi2_decode_hemi OK: matrix_inverse regular

Then have a look at the numbers, if there are some very high (greater than 100) or very low exept -0.0 then you have a rather instable decoder matrix, so change the layout and try again. See Notes above about good decoder matrixes.

After this save the decoder matrix with a name with extension .mtx to youre working directory or I prefer in the etc/CUBEmixer folder. The matrix you want to use copy to the etc/CUBEmixer/decoder.mtx

So you are done and can test the matrix after doing the compensation next section.

sphere instead of hemisphere

For a hemisphere with slighly negativ elevation, you can also use a sphere implementation. For speaker not present, since they would be under the floor, just put some of them as virtual speakers in the layout. After decoding just delete the lines for additional speakers in the decoder.mtx and set the dimension to real speakers.

 
All content copyright by author of the content as member of Ambisonics Community