Generate matrix encoders required by the Ambisonic Toolkit's Higher Order Ambisonic (HOA) encoder, HoaEncodeMatrix.
Matrix encoding is offered via three different methods:
As implemented here, beamforming offers familiar angular encoding with the added opportunity to apply matching beaming weights for reciprocal decoding / encoding signal processing.
Mode matching is suitable for designing encoders from various spatial sampling distributions.
Format exchange encoding offers interfacing with other Ambisonic formats and systems.
Encode a single beam into a Higher Order Ambisonic signal (HOA).
theta |
Azimuth, in radians. |
phi |
Elevation, in radians. |
beamShape |
Keyword argument for beam shape.
See discussion here. |
order |
Ambisonic order. |
Gain is matched to pressure. See discussion here
Encode multipe beams into a Higher Order Ambisonic signal (HOA).
directions |
An array of directions. Specify in radians. Rank 1 arrays return pantophonic, while rank 2 arrays return periphonic. E.g.,
|
beamShape |
Keyword argument for beam shape.
See discussion here. |
match |
Keyword argument for gain matching. See discussion here. |
order |
Ambisonic order. |
Encode a Higher Order Ambisonic signal (HOA) via the mode matching method.
directions |
An array of directions. Specify in radians. Rank 1 arrays return pantophonic, while rank 2 arrays return periphonic. E.g.,
|
beamShape |
Keyword argument for beam shape. See discussion here. |
match |
Keyword argument for gain matching. See discussion here. |
order |
Ambisonic order. |
Also known as Pseudoinverse Encoding, aka Pinv.
Encode multiple beams evenly distributed in a SphericalDesign as a Higher Order Ambisonic signal (HOA).
design |
SphericalDesign instance |
beamShape |
Keyword argument for beam shape. See discussion here. |
order |
Ambisonic order. |
A-format encoding, aka spherical (re-)composition, is offered by *newSphericalDesign.
Gain is matched to maximum beam amplitude.
An Ambisonic format exchange encoder. Encodes from a variety of formats to ACN-N3D.
format |
An array of kewords designating component ordering and normalisation. E.g., source input format ACN-SN3D is expressed |
order |
Ambisonic order. |
A variety of component ordering and normalisation schemes are supported. Please review the discussion found here: HoaMatrixDecoder: *newFormat
Create an instance from a raw 2D Matrix.
matrix |
A Matrix in the form of |
directions |
An array of directions. Specify in radians. Rank 1 arrays return pantophonic, while rank 2 arrays return periphonic. E.g.,
|
order |
Ambisonic order. |
Create an instance by loading a matrix from a file.
filePathOrName |
Can be a path relative to your Otherwise a full path to your matrix file. |
searchExtensions |
Search extension paths. |
order |
Ambisonic order. |
See the Guide to ATK Matrix Files for more information.
A convenience method to post the properties of the matrix, including metadata if the matrix was loaded from a .yml
file.
Ambisonic order.
Describes both the signal set and the tool set, encompassing the Ambisonic order, as well as channel ordering and normalisation.
Ambisonic Toolkit designation indicating Ambisonic order and encoding format. E.g., \FOA
, \HOA3
.
For instance, \HOA3
:
Ambisonic Order | Component Ordering | Component Normalisation |
3rd | Ambisonic Channel Number (ACN) | Full 3-D normalisation (N3D) |
Ambisonic Toolkit soundfield operation designation. E.g., \encode
, \xform
, \decode
.
Answers 'matrix'
, i.e. the type of operation used to compute the resulting signals.
Answers the kind.
Answers the number of encoder dimensions: 2D or 3D.
Answers the number of input or output channels, depending on -type.
Answers the directions of input or output channels, depending on -type.
Number of inputs.
A convenience method providing polymorphism with -directions, depending on -type.
Number of outputs.
A convenience method providing polymorphism with -directions, depending on -type.
Returns the raw coefficient Matrix.
Bilateral thresholding in place.
thresh |
When the |
Returns the matrix as a new Array of rows.
Answers the name of the file used to create the instance, or nil
if not created by loading a matrix from a file.
Answers the path of the file used to create the instance, or nil
if not created by loading a matrix from a file.
If the instance was created by loading a .yml
file, this method returns the IdentityDictionary containing the parsed metadata. This can be useful if anything was stored in the metadata that can be subsequently used once reloaded, such as encoding directions, rotations, etc.
Write the matrix to a file
fileNameOrPath |
A String of the file name. The file extension determines the format:
You may provide a full path if you would like to save the file somewhere other than the default location in the Atk |
note |
A String that is a short description or bit of info about the matrix to store for future reference. |
attributeDictionary |
A Dictionary containing any information that's useful to store in key:value pairs. Keys that match getters in the AtkMatrix will take precedence over the defaults. See the Discussion for more details. |
overwrite |
A boolean specifying whether you'd like to force overwriting an existing file of the same name and extension. |
The Guide to ATK Matrix Files offers examples and more discussion regarding writing and reading matrices and metadata, including how to generate matrices for use in Reaper.
TBD