Ambisonics

From XiphWiki

(Difference between revisions)
Jump to: navigation, search
(Resources on Ambisonics)
m (Limitations of the ".amb" specification: Clarify)
 
(33 intermediate revisions not shown)
Line 2: Line 2:
This page is part of the XiphWiki, and is aimed at people developing file  
This page is part of the XiphWiki, and is aimed at people developing file  
formats and associated software for Ambisonics. For an general introduction  
formats and associated software for Ambisonics. For an general introduction  
-
to Ambisonics, please go to the main Wikipedia page
+
to Ambisonics, please go to the  
</i>
</i>
-
[[Wikipedia:Ambisonics|Ambisonics on Wikipedia]].
+
[[Wikipedia:Ambisonics|Wikipedia page on Ambisonics]].
'''Ambisonics''' is a surround sound system first developed in the 1970s.  
'''Ambisonics''' is a surround sound system first developed in the 1970s.  
Line 21: Line 21:
== Ambisonics and 5.1 ==
== Ambisonics and 5.1 ==
 +
Ambisonics and conventional 5.1 surround sound are very different. 5.1 is a  
Ambisonics and conventional 5.1 surround sound are very different. 5.1 is a  
set speaker feeds, the signal only being fully defined for sounds coming  
set speaker feeds, the signal only being fully defined for sounds coming  
Line 38: Line 39:
rear of the listener and not-at-all when they are to one side. You can  
rear of the listener and not-at-all when they are to one side. You can  
demonstrate this for yourself by performing  
demonstrate this for yourself by performing  
-
[http://members.tripod.com/martin_leese/Ambisonic/exper.html a very simple experiment].
+
[http://members.tripod.com/martin_leese/Ambisonic/experiment.html a very simple experiment].
Pair-wise mixing did not work in the quadraphonic era and it will not work  
Pair-wise mixing did not work in the quadraphonic era and it will not work  
now. Such an absolute statement can be made because the way that humans  
now. Such an absolute statement can be made because the way that humans  
Line 47: Line 48:
Ambisonics, the positions of the speakers are unknown  
Ambisonics, the positions of the speakers are unknown  
''and are of no interest''. Further, when Ambisonics is decoded to speaker  
''and are of no interest''. Further, when Ambisonics is decoded to speaker  
-
feeds, all of the speakers cooperate to localise a sound in its correct  
+
feeds all of the speakers cooperate to localise a sound in its correct  
-
position. The speakers all contribute to the creation of a single coherent
+
position so, for example, when the speakers on the left push those on the
-
soundfield.
+
right pull. The speakers all contribute to the creation of a single  
 +
coherent soundfield.
=== Ambisonics to 5.1 ===
=== Ambisonics to 5.1 ===
Line 65: Line 67:
== B-Format ==
== B-Format ==
 +
B-Format is a single coherent soundfield composed of a set of related  
B-Format is a single coherent soundfield composed of a set of related  
channels.  The number of channels used depends on whether the soundfiled  
channels.  The number of channels used depends on whether the soundfiled  
Line 73: Line 76:
=== Channel correlation ===
=== Channel correlation ===
 +
Compression techniques typically make use of channel correlation to
 +
remove redundancy from the audio data, and so improve the compression
 +
ratio.
 +
The correlation between B-Format channels depends on the content.   
The correlation between B-Format channels depends on the content.   
-
Four-channel B-Format (which [[OggPCM]] supports) consists of an  
+
Four-channel B-Format consists of an  
omni-directional component, called W, and three figure-of-eight  
omni-directional component, called W, and three figure-of-eight  
components pointing forward, left and up, called X, Y, Z.  
components pointing forward, left and up, called X, Y, Z.  
Line 90: Line 97:
if the resulting soundfield is to correctly "gel". This may be a problem  
if the resulting soundfield is to correctly "gel". This may be a problem  
when B-Format channels are compressed using lossy compression.
when B-Format channels are compressed using lossy compression.
-
 
-
==== Coupling recommendations ====
 
-
<small>Shamefully mangled by [[User:Gmaxwell|Gmaxwell]] from [http://lists.xiph.org/pipermail/vorbis-dev/2007-February/018655.html Richard Lee's Feb 4th vorbis-dev post]</small>
 
-
<blockquote>The Ambisonic B-format WXYZ channels should be should be lossless coupled together over most of the frequency range.  This will give the most gain as W "usually" has everything that XYZ has.  A perfect B-format signal has scaled versions of XYZ in W.<br/>
 
-
 
-
We allow "4 phase coupling" at higher frequencies.  A perfect B-format set of WXYZ should only have real relation to each other. <br/>
 
-
 
-
 
-
This falls down at LF and close sources and sometimes when you are recording organ pedal notes.  But lossless coupling at LF is cheap. This also falls down for diffuse field.  It is possible that the pseudo random differences in response of a real Soundfield in different directions above 10khz may preserve enough of the "random" nature of reverb to be acceptable without needing full random phase.<br/>
 
-
 
-
'''The deviations from perfection can take 2 forms''':
 
-
 
-
#Minimum Phase deviations of XYZ from W.  These start happening above about 6kHz with present Soundfields.
 
-
#Random Phase deviations of XYZ from W.  These occur at High Frequencies when a real Soundfield Mike no longer has flat frequency response in all directions.  Above 10kHz with present Soundfields.
 
-
 
-
B-format from Ambisonically panned material (as opposed to natural Soundfield recordings) will be perfectly in phase so this recommendation will not result in loss.
 
-
 
-
 
-
This needs investigating.  Presently no Ambisonic effects units use "phase" at High Frequencies but this should not be ruled out.
 
-
 
-
*Allowing "4 phase" above 18kHz, like default Dolby Digital at 448kb/s, is likely to be undetectable on present Soundfield recordings.
 
-
 
-
*Allowing "4 phase" down to 10kHz might force the random phase deviations of a real Soundfield mike to be real and MAY result in better results.  This needs investigating.
 
-
 
-
*"Point phase" coupling should be avoided
 
-
</blockquote>
 
There is a file specification in use for downloadable B-Format files  
There is a file specification in use for downloadable B-Format files  
called the  
called the  
-
[http://www.ambisonia.com/Members/mleese/file-format-for-b-format/ ".amb" specification].
+
[http://members.tripod.com/martin_leese/Ambisonic/B-Format_file_format.html ".amb" specification].
=== Limitations of the ".amb" specification ===
=== Limitations of the ".amb" specification ===
-
The [http://www.ambisonia.com/Members/mleese/file-format-for-b-format/ ".amb" specification]  
+
The [http://members.tripod.com/martin_leese/Ambisonic/B-Format_file_format.html ".amb" specification]  
for downloadable B-Format files is based on the WAVE-EX format.  There are  
for downloadable B-Format files is based on the WAVE-EX format.  There are  
-
currently over 100 pieces available in this format  
+
currently over 200 pieces available in this format  
[http://www.ambisonia.com for free download]. Most of these are  
[http://www.ambisonia.com for free download]. Most of these are  
first-order full-sphere soundfields. (The same website also has details of  
first-order full-sphere soundfields. (The same website also has details of  
-
[http://www.ambisonia.com/Members/etienne/ambisonic-software/ ad hoc software decoders].)  
+
[http://www.ambisonia.com/wiki/index.php/Playback_Software ad hoc software decoders].)  
Some of the limitations of the specification are:   
Some of the limitations of the specification are:   
#It is limited to 4 GByte files (2 GBytes if somebody screwed up).
#It is limited to 4 GByte files (2 GBytes if somebody screwed up).
-
#It is limited to third-order soundfields and below. While third-order looks like a lot (16 channels), there already exists a prototype mic that can record up to fourth-order (25 channels).
+
#It is limited to third-order soundfields and below. While third-order looks like a lot (16 channels), there are already research rigs that reproduce fourth-order (25 channels).
#No compression (particularly lossless).
#No compression (particularly lossless).
Line 196: Line 177:
response pointing in ''any'' direction.  Hence, it is possible to synthesize  
response pointing in ''any'' direction.  Hence, it is possible to synthesize  
''all'' coincident stereo mic techniques.  Two popular stereo techniques are  
''all'' coincident stereo mic techniques.  Two popular stereo techniques are  
-
''Blumlein Mid-Side'' and ''Blumlien Crossed Pairs''.
+
''Blumlein Mid-Side'' and ''Blumlein Crossed Pair''.
    
    
==== Blumlein Mid-Side ====
==== Blumlein Mid-Side ====
Line 205: Line 186:
</pre>
</pre>
-
==== Blumlein Crossed Pairs ====
+
==== Blumlein Crossed Pair ====
<pre>
<pre>
Left = (X + Y)/sqrt(2)  /* (Left, Right) are just the (Y, X) */
Left = (X + Y)/sqrt(2)  /* (Left, Right) are just the (Y, X) */
Line 214: Line 195:
recorded.  A good suggestion is to not specify a ''particular'' default  
recorded.  A good suggestion is to not specify a ''particular'' default  
channel conversion; instead, simply specify that there must be one.  If one  
channel conversion; instead, simply specify that there must be one.  If one  
-
has to be specified then Blumlein Crossed Pairs is the simpler.
+
has to be specified then Blumlein Crossed Pair is the simpler.
== UHJ format ==
== UHJ format ==
 +
B-Format is the main format for Ambisonic files. However, B-Format is  
B-Format is the main format for Ambisonic files. However, B-Format is  
not mono- or stereo-compatible. This is why the UHJ hierarchical system  
not mono- or stereo-compatible. This is why the UHJ hierarchical system  
Line 239: Line 221:
(Left, Right), but not without loss. It is also important for the Ambisonic  
(Left, Right), but not without loss. It is also important for the Ambisonic  
decoder to be aware that the B-Format channels were recovered from  
decoder to be aware that the B-Format channels were recovered from  
-
two-channel UHJ.
+
two-channel UHJ (because of the need to apply different shelf filters).
Several hundred  
Several hundred  
-
[http://members.cox.net/surround/uhjdisc/ambindex.htm two-channel UHJ LPs and CDs]  
+
[http://members.tripod.com/martin_leese/Ambisonic/uhjhtm.txt two-channel UHJ LPs and CDs]  
have been released. Three- and four-channel UHJ recordings have never been  
have been released. Three- and four-channel UHJ recordings have never been  
commercially released.
commercially released.
Line 273: Line 255:
where j is a +90 degree phase shift
where j is a +90 degree phase shift
</pre>
</pre>
 +
Note that two-channel UHJ requires the player to use different shelf filters than for B-Format (or for three- and four-channel UHJ).
For three- and four-channel UHJ:
For three- and four-channel UHJ:
Line 289: Line 272:
There is a file specification for downloadable two-channel UHJ files  
There is a file specification for downloadable two-channel UHJ files  
called the  
called the  
-
[http://www.ambisonicbootlegs.net/Members/mleese/file-format-for-uhj/ ".uhj" specification], but it is not currently in use.
+
[http://members.tripod.com/martin_leese/Ambisonic/UHJ_file_format.html ".uhj" specification], but it is not currently in use.
=== Limitations of the ".uhj" specification ===
=== Limitations of the ".uhj" specification ===
-
The [http://www.ambisonicbootlegs.net/Members/mleese/file-format-for-uhj/ ".uhj" specification]  
+
The [http://members.tripod.com/martin_leese/Ambisonic/UHJ_file_format.html ".uhj" specification]  
for downloadable two-channel UHJ files is based on the WAVE or WAVE-EX  
for downloadable two-channel UHJ files is based on the WAVE or WAVE-EX  
format. A UHJ chunk is added to the file to indicate it is UHJ. As  
format. A UHJ chunk is added to the file to indicate it is UHJ. As  
Line 316: Line 299:
=== Default channel conversions from UHJ ===
=== Default channel conversions from UHJ ===
Converting a UHJ file to a mono file is straightforward.  Use Mono =  
Converting a UHJ file to a mono file is straightforward.  Use Mono =  
-
(Left + Right)/2.
+
(Left + Right) / sqrt(2).
Converting a UHJ file to a stereo file is even easier.  Use Left = Left, Right = Right, and discard T and Q if present.
Converting a UHJ file to a stereo file is even easier.  Use Left = Left, Right = Right, and discard T and Q if present.
== G-Format ==
== G-Format ==
-
A G-Format file is a common multi-channel surround file which contains an Ambisonic soundfield pre-decoded to its speaker feeds. This allows listeners who do not own an Ambisonic decoder
 
-
to enjoy Ambisonics. He treats it just as he would a surround DVD or SACD.
 
-
The sound engineer creates a set of speaker feeds for an appropriate number and arrangement of speakers for that surround format. This is typically four speakers arranged in a square. A centre-front speaker fed with X at a low level is useful for films.
+
A G-Format file is any common multi-channel surround file containing an
 +
Ambisonic soundfield pre-decoded to its speaker feeds. This allows
 +
listeners who do not own an Ambisonic decoder to enjoy Ambisonics.
-
In Ambisonics, all speakers  
+
The sound engineer creates a set of speaker feeds for a particular number
-
cooperate to localise sounds in any particular direction; there are no  
+
and arrangement of speakers. This is typically four speakers arranged in
-
"surround speakers" as such. Because of this, best results when playing  
+
a square. Other speaker arrangements are also possible
-
G-Format recordings (and Ambisonics in general) are obtained when the  
+
 
-
speakers are matched. The easiest way to accomplish this is to use  
+
In Ambisonics, all speakers cooperate to localise sounds in any particular  
-
identical speakers. Unfortunately, many home theatre systems include a  
+
direction; there are no "surround speakers" as such. Because of this, best  
-
centre-front speaker which is different from the other speakers.
+
results when playing G-Format recordings (and Ambisonics in general) are  
 +
obtained when the speakers are matched. The easiest way to accomplish this  
 +
is to use identical speakers. Unfortunately, many home theatre systems  
 +
include a centre-front speaker which is different from the other speakers.
An easy way to cope with this is adopted on G-Format recordings commercially  
An easy way to cope with this is adopted on G-Format recordings commercially  
released on DVD-A by [http://www.wyastone.co.uk/nrl/dvd.html Nimbus Records].  
released on DVD-A by [http://www.wyastone.co.uk/nrl/dvd.html Nimbus Records].  
They use four speakers in a square, the centre-front speaker being unused.  
They use four speakers in a square, the centre-front speaker being unused.  
-
If a centre-front speaker is used, it should be fed at a very
 
-
low level. Centre-front = 0.1*X has been used successfully for films.
 
-
Classic Ambisonic encoding to four speakers in a square is recommended. This works well with most surround systems in the home. If the listener moves forward so he is equidistant from all four speakers, he is in the ideal spot to experience the best Ambisonic sound.
+
=== Recovering B-Format from G-Format ===
-
 
+
It is sometimes possible to recover the original B-Format channels from
-
Classic Ambisonic encoding as above should have Shelf filters and Distance Compensation set to 20Hz, 2.7m.
+
the G-Format speaker feeds. The recovered B-Format channels can then be  
-
 
+
-
Encoding to an ITU-R 5.1 layout is not recommended.  This speaker layout is almost unknown at home.  The resulting encode is not robust with different speaker or listener position.
+
-
 
+
-
If the encoding is to other than a square, (not recommended) G-Format files should contain conversion coefficients to recover the original B-Format channels.
+
-
 
+
-
The recovered B-Format channels can then be  
+
fed to a decoder in the listener's living room, and so accommodate a  
fed to a decoder in the listener's living room, and so accommodate a  
speaker arrangement different from the one used when the G-Format file  
speaker arrangement different from the one used when the G-Format file  
was produced. Each B-Format channel is recovered using a weighted  
was produced. Each B-Format channel is recovered using a weighted  
-
combination of the speaker feeds in the G-Format file. Obviously, if a  
+
combination of the speaker feeds in the G-Format file. The conversion
-
B-Format version of the file exists then it can be fed to the decoder
+
coefficients required for the B-Format recovery depend on the particular
-
directly without the need for G-Format. A listener with such a sophisticated decoder is much better served by the original B-Format file.
+
speaker arrangment chosen by the sound engineer. (Obviously, if a  
 +
B-Format version of the file also exists then it can be fed to the  
 +
decoder directly without the need for G-Format.)
File formats for G-Format include all multi-channel formats that contain  
File formats for G-Format include all multi-channel formats that contain  
-
speaker feeds. The majority will not contain information to allow the  
+
speaker feeds. However, these will not contain information to allow the  
-
B-Format channels to be recovered as they are simply multichannel surround files which can be played on ''any'' surround system.
+
B-Format channels to be automatically recovered. A [http://members.tripod.com/martin_leese/Ambisonic/G-Format_chunk.html ".amg" file format]  
-
 
+
-
A [http://members.tripod.com/martin_leese/Ambisonic/G-Format_chunk.html ".amg" file format]  
+
(based on WAVE-EX) for downloadable G-Format files, which will allow  
(based on WAVE-EX) for downloadable G-Format files, which will allow  
-
the B-Format channels to be recovered, has been proposed. In most cases, this format is unnecessary as the B-Format master will be available and far easier to use.
+
the B-Format channels to be automatically recovered, has been proposed.  
 +
Such file formats have the advantage of storing the conversion
 +
coefficients at the time the G-Format file is created. This is the only
 +
time the required information is readily available.
=== Default channel conversions from G-Format ===
=== Default channel conversions from G-Format ===
Line 371: Line 352:
== Resources on Ambisonics ==
== Resources on Ambisonics ==
 +
*There is a set of [http://en.wikipedia.org/wiki/Ambisonics Wikipedia articles on Ambisonics].
*There is a set of [http://en.wikipedia.org/wiki/Ambisonics Wikipedia articles on Ambisonics].
-
*Of particular relevance is the [http://www.ambisonia.com/Members/mleese/file-format-for-b-format/ ".amb" specification] in use for downloadable B-Format files.  However the ".amb" spec has some limitations which it would be useful to overcome.
+
*Of particular relevance is the [http://members.tripod.com/martin_leese/Ambisonic/B-Format_file_format.html ".amb" specification] in use for downloadable B-Format files.  However the ".amb" spec has some limitations which it would be useful to overcome.
-
*There is also the [http://www.ambisonia.com/Members/mleese/file-format-for-uhj/ ".uhj" specification] for downloadable two-channel UHJ files, but it is not currently in use.  The ".uhj" spec also has some limitations which it would be useful to overcome.
+
*There is also the [http://members.tripod.com/martin_leese/Ambisonic/UHJ_file_format.html ".uhj" specification] for downloadable two-channel UHJ files, but it is not currently in use.  The ".uhj" spec also has some limitations which it would be useful to overcome.
*[http://members.tripod.com/martin_leese/Ambisonic/ This website] has many pages on Ambisonics (including at the bottom links to other Ambisonic websites).
*[http://members.tripod.com/martin_leese/Ambisonic/ This website] has many pages on Ambisonics (including at the bottom links to other Ambisonic websites).
*[http://www.ambisonic.net/ Ambisonic.Net website] includes a detailed series of descriptive and practical articles on current and past Ambisonic techniques with links to tools, other sites and additional material.
*[http://www.ambisonic.net/ Ambisonic.Net website] includes a detailed series of descriptive and practical articles on current and past Ambisonic techniques with links to tools, other sites and additional material.
-
*[http://www.ambisonia.com/Members/ricardo Richard Lee's page on Ambisonics], articles on Shelf filters and design of Ambisonic decoders.
+
*[http://ambisonic.info/info/ricardo.html Richard Lee's page on Ambisonics] contains articles on shelf filters and the design of Ambisonic decoders.
 +
 
 +
[[Category:Developers stuff]]

Latest revision as of 18:13, 18 June 2013

This page is part of the XiphWiki, and is aimed at people developing file formats and associated software for Ambisonics. For an general introduction to Ambisonics, please go to the Wikipedia page on Ambisonics.

Ambisonics is a surround sound system first developed in the 1970s. Its main difference from other surround techniques is that it separates transmission channels from speaker feeds, the speaker feeds being derived using a decoder situated in the living room. Decoders can be implemented in either hardware or software. Typically more speakers are used than transmission channels, and the more speakers used then the more stable the resulting soundfield. Speakers can be arranged in a number of configurations, regular polygons being the most popular.

Ambisonic files can come in a number of different formats. The main one is called B-Format, the other formats being derived from this. UHJ format is mono- and stereo-compatible. G-Format is a set of speaker feeds, so can be enjoyed in surround sound without the need for a decoder in the living room.

Contents

Ambisonics and 5.1

Ambisonics and conventional 5.1 surround sound are very different. 5.1 is a set speaker feeds, the signal only being fully defined for sounds coming from a speaker. Phantom images between speakers can be created, but the technique to do so is left unspecified. Many 5.1 releases use pair-wise mixing to create phantom images. This is understandable as almost all stereo recordings are mixed using pair-wise mixing.

Pair-wise mixing is also called "pan-potting", "amplitude mixing" and "intensity stereophony". It mixes signals into the feeds for a pair of speakers to create the illusion that a sound is coming from a point somewhere between the speakers. During mixing, the apparent location of each sound is determined only by the relative amplitude of that sound in the two speakers.

Unfortunately, pair-wise mixing works poorly when the speakers are to the rear of the listener and not-at-all when they are to one side. You can demonstrate this for yourself by performing a very simple experiment. Pair-wise mixing did not work in the quadraphonic era and it will not work now. Such an absolute statement can be made because the way that humans localise sound has not changed.

Ambisonics is fundamentally different from 5.1. What is encoded in Ambisonics is not speaker feeds, but direction. When mixing in Ambisonics, the positions of the speakers are unknown and are of no interest. Further, when Ambisonics is decoded to speaker feeds all of the speakers cooperate to localise a sound in its correct position so, for example, when the speakers on the left push those on the right pull. The speakers all contribute to the creation of a single coherent soundfield.

Ambisonics to 5.1

Converting Ambisonics to 5.1 is straightforward, and is discussed below (see G-Format).

5.1 to Ambisonics

Converting 5.1 to Ambisonics is more difficult. It is easy to make the five speaker feeds phantom images, called "virtual speakers". (The ".1" channel can be folded into W.) The problem with this is that even if the Ambisonic rendering is perfect, the result will only be as good as the original 5.1 played through real speakers. It will not be an improvement. Nobody has yet come up with a way for Ambisonics to improve 5.1; 5.1 is simply too broken.

B-Format

B-Format is a single coherent soundfield composed of a set of related channels. The number of channels used depends on whether the soundfiled is horizontal-only or full-sphere, and on the order. These B-Format channels are transmission channels, not speaker feeds. Listening to B-Format requires a decoder in your living room. Some numbers of channels are tabulated below.

Channel correlation

Compression techniques typically make use of channel correlation to remove redundancy from the audio data, and so improve the compression ratio.

The correlation between B-Format channels depends on the content. Four-channel B-Format consists of an omni-directional component, called W, and three figure-of-eight components pointing forward, left and up, called X, Y, Z. (Pictures are available.) Three-channel, horizontal-only B-Format simply omits the Z channel. This means that anything in X also appears in W. Same for Y and Z. (W is omni-directional; everything appears in W.) Also, if content comes from Front-Left then it appears equally in X and Y. Same for content from Front-Right, Back-Left, Back-Right; only the relative polarities change. So there can be a lot of correlation between B-Format channels, but it is content dependent.

One problem with B-Format is that it is big on low-frequency phase. The phase relationships between the different B-Format channels are important if the resulting soundfield is to correctly "gel". This may be a problem when B-Format channels are compressed using lossy compression.

There is a file specification in use for downloadable B-Format files called the ".amb" specification.

Limitations of the ".amb" specification

The ".amb" specification for downloadable B-Format files is based on the WAVE-EX format. There are currently over 200 pieces available in this format for free download. Most of these are first-order full-sphere soundfields. (The same website also has details of ad hoc software decoders.) Some of the limitations of the specification are:

  1. It is limited to 4 GByte files (2 GBytes if somebody screwed up).
  2. It is limited to third-order soundfields and below. While third-order looks like a lot (16 channels), there are already research rigs that reproduce fourth-order (25 channels).
  3. No compression (particularly lossless).

The reason that the ".amb" file specification is limited to third-order and below is because it uses the number of channels to uniquely define the soundfield order. Unfortunately this simple and elegant scheme does not work above third-order as ambiguities creep in. (One ambiguity is illustrated in the table below.)

A more general file format will have to use something else, such as Malham notation, or storing both the horizontal-order and height-order. There is a one-to-one correspondence between Malham notation and the pair of orders, and either can generate the number of channels.

Malham notation

Malham notation specifies the order of a B-Format soundfield using a string of characters, each character being either f (for full-sphere) or h (for horizontal). The first character in the string specifies the type of the first-order components, the second character the type of the second-order components, etc.

Horizontal
order
Height
order
Soundfield_type Malham
notation
Number
of_channels
Channels
1 0horizontalh 3WXY
1 1full-spheref 4WXYZ
2 0horizontalhh 5WXYUV
2 1mixed-orderfh 6WXYZUV
2 2full-sphereff 9WXYZRSTUV
3 0horizontalhhh 7WXYUVPQ
3 1mixed-orderfhh 8WXYZUVPQ
3 2mixed-orderffh 11WXYZRSTUVPQ
3 3full-spherefff 16WXYZRSTUVKLMNOPQ
4 0horizontalhhhh 9extra channels unlabled

Default channel conversions from B-Format

Converting a B-Format file to a mono file is straightforward. Use Mono = W*sqrt(2).

Converting a B-Format file to a stereo file is more difficult. The "proper" way to do this is to convert the W,X,Y channels to two-channel UHJ. Unfortunately this requires the use of wide-band 90-degree phase shifters. In the digital domain these are usually implemented as convolution filters.

Assuming 90-degree phase shifters are unavailable then the problem is one of choice. Starting from B-Format, it is possible to synthesize any mic response pointing in any direction. Hence, it is possible to synthesize all coincident stereo mic techniques. Two popular stereo techniques are Blumlein Mid-Side and Blumlein Crossed Pair.

Blumlein Mid-Side

Mid = (W*sqrt(2)) + X  /*This is a cardioid response pointing forward*/
Left = Mid + Y
Right = Mid - Y

Blumlein Crossed Pair

Left = (X + Y)/sqrt(2)   /* (Left, Right) are just the (Y, X) */
Right = (X - Y)/sqrt(2)  /* responses rotated by -45 degrees  */

Which conversion to stereo is better depends on the material and how it was recorded. A good suggestion is to not specify a particular default channel conversion; instead, simply specify that there must be one. If one has to be specified then Blumlein Crossed Pair is the simpler.

UHJ format

B-Format is the main format for Ambisonic files. However, B-Format is not mono- or stereo-compatible. This is why the UHJ hierarchical system was developed. Depending on the number of channels available, the UHJ system can carry more or less information, but at all times it is fully mono- and stereo-compatible. Up to four channels (Left, Right, T, Q) may be used. The T-channel can also be band-limited but, as this "2½-channel UHJ" was only ever used for FM radio transmission, it will not be discussed further.

To listen to UHJ files in surround requires a decoder in your living room. Also, UHJ is restricted to first-order soundfields, either horizontal (two- and three-channel UHJ) or full-sphere (four-channel UHJ).

Converting B-Format channels to UHJ channels, and vice versa, requires the use of wide-band 90-degree phase shifters. In the digital domain these are usually implemented as convolution filters. Conversion between four-channel B-Format (W, X, Y, Z) and four-channel UHJ (Left, Right, T, Q) can be accomplished without loss of information. The same with three-channel to three-channel (W, X, Y) <=> (Left, Right, T). It is possible to recover three-channel B-Format (W, X, Y) from two-channel UHJ (Left, Right), but not without loss. It is also important for the Ambisonic decoder to be aware that the B-Format channels were recovered from two-channel UHJ (because of the need to apply different shelf filters).

Several hundred two-channel UHJ LPs and CDs have been released. Three- and four-channel UHJ recordings have never been commercially released.

UHJ encoding and decoding equations

Encoding

S = 0.9396926*W + 0.1855740*X
D = j(-0.3420201*W + 0.5098604*X) + 0.6554516*Y

Left = (S + D)/2.0
Right = (S - D)/2.0
T = j(-0.1432*W + 0.6512*X) - 0.7071*Y
Q = 0.9772*Z

where j is a +90 degree phase shift

Decoding

For two-channel UHJ:

S = (Left + Right)/2.0
D = (Left - Right)/2.0

W = 0.982*S + j*0.164*D
X = 0.419*S - j*0.828*D
Y = 0.763*D + j*0.385*S

where j is a +90 degree phase shift

Note that two-channel UHJ requires the player to use different shelf filters than for B-Format (or for three- and four-channel UHJ).

For three- and four-channel UHJ:

S = (Left + Right)/2.0
D = (Left - Right)/2.0

W = 0.982*S + j*0.197(0.828*D + 0.768*T)
X = 0.419*S - j(0.828*D + 0.768*T)
Y = 0.796*D - 0.676*T + j*0.187*S
Z = 1.023*Q

where j is a +90 degree phase shift

There is a file specification for downloadable two-channel UHJ files called the ".uhj" specification, but it is not currently in use.

Limitations of the ".uhj" specification

The ".uhj" specification for downloadable two-channel UHJ files is based on the WAVE or WAVE-EX format. A UHJ chunk is added to the file to indicate it is UHJ. As unrecognized chunks are always skipped, use of this chunk maintains stereo compatibility. Some of the limitations of the specification are:

  1. It is limited to 4 GByte files (2 GBytes if somebody screwed up).
  2. It is limited to two-channel UHJ files. Three- and four-channel UHJ are not accommodated.
  3. No compression.

The ".uhj" spcecification is only defined for two-channel UHJ to maintain stereo compatibility. While it would be possible to add the UHJ chunk to three- and four-channel WAVE-EX files, the recommendations from Microsoft for playing such files is that the audio device should render the extra channels to output ports not in use. This can happen even when the extra channels are masked off. (Put simply, in WAVE-EX files the channel mask does not mask channels.) Because of this, three- and four-channel WAVE-EX files can not be made stereo compatible.

In the Xiph world, it should be possible to use default channel conversions to ensure that three- and four-channel UHJ files remain stereo compatible.

Default channel conversions from UHJ

Converting a UHJ file to a mono file is straightforward. Use Mono = (Left + Right) / sqrt(2).

Converting a UHJ file to a stereo file is even easier. Use Left = Left, Right = Right, and discard T and Q if present.

G-Format

A G-Format file is any common multi-channel surround file containing an Ambisonic soundfield pre-decoded to its speaker feeds. This allows listeners who do not own an Ambisonic decoder to enjoy Ambisonics.

The sound engineer creates a set of speaker feeds for a particular number and arrangement of speakers. This is typically four speakers arranged in a square. Other speaker arrangements are also possible

In Ambisonics, all speakers cooperate to localise sounds in any particular direction; there are no "surround speakers" as such. Because of this, best results when playing G-Format recordings (and Ambisonics in general) are obtained when the speakers are matched. The easiest way to accomplish this is to use identical speakers. Unfortunately, many home theatre systems include a centre-front speaker which is different from the other speakers.

An easy way to cope with this is adopted on G-Format recordings commercially released on DVD-A by Nimbus Records. They use four speakers in a square, the centre-front speaker being unused.

Recovering B-Format from G-Format

It is sometimes possible to recover the original B-Format channels from the G-Format speaker feeds. The recovered B-Format channels can then be fed to a decoder in the listener's living room, and so accommodate a speaker arrangement different from the one used when the G-Format file was produced. Each B-Format channel is recovered using a weighted combination of the speaker feeds in the G-Format file. The conversion coefficients required for the B-Format recovery depend on the particular speaker arrangment chosen by the sound engineer. (Obviously, if a B-Format version of the file also exists then it can be fed to the decoder directly without the need for G-Format.)

File formats for G-Format include all multi-channel formats that contain speaker feeds. However, these will not contain information to allow the B-Format channels to be automatically recovered. A ".amg" file format (based on WAVE-EX) for downloadable G-Format files, which will allow the B-Format channels to be automatically recovered, has been proposed. Such file formats have the advantage of storing the conversion coefficients at the time the G-Format file is created. This is the only time the required information is readily available.

Default channel conversions from G-Format

Converting a G-Format file to a mono or stereo file is straightforward. First, recover the B-Format channels using the conversion coefficients contained in the file. Second, follow the advice given above for Default channel conversions from B-Format.

Resources on Ambisonics

  • There is a set of Wikipedia articles on Ambisonics.
  • Of particular relevance is the ".amb" specification in use for downloadable B-Format files. However the ".amb" spec has some limitations which it would be useful to overcome.
  • There is also the ".uhj" specification for downloadable two-channel UHJ files, but it is not currently in use. The ".uhj" spec also has some limitations which it would be useful to overcome.
  • This website has many pages on Ambisonics (including at the bottom links to other Ambisonic websites).
  • Ambisonic.Net website includes a detailed series of descriptive and practical articles on current and past Ambisonic techniques with links to tools, other sites and additional material.
  • Richard Lee's page on Ambisonics contains articles on shelf filters and the design of Ambisonic decoders.
Personal tools


Main Page

Xiph.Org Projects

Audio—

Video—

Text—

Container—

Streaming—