See main article: Ambisonics. Data exchange formats for Ambisonics have undergone radical changes since the early days of four-track magnetic tape. Researchers working on very high-order systems found no straightforward way to extend the traditional formats to suit their needs. Furthermore, there was no widely accepted formulation of spherical harmonics for acoustics, so one was borrowed from chemistry, quantum mechanics, computer graphics, or other fields, each of which had subtly different conventions. This led to an unfortunate proliferation of mutually incompatible ad hoc formats and much head-scratching.
This page attempts to document the different existing formats, their rationales and history, for the terminally curious and those unfortunate enough to have to deal with them in detail.
Most modern applications use ACN and SN3D, although traditional first order is still common.
A common formulation for spherical harmonics in the context of Ambisonics is[1]
Y
\ell
m
-\ell\leqm\leq+\ell
(Note that if
m=0
\cosm\theta=\cos0=1
N
m | |
P | |
\ell |
\ell
m
\theta
\phi
Unfortunately, the "Ambisonic order"
\ell
m
For a source signal
S
(\theta,\phi)
m | |
B | |
\ell |
For successful exchange of Ambisonic material, some software requires the sender and receiver have to agree on the ordering of the components, their normalisation or weighting, and the relative polarity of the harmonics.
Since it is possible to omit parts of the spherical harmonic multipole expansion for content that has non-uniform, direction-dependent resolution (known as mixed-order), it might also be necessary to define how to deal with missing components.
In the case of transmission "by wire", be it an actual digital multichannel link or any number of virtual patchcords within an audio processing engine, these properties must be explicitly matched on both ends, since there is usually no provision for metadata exchange and parameter negotiation. In the case of files, some flexibility might be possible, depending on the file format and the expressiveness of its metadata set.
However, in practice, just two formats are in widespread use. The first is Furse-Malham higher-order format, which is an extension of traditional B-Format, and the more modern SN3D, in ACN channel order. In neither case is there any ambiguity about ordering, normalisation, weighting or polarity and it is rare to see cases with missing components. A third format is in limited use: N3D, also in ACN channel order.
The traditional B-format (
WXYZ
For higher orders, this precedent becomes awkward, because spherical harmonics are most intuitively arranged in symmetric fashion around the single z-rotationally symmetric member m=0 of each order, with the horizontal sine terms m<0 to the left, and the cosine terms m>0 to the right (see illustration).
W0 | |||||||
Y2 | Z3 | X1 | |||||
V8 | T6 | R4 | S5 | U7 | |||
Q15 | O13 | M11 | K9 | L10 | N12 | P14 |
RSTUV
KLMNOPQ
0 | |||||||
2 | 3 | 1 | |||||
5 | 7 | 8 | 6 | 4 | |||
10 | 12 | 14 | 15 | 13 | 11 | 9 |
\sigma | |
Y | |
mn |
sgn(m) | |
Y | |
\ell|m| |
0 | |||||||
1 | 2 | 3 | |||||
4 | 5 | 6 | 7 | 8 | |||
9 | 10 | 11 | 12 | 13 | 14 | 15 |
ACN=\ell2+\ell+m
ACN is used widely with SN3D and N3D, below.
More simply:
FuMa = WXYZ | RSTUV | KLMNOPQ
ACN = WYZX | VTRSU | QOMKLNP
SID = WXYZ | UVSTR | PQNOLMK
SID used in iem_ambi in Puredata.
For successful reconstruction of the sound field, it is important to agree on a normalisation method for the spherical harmonic components. The following approaches are common:
The maxN scheme by Daniel normalizes each single component to never exceed a gain of 1.0 for a panned monophonic source. Malham states that "[w]hilst this approach is not rigorously "correct" in mathematical terms, it has significant engineering advantages in that it restricts the maximum levels a panned mono source will generate in some of the higher-order channels."[6] This property is particularly interesting for fixed-point digital interfaces. The maxN weights may be determined by visual inspection up to the third order; above this value the maxima of each polynomial need to be determined explicitly.[6]
MaxN is used in the Furse-Malham format (with the exception of a -3dB correction factor for
W
SN3D stands for Schmidt semi-normalisation and is commonly used in geology and magnetics. The weighting coefficients are[7]
Originally introduced into Ambisonic use by Daniel, he notes: "High degree of generality - the encoding coefficients are recursively computable, and the first-order components are unity vectors in their respective directions of incidence".[8]
With SN3D, unlike N3D, no component will ever exceed the peak value of the 0th order component for single point sources.[1] This scheme has been adopted by the proposed AmbiX format.
SN3D (in the ACN channel order) is in widespread use and a common choice in new software development.
In the Ambix specification paper the term
(2-\deltam)
(2-\deltam) | |
4\pi |
N3D or full three-D normalisation is the most obvious approach to normalisation. Daniel describes it as follows: "Orthonormal basis for 3D decomposition. Simple relationship to SN3D [..]. Ensures equal power of the encoded components in the case of a perfectly diffuse 3D field. [..] Obvious significance for solving decoding problems [..] (3D reconstruction)."[9]
The relation to SN3D is[10]
This normalisation is standard in physics and mathematics and is supported by some Ambisonic software packages. It is used in MPEG-H. However, SN3D is now much more common.
As N3D and SN3D differ only by scaling factors, care is needed when working with both, as it may not be obvious on first listening if an error has been made, particularly on a system with a small number of speakers.
Additionally, two schemes exist which consider only the horizontal components. This has practical advantages for fixed-point media in the common situation where sources are concentrated on the horizontal plane, but the normalisation is somewhat arbitrary and its assumptions do not hold for strongly diffuse soundfields and sound scenes with strong elevated sources. Since Ambisonics is meant to be isotropic and the 2D schemes definitely are not, their use is discouraged.
A third complication arises from the quantum mechanical formulation of spherical harmonics, which was adopted by some Ambisonics researchers. It includes a factor of
(-1)m
MATLAB and GNU Octave both include Condon–Shortley phase in its legendre(ℓ,X)
functions, but undo it by applying the factor again in the Schmidt semi-normalized form legendre(ℓ,X,'sch')
.[11] [12]
Wolfram Language also includes C-S phase in its legendreP(ℓ,X)
implementation,[13] and retains it in SphericalHarmonicY[ℓ,m,θ,φ]
, which is fully normalized.[14] Note that this function returns complex values and uses the physics convention for spherical coordinates where
\theta
\phi
The presence of Condon–Shortley phase in parts of the signal chain usually manifests itself in erratic panning behaviour and increasing apparent source width when going to higher orders, which can be somewhat difficult to diagnose and much harder to eliminate. Hence, its use is strongly discouraged in the context of Ambisonics.
None of the ambisonic exchange formats described above use Condon–Shortley phase. Polarity is generally only a concern when trying to reconcile theoretical formulations of the spherical harmonics from other academic disciplines.
The following table gives an overview of all Ambisonic formats published so far.
Conversion factors can be applied either to the Ambisonic components
B
Y
The data is taken from Chapman (2008).[16]
Please do not rely on this table until it has been thoroughly checked and the "Under construction" notice has been removed.
B |
(\equivYACN) | Conversion factors | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ACN | FuMa | SID | \ell | m | Spherical harmonic in N3D | to SN3D | to maxN*[17] | |||||||||||
0 | data-sort-value=1 | W | 0 | 0 | 0 | 1 | 1 | 1\over{\sqrt{2}} | ||||||||||
1 | data-sort-value=3 | Y | 2 | 1 | -1 | \sqrt{3}\sin(\theta)\cos(\phi) | 1\over{\sqrt{3}} | 1\over{\sqrt{3}} | ||||||||||
2 | data-sort-value=4 | Z | 3 | 1 | 0 | \sqrt{3}\sin(\phi) | 1\over{\sqrt{3}} | 1\over{\sqrt{3}} | ||||||||||
3 | data-sort-value=2 | X | 1 | 1 | 1 | \sqrt{3}\cos(\theta)\cos(\phi) | 1\over{\sqrt{3}} | 1\over{\sqrt{3}} | ||||||||||
4 | data-sort-value=9 | V | 5 | 2 | -2 |
| 1\over{\sqrt{5}} | 2\over\sqrt{15} | ||||||||||
5 | data-sort-value=7 | T | 7 | 2 | -1 |
| 1\over{\sqrt{5}} | 2\over\sqrt{15} | ||||||||||
6 | data-sort-value=5 | R | 8 | 2 | 0 |
| 1\over{\sqrt{5}} | 1\over{\sqrt{5}} | ||||||||||
7 | data-sort-value=6 | S | 6 | 2 | 1 |
| 1\over{\sqrt{5}} | 2\over\sqrt{15} | ||||||||||
8 | data-sort-value=8 | U | 4 | 2 | 2 |
| 1\over{\sqrt{5}} | 2\over\sqrt{15} | ||||||||||
9 | data-sort-value=16 | Q | 10 | 3 | -3 | \sqrt{35\over{8}}\sin(3\theta)\cos3(\phi) | 1\over\sqrt{7} | \sqrt{8\over35} | ||||||||||
10 | data-sort-value=14 | O | 12 | 3 | -2 |
| 1\over\sqrt{7} | 3\over\sqrt{35} | ||||||||||
11 | data-sort-value=12 | M | 14 | 3 | -1 | \sqrt{21\over{8}}\sin(\theta)(5\sin2(\phi)-1)\cos(\phi) | 1\over\sqrt{7} | \sqrt{45\over224} | ||||||||||
12 | data-sort-value=10 | K | 15 | 3 | 0 |
| 1\over\sqrt{7} | 1\over\sqrt{7} | ||||||||||
13 | data-sort-value=11 | L | 13 | 3 | 1 | \sqrt{21\over{8}}\cos(\theta)(5\sin2(\phi)-1)\cos(\phi) | 1\over\sqrt{7} | \sqrt{45\over224} | ||||||||||
14 | data-sort-value=13 | N | 11 | 3 | 2 |
| 1\over\sqrt{7} | 3\over\sqrt{35} | ||||||||||
15 | data-sort-value=15 | P | 9 | 3 | 3 | \sqrt{35\over{8}}\cos(3\theta)\cos3(\phi) | 1\over\sqrt{7} | \sqrt{8\over35} | ||||||||||
16 | data-sort-value=99 | ø | 17 | 4 | -4 |
\sqrt{35}\sin(4\theta)\cos4(\phi) |
| ø | ||||||||||
17 | data-sort-value=99 | ø | 19 | 4 | -3 |
|
| ø | ||||||||||
18 | data-sort-value=99 | ø | 21 | 4 | -2 |
\sqrt{5}\sin(2\theta)(7\sin2(\phi)-1)\cos2(\phi) |
| ø | ||||||||||
19 | data-sort-value=99 | ø | 23 | 4 | -1 |
|
| ø | ||||||||||
20 | data-sort-value=99 | ø | 24 | 4 | 0 |
(35\sin4(\phi)-30\sin2(\phi)+3) |
| ø | ||||||||||
21 | data-sort-value=99 | ø | 22 | 4 | 1 |
|
| ø | ||||||||||
22 | data-sort-value=99 | ø | 20 | 4 | 2 |
\sqrt{5}\cos(2\theta)(7\sin2(\phi)-1)\cos2(\phi) |
| ø | ||||||||||
23 | data-sort-value=99 | ø | 18 | 4 | 3 |
|
| ø | ||||||||||
24 | data-sort-value=99 | ø | 16 | 4 | -4 |
\sqrt{35}\cos(4\theta)\cos4(\phi) |
| ø | ||||||||||
However, please note that only the Furse-Malham and SN3D/ACN encodings are in wide use. (Traditional B-Format is a subset of Furse-Malham.) For both of these encodings, the equations can be expressed directly, without separate normalisation or conversion factors, and there is no ambiguity around ordering.
For file-based storage and transmission, additional properties need to be defined, such as the base file format and, if desired, accompanying metadata.
The .amb
file format was proposed and defined by Richard Dobson in 2001,[18] based on Microsoft's WAVE_FORMAT_EXTENSIBLE amendment to the WAV audio file format. It mandates the use of Furse-Malham encoding.
From its parent, it inherits a maximum file size of 4GB, which is a serious limitation for live recording in higher orders.
.amb
Files are distinguished from other multichannel content by their suffix and by setting the file subtype Globally Unique Identifier in their header data to either of the following values:
SUBTYPE_AMBISONIC_B_FORMAT_PCM {00000001-0721-11d3-8644-C8C1CA000000}
for integer samples, orSUBTYPE_AMBISONIC_B_FORMAT_IEEE_FLOAT {00000003-0721-11d3-8644-C8C1CA000000}
for floating point.The definition mandates that the WAVE_EX dwChannelMask
must be set to zero. Furthermore, it recommends that the file should contain a PEAK
chunk, containing the value and position of the highest sample in each channel.
The channels within an .amb
file are interleaved, and any unused channels are omitted. This makes it possible to identify traditional
Order | Description | Layout of components | |||
---|---|---|---|---|---|
horiz. | vert. | ||||
1 | 0 | 0 | mono | W | |
2 | [19] | 0 | M/S stereo | WY | |
3 | 1 | 0 | first-order horizontal | WXY | |
4 | 1 | 1 | first-order full-sphere | WXYZ | |
5 | 2 | 0 | second-order horizontal | WXYUV | |
6 | 2 | 1 | second-order horizontal, first-order full-sphere | WXYZUV | |
7 | 3 | 0 | third-order horizontal | WXYUVPQ | |
8 | 3 | 1 | third-order horizontal, first-order full sphere | WXYZVUPQ | |
9 | 2 | 2 | second-order full-sphere | WXYZRSTUV | |
11 | 3 | 2 | third-order horizontal, second-order full sphere | WXYZRSTUVPQ | |
16 | 3 | 3 | third-order full sphere | WXYZRSTUVKLMNOPQ |
The free and open source C library libsndfile has included .amb
support since 2007.
Dobson's format has been instrumental in making native Ambisonic content easily accessible to enthusiasts, and to pave the way for research and deployment of Higher-order Ambisonics. While it cannot scale any further than third order and does not accommodate
.amb
is an important feature of any real-world Ambisonic workflow.
AmbiX[1] adopts Apple's Core Audio Format or .caf
. It scales to arbitrarily high orders and has no practically relevant limitation of file size. AmbiX files contain linear PCM data with word lengths of 16, 24, or 32 bit fixed point, or 32 or 64 bit float, at any sample rate valid for .caf
. It uses ACN channel ordering with SN3D normalisation.
The basic format of AmbiX mandates a complete full-sphere signal set, the order of which can be uniquely and trivially deduced from the number of channels. Only the minimum header information required by the .caf
specification are present and no other metadata is included.
The extended format is marked by the presence of a User-Defined Chunk with the UUID
1AD318C3-00E5-5576-BE2D-0DCA2460BC89
.(The original specifications used, which is an invalid UUID[20]).Additionally, the header now contains an adaptor matrix of coefficients, which needs to be applied to the data streams before they can be played back. This matrix provides a generic way of mapping payloads in any previous format and any mix of orders to canonical periphony, ACN ordering and SN3D normalisation. Theoretically, it can even accommodate sound fields that span only subsets of the sphere.
AmbiX was originally proposed at the Ambisonic Symposium 2011, building upon previous work by Travis[21] and Chapman et al.[5]
\vec{u}
\sqrt{2m+1}