On Sat, Jul 20, 2013 at 08:50:35PM -0400, Marc Lavallée wrote:
> > mplayer will do the resampling.
Resampling means 'computing samples for another sample rate', and not
'changing the sample format'. Anyway, in Jack *everything* is floating
point until output to Alsa, just as you want. Again: mplayer, or any
other Jack app, does not know the format required by the sound card,
and when connected to Jack it always outputs in floating point format.
> For FOA, mapping of amb files is WXYZ, while ambdec inputs are
> Here's how I remapped the outputs:
Neat trick, but if it works you are just lucky.
** There is no defined order when Jack provides a list of ports. **
In most cases, Jack will list them in the order they were created,
but you can't count on that.
The only way to obtain a defined order is by interpreting the port
names, which is what e.g. Qjackctl does: it does a lexicographical
sort. Which is why it will show Ambdec's ports as 0w, 1x, 1y, 1z.
AFAIK, mplayer doesn't do that.
> Now my problem is to connect mplayer to a second instance of ambdec; I
There's no need to do that, just set the matrix coefficients for the
4th channel to zero.
About Ambisonics channel order
Spherical harmonics are identified by two numbers, 'degree' and
'order', usually notated 'l' and 'm'. [*] I'll use 'L' and 'M'
here to avoid confusing 'l' and '1'.
This is the mapping using the FuMa channel names:
| -3 -2 -1 0 +1 +2 +3 M
0 | W
1 | Y Z X
2 | V T R S U
3 | Q O M K L N P
The triangle gets wider as L increases, as there are
2 * L + 1 components of degree L.
If you read it top to bottom and left to right, and start
counting at zero, you get what is called the "Ambisonic
channel number" or ACN: W = 0, Y = 1, Z = 2, X = 3, etc.
Ambdec uses ACN internally, so it creates ports in that
order, and then Jack will (usually) list them in the same
order. When Ambdec gets extended to 4th degree (order) and
higher, it will also use ACN in the port names - there are
no FuMA names for those. The only alternative would be to
use port names that explicitly contain L and M.
ACN = L^2 + L + M
and when given ACN
L = sqrt (ACN) rounded down, and then
M = ACN - L^2 - L
[*] To add to the confusion, in Ambisonics the 'degree' is
usually called 'order'.
A world of exhaustive, reliable metadata would be an utopia.
It's also a pipe-dream, founded on self-delusion, nerd hubris
and hysterically inflated market opportunities. (Cory Doctorow)
Linux-audio-user mailing list