HoaOrder:
Filter:
Classes (extension) | Libraries > Ambisonic Toolkit > Coefficients & Theory

HoaOrder : Object
ExtensionExtension

Higher Order Ambisonic (HOA) indexing & coefficients
Source: HoaOrder.sc

Description

Higher Order Ambisonic (HOA) component indexing, coefficients and performance, by order.

Class Methods

HoaOrder.new(order)

Create a new instance.

Arguments:

order

Ambisonic order.

Inherited class methods

Instance Methods

.order

Return higher order ambisonic order.

(ℓ, m) & HOA indices

.lm

Return an array of Associated Legendre degrees (ℓ) and indices (m).

.l

Return an array of Associated Legendre degrees (ℓ).

.m

Return an array of Associated Legendre indices (m).

.indices(ordering: 'acn', subset: 'all')

Return Higher Order Ambisonic (HOA) indices.

Arguments:

ordering

Component ordering scheme:

\acnAmbisonic Channel Number (ACN)
\sidSingle Index Designation (SID)
\fumaFurse-Malham (FuMa)
subset
\allAll indices
\zonalZonal
\sectoralSectoral
\tesseralTesseral
\rotateRotation around z-axis, aka yaw

Coefficients

.size

Return number of ambisonic components.

.sph(theta: 0, phi: 0)

Return N3D normalized angular encoding coefficients.

Arguments:

theta

Azimuth, in radians.

phi

Elevation, in radians.

.normalisation(scheme: 'n3d')

Return component normalisation coefficients.

Arguments:

scheme

Component normalisation schemes:

\n3dOrthonormal basis for 3D decomposition (N3D)
\sn3dSemi-normalised basis for 3D decomposition (SN3D)
\n2dOrthonormal basis for 2D decomposition (N2D)
\sn2dSemi-normalised basis for 2D decomposition (SN2D)
\maxNMaximum normalisation (maxN)
\MaxNGerzon / Furse-Malham (MaxN)
\fumaSynonym for MaxN (FuMa)

.reflection(mirror: 'reflect')

Return component reflection coefficients.

Arguments:

mirror
\reflectMirror across the origin. Equivalent to: \flip * \flop * \flap.
\flipMirror in the y-axis.
\flopMirror in the x-axis.
\flapMirror in the z-axis.
\CondonShortleyPhaseCondon-Shortley Phase. Equivalent to: \flip * \flop.
\originSynonym for \reflect.
\xSynonym for \flop.
\ySynonym for \flip.
\zSynonym for \flap.

Radial & NFE

.radiusAtFreq(freq, speedOfSound)

Return the effective decoding radius, in meters.

Arguments:

freq

Frequency, in Hz.

speedOfSound

Speed of sound, in meters per second.

.freqAtRadius(radius, speedOfSound)

Return the effective decoding frequency, in Hz.

Arguments:

radius

Radius, in meters.

speedOfSound

Speed of sound, in meters per second.

.proxWeights(freq, radius, speedOfSound)

Return complex near-field effect proximity radial filtering coefficients, collected by Associated Legendre degree (ℓ).

Arguments:

freq

Frequency, in Hz.

radius

Radius, in meters.

speedOfSound

Speed of sound, in meters per second.

.distWeights(freq, radius, speedOfSound)

Return complex near-field effect distance radial filtering coefficients, collected by Associated Legendre degree (ℓ).

Arguments:

freq

Frequency, in Hz.

radius

Radius, in meters.

speedOfSound

Speed of sound, in meters per second.

.ctrlWeights(freq, encRadius, decRadius, speedOfSound)

Return complex near-field effect control radial filtering coefficients, collected by Associated Legendre degree (ℓ).

Arguments:

freq

Frequency, in Hz.

encRadius

Encoding radius, in meters.

decRadius

Decoding radius, in meters.

speedOfSound

Speed of sound, in meters per second.

.foclWeights(freq, radius, window: 'reg', speedOfSound)

Return real near-field effect focalisation radial filtering coefficients, collected by Associated Legendre degree (ℓ).

Arguments:

freq

Frequency, in Hz.

radius

Radius, in meters.

window

Angular weighting window.

\regRegularised1
\hp(Butterworth) High Pass2
\cosCosine3
\sinSine4
speedOfSound

Speed of sound, in meters per second.

Beaming & Decoder matching

Three standard beam shapes are offered:

keywordbeam shapelocalisation vectorvirtual microphone
\basicstrict soundfieldmaximum velocity rVHyper-cardioid
\energyenergy optimisedmaximum energy rESuper-cardioid
\controlledcontrolled oppositesminimum diametric energyCardioid

.beamWeights(beamShape: 'basic', dim: 3)

Return beamforming coefficients, collected by Associated Legendre degree (ℓ).

Arguments:

beamShape

Keyword argument for beam shape. See above.

dim

The number of dimensions: 2D or 3D.

.matchWeight(beamShape: 'basic', dim: 3, match: 'amp', numChans)

Return matching weight for an ambisonic decoder.

Arguments:

beamShape

Keyword argument for beam shape. See above.

dim

The number of dimensions: 2D or 3D.

match

Matching criteria:

\amppressure (loudspeaker sum)
\rmsspherical harmonic energy
\energyloudspeaker energy
numChans

Number of loudspeakers.

NOTE: Must be set when choosing match: \energy.

Decoder performance

.spreadE(beamShape: 'basic', dim: 3)

Return the half angle of the maximum average energy spread for an ambisonic decoder.

Arguments:

beamShape

Keyword argument for beam shape. See above.

dim

The number of dimensions: 2D or 3D.

Returns:

An IdentityDictionary of values:

\cosroll-off to ~-3dB, in radians
\hvcroll-off to ~-6dB, in radians

.meanE(beamShape: 'basic', dim: 3)

Return reduced energy for an ambisonic decoder.

Arguments:

beamShape

Keyword argument for beam shape. See above.

dim

The number of dimensions: 2D or 3D.

.rV(beamShape: 'basic', dim: 3)

Return maximum average magnitude of the velocity localisation vector (rV) for an ambisonic decoder.

Arguments:

beamShape

Keyword argument for beam shape. See above.

dim

The number of dimensions: 2D or 3D.

.rE(beamShape: 'basic', dim: 3)

Return maximum average magnitude of the energy localisation vector (rE) for an ambisonic decoder.

Arguments:

beamShape

Keyword argument for beam shape. See above.

dim

The number of dimensions: 2D or 3D.

Inherited instance methods

Examples

TBD

[1] - S. Favrot and J. Buchholz. 2010. “Impact of Regularization of near Field Coding Filters for 2D and 3D Higher-Order Ambisonics on Auditory Distance Cues.” in Proc. of the 2nd International Symposium on Ambisonics and Spherical Acoustics. Paris.
[2] - J. Daniel. 2003. “Spatial sound encoding including near field effect: Introducing distance coding filters and a viable, new ambisonic format,” in Proc. of the 23rd International Conference of the Audio Engineering Society.
[3] - J. Ahrens and S. Spors. 2009. “Spatial encoding and decoding of focused virtual sound sources,” in Proc. of the 1st Ambisonics Symposium. Paris.
[4] - A sine function variation of the window proposed by Ahrens & Spors.