[CM] ambix ambisonics command line
Fernando Lopez-Lezcano
nando at ccrma.Stanford.EDU
Thu Jun 13 22:09:21 PDT 2024
On 6/12/24 16:56, Juan Reyes wrote:
> Well!...
...
> Sound file is a four or eight channels file generated on CLM or Snd.
> Four channels is as follows:
>
> FLU is channel 0 (FL); FRD is channel 1(FR);
> BLD is channel 2 (RL); BRU is channel 3(RR);
>
> On each channel I'm using intensity panning.
If you want to pan sound in an Ambisonics soundfield then the four
equations that Anders posted would be a start for a first order
soundfield "encoder" for the FUMA format (mono input, 4 channels wide
output).
> Don't know W,X,Y,Z equations for an eight channels sound file using
> LFU,RFU,RBU,LBU,LFD,RFD,RBD,LBD signals.
Unless you have a (partial, with only 8 capsules) 2nd order microphone
it does not make sense to think of microphone signals (at least to me) -
just as you don't think of speaker positions when creating an Ambisonics
signal.
You either have a full soundfield captured with an Ambisonics
microphone, or an artificially generated soundfield, usually a mono
signal that you feed into a panner that generates Ambisonics. Once you
have an Ambisonic soundfield you can mix it with others (same format and
order), process with Ambisonics transforms, etc.
> Guessing now, writing a panning encoder function that takes signal and
> azimuth parameters also makes sense.
See the attached scheme file for a panner (encoder) I wrote a while
back[*]. This will pan a mono signal in Ambisonics and create a 5th
order ACN/SN3D (aka Ambix) soundfile (36 channels wide). If you want 2nd
order you would use just the first 9 output channels, the first 16 for
third order, etc. This also creates a second scaled soundfile to feed an
Ambisonics reverb.
No idea if this code still works, I wrote it for "The Hidden and
Mysterious Machinery of Sound" back in 2015... Time flies...
> - Now the confusion between FUMA and Ambix -.
No confusion :-) Just the most popular formats. FUMA is the original
historical one, defined only up to third order, Ambix (ACN/SN3D) is the
current one, widely used. Two main differences: order of the components
(FUMA == WXYZ/etc, ACN == WYZX/etc), and the weights of each component.
Your microphone or your encoder (panner) will generate one of them. You
want to always use the same format when mixing, if you have different
formats you have to convert to one of them (there are utilities to do
that).
https://en.wikipedia.org/wiki/Ambisonic_data_exchange_formats
And once you have your Ambisonics mix you will need a decoder for your
speaker configuration... BTW, the decoder will decode a particular
format, so you better feed it the right one or things will be wrong
(spatially).
:-)
The whole story fills books...
-- Fernando
[*] the equations come from a encoder generator written by Aaron Heller
that can write them in several languages, very handy.
https://bitbucket.org/ajheller/symbolic_spherical_harmonics/src/master/
>> No microphone? Hmmm, I don't understand ... how was the four channel
>> "A-format" file created?
>>
>
>>
>> These equations already transform capsule signals (FLU, FRD, etc) into
>> a B-format four channel Ambisonics signal. If I understand correctly
>> you are using these equations, right? (one question is, where are
>> FLU,FRD, etc, coming from if not from a microphone?).
>>
>> If that is what you are doing, you are already getting a WXYZ
>> Ambisonics first order signal, no need to further process it. Whether
>> this is really "Ambisonics" depends on where FLU/FRD/BRU/BLD come from...
>>
>
>>
>> The equations you reference above transform four capsule signals into
>> first order Ambisonics assuming all capsules are identical, and they
>> are co-located (impossible in a real microphone). Unless I
>> misunderstand what you are doing, you do not need to use tetrafile,
>> you already have a four channel B-format signal.
>>
>> ".tetra" files hold calibration data for individual microphones which
>> includes gain compensation for the individual capsules and frequency
>> response compensation in the mid and high frequencies that tries to
>> correct for the effects of the capsules not being co-located (they
>> contain a 4x4 matrix of convolution kernels - filters - that take
>> everything into account - I have generated that data for my DIY 3d
>> printed microphones from my measurement data).
>>
>> Each calibration data set corresponds to actual measurements of a
>> particular microphone so, technically, it does not make sense to use
>> them for any other microphone.
>>
>> ...
>>
>> Now, artistically you can do whatever you want, of course! Does not
>> matter if it makes technical sense or is proper Ambisonics, if you
>> like what you hear go for it...
>>
>> Best,
>> -- Fernando
>>
>> See this for more details:
>> https://ccrma.stanford.edu/~nando/publications/sphear.pdf
>>
>
> _______________________________________________
> Cmdist mailing list
> Cmdist at ccrma.stanford.edu
> https://cm-mail.stanford.edu/mailman/listinfo/cmdist
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: alocsig-acn.scm
Type: text/x-scheme
Size: 6355 bytes
Desc: not available
URL: <https://cm-mail.stanford.edu/pipermail/cmdist/attachments/20240613/89b0b03f/attachment.bin>
More information about the Cmdist
mailing list