ADT:
Filter:
Classes (extension) | Ambisonics

ADT : Object
ExtensionExtension

Run the Ambisonic Decoder Toolbox from SuperCollider
Source: ADT.sc

Description

Control the Ambisonic Decoder Toolbox (ADT) via the command line, using Octave. This quark allows you to generate run the toolbox with the allrad, pinv and ssf decoders, write .yml files suitable for the Ambisonic Toolkit and write all other outputs native to the ADT.

Class Methods

ADT.new(folderPath, directions, match: 'amp', order: 3, format, filename: 'ADT', ymlOnly: true)

Create a new instance of the ADT class.

Arguments:

folderPath

The path of the folder to which to write the .yml files. If nil AND the atk-sc3 quark is installed, this will default to Atk.userExtensionsDir ++ "matrices/HOA(orderNum)/decoders/" (e.g for 3rd order, Atk.userExtensionsDir ++ "matrices/HOA3/decoders/"). If nil and the atk-sc3 is NOT installed, it will default to ADT.userADTDir ++ "/decoders/".

directions

An Array of directions in polar form ([theta_radians, phi_radians, rho_meters]) in the form [[0, 0, 1]]. Meters can be omitted, will default to 1.5.

match

A symbol for the gain matching, can be 'amp', 'rms', or 'energy'.

NOTE: Match gains only work with the energy beam shape decoders as of now. The other beams, basic and controlled, are matched with 'amp'.
order

The ambisonic order of the decoder. This can be a single value, or for mixed order, an array of [horiz_order, vertical_order, mixed_order_scheme]. See the ADT documentation for discussion of mixed order decoders.

format

The ambisonic format as an Array of the channel order and normalization. Defaults to ['ACN', 'N3D']. See ADT for possiblities.

filename

An optional filename as the beginning of the written .yml files. Defaults to 'ADT'.

ymlOnly

A boolean which determines where the default output files from the ADT get written. True means the files will be written to the "pathToADT/decoders/" folder and false means they will be written with the .yml files to the user specified path, folderPath. Defaults to true.

ADT.userADTDir

ADT.userADTDir = value

The directory to the local copy of the Ambisonic Decoder Toolbox repository. Defaults to "/pathToThisQuark/ADT/". Otherwise you can set this path manually.

ADT.userOctaveCmd

ADT.userOctaveCmd = value

The path to the octave command. Defaults to the path returned from the command "which octave".

Inherited class methods

Undocumented class methods

ADT.scripts

ADT.scripts = value

ADT.userPyADTDir

ADT.userPyADTDir = value

Instance Methods

.allrad(imagSpeakers, type: 'python', verbose: false)

Generate the matrices for the allrad decoder method.

NOTE: Warning: The allrad takes a long time (several minutes)

Arguments:

imagSpeakers

An array of locations for imaginary speaker locations (used for irregular speaker arrays, such as a dome). If nil, a single imaginary speaker at [0, -0.5pi, 1] is created.

action

A function to be evaluated upon completion of the asynchronous matrix generation.

.pinv(alpha, verbose: false)

Generate the matrices for the psuedo-inverse decoder method.

Arguments:

alpha

A value between 0 and 1. 0 -> mode matching and 1 -> even energy. Values between 0 and 1 give a blend of the two.

action

A function to be evaluated upon completion of the asynchronous matrix generation.

.ssf(alpha, elevationRange, verbose: false)

Generate the matrices for the spherical slepian functions decoder method.

Arguments:

alpha

A value between 0 and 1. 0 -> mode matching and 1 -> even energy. Values between 0 and 1 give a blend of the two.

elevationRange

Elevation angle(s) in radians. If empty, assume a hemisphere. If a scalar, a min elevation. If an array: [minElevation, maxElevation].

action

A function to be evaluated upon completion of the asynchronous matrix generation.

Inherited instance methods

Undocumented instance methods

.allradPython(imagSpeakers: true, verbose: false)

.filePath(type: "allrad", beam: "energy")

.matrixNames

.matrixPaths

.run(type: "allrad", extraArgs, verbose: false)

Examples