Atk:
Filter:
atk-sc3/Classes (extension) | Libraries > Ambisonic Toolkit > ATK Platform & Configuration

Atk
ExtensionExtension

a class that stores some global variables for the Ambisonic Toolkit

Description

The Atk class defines variables that may be used by the rest of the ATK library, including resources for kernel encoding and decoding and sample soundfile paths.

Class Methods

.sets

Returns:

an Array listing valid ATK sets.

Installation of ATK dependencies

Kernels, Matrices, and Soundfiles can be installed using following methods:

NOTE: On Windows there is no feedback on download progress. Please wait until the message confirming decompressing of the downloaded archive is posted.

In case the automatic installation fails, please see the Ambisonic Toolkit webpage to proceed with manual installation:

.downloadKernels

Download Atk Kernels, required by kernel encoders/decoders

.downloadMatrices

Download Atk Matrices, required by matrix encoders/decoders/transformers

.downloadSounds

Download Atk Example Soundfiles

ATK's default asset directories

NOTE: The following methods have both user and system versions. Which version you should use will depend on whether you have the ATK assets installed at the user level:

or the system level:

.userSupportDir

set the user support dir where ATK resources are located

Arguments:

userSupportDirIn

the path to the ATK folder containing your ATK support files

.userSupportDir

Returns:

the path to the ATK support dir. Defaults to: Platform.userAppSupportDir.dirname ++ "/ATK";

.userSoundsDir

Returns:

a path to the 'sounds' dir inside the ATK support dir

.userMatrixDir

Returns:

a path to the 'matrices' dir inside the ATK support dir

.userKernelDir

Returns:

a path to the 'kernel' dir inside the ATK support dir

.openUserSupportDir

runs a String: -unixCmd to open the userAppSupport dir. Uses 'open' (OS X only)

.createUserSupportDir

runs a unix command to create the user support dir for ATK

.systemSupportDir

Returns:

the path to the ATK support dir. Defaults to: Platform.systemAppSupportDir.dirname ++ "/ATK";

.systemSoundsDir

Returns:

a path to the 'sounds' dir inside the ATK system support dir

.systemMatrixDir

Returns:

a path to the 'matrices' dir inside the ATK system support dir

.systemKernelDir

Returns:

a path to the 'kernel' dir inside the ATK system support dir

.openSystemSupportDir

runs a String: -unixCmd to open the systemAppSupport dir. Uses 'open' (OS X only)

.createSystemSupportDir

runs a unix command to create the system support dir for ATK

User asset /extensions directory

The extensions directory is where the ATK looks for assets generated or added by you, such as your own matrices or kernels. It is located in

or if the ATK assets are installed system-wide, in:

It is not installed by default. It can be created by running

You can find out more about the directory structure in the Guide-to-ATK-Matrix-Files.

.userExtensionsDir

Returns:

a path to the 'extensions' dir inside the ATK support dir. This is where user-generated matrices and kernels are stored to and rerieved from by default.

.systemExtensionsDir

Returns:

a path to the 'extensions' dir inside the ATK support dir. This is where user-generated matrices and kernels are stored to and rerieved from by default.

.postMyMatrices

Displays a formatted list the matrices stored in your ATK/extensions/matrices directory. The set and type arguments are optional filters to display only matrices of a the specified set and type.

NOTE: This method first searches the Atk.userExtensionsDir and if no directory is found, it proceeds to check for a system-wide installation in Atk.systemExtensionsDir.

.createExtensionsDir

Creates the extensions folder, along with numerous subdirectories in a pre-defined structure, in your ATK assets folder. This is where the ATK looks for assets generated or added by you, such as your own matrices or kernels. You can find out more about the directory structure and its use in the Guide-to-ATK-Matrix-Files.

Convenience methods for accessing subdirectories

The following methods are used by ATK internally but listed here in the case you find them useful.

.getAtkOpPath

Get the PathName of the op directory ('kernels' or 'matrices'), in either the "built-in" ATK support directory or the user extension subdirectory (isExtension = true).

.getAtkOpSubPath

Get the PathName of the subdirectory within the ATK/'op'/'set'/'type' folder.

NOTE: This method first searches the Atk.userExtensionsDir and if no directory is found, it proceeds to check the Atk.systemExtensionsDir.

.getAtkMatrixSubPath

A shortcut for Atk.getAtkOpSubPath(set, op, 'matrices')

.getAtkKernelSubPath

A shortcut for Atk.getAtkOpSubPath(set, op, 'kernels')

.getExtensionSubPath

Get the PathName of the subdirectory within the ATK/extensions/'op'/'set'/'type' folder.

NOTE: This method first searches the Atk.userExtensionsDir and if no directory is found, it proceeds to check the Atk.systemExtensionsDir.

.getMatrixExtensionSubPath

A shortcut for Atk.getExtensionSubPath(set, op, 'matrices')

.getKernelExtensionSubPath

A shortcut for Atk.getExtensionSubPath(set, op, 'kernels')