Generates encoding matrices required by the Ambisonic Toolkit's first order encoder, FoaEncode.
Omnidirectional encoder (monophonic).
An omnidirectional soundfield can be regarded in two ways: a soundfield with an infinite number of planewaves arriving in all directions, or a soundfield with no directions. In a well aligned, dampend studio environment, this usually sounds "in the head", while in concert hall listening usually appears as omnipresent.
To control the soundfield, FoaPush and FoaFocus can be applied to either "push" or "focus" an omnidirectional soundfield into a planewave, giving the soundfield an angle of arrival.1
Planewave encoder (monophonic).
theta |
Azimuth angle, in radians: pi to -pi |
phi |
Elevation angle, in radians: pi/2 to -pi/2 |
This is the classic Ambisonic encoding (panning) function. SuperCollider's inbuilt PanB and the Ambisonic Toolkit's FoaPanB implement this encoder as a UGen, and provide dynamically changing theta and phi at the audio and control rates.
Stereophonic encoder.
angle |
Soundfield distortion angle, in radians: pi/2 to -pi/2 |
The stereophonic signal is encoded as two planewaves. When angle = 0, the left and right channels of the input signal arrive at [90, -90]
degrees. angle = pi/4 distorts the arrivals to [45, -45]
degrees. angle = pi/2, places both the left and right inputs at front centre, [0, 0]
degrees. This behaviour matches that of the Ambisonic Toolkit's first order image warping UGens: FoaFocus, FoaZoom, FoaPush, and FoaPress.
Quadraphonic encoder.
The quadraphonic signal is encoded as four planewaves arriving at [ 45, 135, -135, -45 ]
degrees. This encoding is equivalent to placing infinitely distant loudspeakers around a soundfield microphone in an anechoic chamber.
5.0 encoder.
The 5.0 signal is encoded as five planewaves arriving at [ 0, 30, 110, -110, -30 ]
degrees. This encoding is equivalent to placing infinitely distant loudspeakers around a soundfield microphone in an anechoic chamber.
7.0 encoder.
The 7.0 signal is encoded as seven planewaves arriving at [ 0, 30, 90, 135, -135, -90, -30 ]
degrees. This encoding is equivalent to placing infinitely distant loudspeakers around a soundfield microphone in an anechoic chamber.
Pantophonic (2D) regular polygon encoder.
numChans |
number of input channel feeds |
orientation |
|
Inputs are in anti-clockwise order. The position of the first input channel is either centre or left of centre. -dirChannels may be used to query resulting input channel directions. This encoding is equivalent to placing infinitely distant loudspeakers around a soundfield microphone in an anechoic chamber.
Periphonic (3D) dual ring, regular cylindrical encoder.
numChanPairs |
Number of channel pairs. (Half the total number of input channel feeds.) |
elevation |
Elevation of the upper ring, measured from the origin. In radians. |
orientation |
|
Inputs are in anti-clockwise order, beginning with the top ring. The position of the first speaker is either centre or left of centre. -dirChannels may be used to query resulting loudspeaker directions. This encoding is equivalent to placing infinitely distant loudspeakers around a soundfield microphone in an anechoic chamber.
Virtual loudspeaker or microphone encoder, suitable for varied periphonic and pantophonic arrays.
directions |
An array of directions of the virtual loudspeakers or microphones. Specify in radians. Rank 1 arrays return pantophonic, while rank 2 arrays return periphonic. E.g.,
| ||||||||||||
pattern |
Virtual microphone pattern,
|
-newDirections is the Ambisonic Toolkit's most versatile first order encoder. Arbitrary input loudspeaker and/or microphone arrays may be specified.
ZoomH2 (pantophonic) encoder.
angles |
Angles for front left and back left microphones, in radians. (The corresponding right microphones are mirrored across the y-axis.) Defaults to NOTE: The encoder reverses the labels for front and back of the ZoomH2. This is done so that directions are are preserved from the point of view of a field recording operator. With the ZoomH2's display facing the operator (for ease of monitoring), sounds arriving in front of the operator will be encoded in the front of the soundfield. See also Discussion below. | ||||||||||||
pattern |
Microphone pattern3 , 0 to 1:
| ||||||||||||
k |
Post-encoding Y scalar. NOTE: Please see further discussion of k here |
A four channel recording made by the ZoomH2 will be returned as two stereo .wav files named:
Presuming the ZoomH2 is oriented as described here, the following illustrates correct input for the encoder:
The encoder includes a Y scalar, k, and an auditioned adjustment is usually necessary to improve the resulting image. As the ZoomH2's polar patterns are not consistent across frequency, and the capsules are not coincident, imaging is not always consistent. Touching k can go some way towards remedy-ing this.
A first order Ambisonic format exchange encoder, for use with the ZoomH2n. Encodes from AmbiX to traditional B-format. A convenience alias to *newHoa1.
Encoding means encoding from one Ambisonic channel componenent orderding and normalisation to that of traditional B-format. In this case, from AmbiX encoding scheme (ACN ordering, SN3D normalisation) to Gerzon (aka Furse-Malham) ordering, MaxN normalisation.
SPATIAL AUDIO
mode. Further details may be reviewed in the manual addendum found here. You may also like to review the H2n: Spatial Audio Setup video.6 A-format to B-format encoder. Encodes to a variety of tetrahedral orientations and W channel weights.
orientation |
Orientation of the A-format tetrahedron.
| |||||||||||||||||||||||||||||||||||
weight |
The W weight factor. For convenience, equivalent virtual microphone pattern and decoding k are also listed.
|
The A-format encoder is often used in conjunction with the FoaDecoderMatrix: *newBtoA B-format decoder to form signal processing networks which preserve the spatial encoding as is described here.
On its own, *newAtoB is often used to author immersive, periphonic (3D) decorrelated soundfields.
A first order Ambisonic format exchange encoder. Encodes a variety of formats to traditional B-format.
ordering |
Input Ambisonic channel component ordering.
| ||||||
normalisation |
Spherical harmonic normalisation method.
|
Encoding means encoding from one Ambisonic channel componenent orderding and normalisation to that of traditional B-format. In other words, from some standard scheme to Gerzon (aka Furse-Malham) ordering with MaxN normalisation.
Hoa1
in the method name *newHoa1 refers to Higher Order Ambisonic (HOA) encoding format, Ambisonic order = 1. The input signal should have four channels, with the given encoding format as specified in the arguments.A first order Ambisonic format exchange encoder. Encodes from AmbiX to traditional B-format. A convenience alias to *newHoa1.
Encoding means encoding from one Ambisonic channel componenent orderding and normalisation to that of traditional B-format. In this case, from AmbiX encoding scheme (ACN ordering, SN3D normalisation) to Gerzon (aka Furse-Malham) ordering, MaxN normalisation.
Create an FoaEncoderMatrix by loading a matrix from a file.
filePathOrName |
Can be a path relative to your Otherwise a full path to your matrix file. |
See the Guide-to-ATK-Matrix-Files for more information.
'encoder'
Answers the kind of encoder.
Answers the number of encoder dimensions: 2D or 3D.
Answers the number of input channels (virtual loudspeakers or microphones).
Answers the direction of virtual loudspeaker or microphone feeds, with angles in radians.
A rank 1 array for pantophonic, and rank 2 array for periphonic. E.g.,
A synonym for -numChannels
A synonym for -dirChannels
Answers the number of outputs for the encoder. 3 for 2D and 4 for 3D.
A convenience method providing polymorphism with FoaDecoderMatrix: -dirOutputs.
[ inf, inf, inf ]
[ inf, inf, inf , inf ]