SynthDef and NRT examples for ATK:
Filter:
atk-sc3/Guides (extension) | Libraries > Ambisonic Toolkit > Guides & Tutorials

SynthDef and NRT examples for ATK
ExtensionExtension

SynthDef and NRT examples for ATK
 

ATK with SynthDef and Synth

The FOA examples found here show a limited set of the ATK's functionality, but illustrate how to work with the library when using SynthDefs and Synths, and a single decoder that reads an Ambisonic signal through audio bus routing. Additionally, examples for Non-Realtime (NRT) processing are found in this guide.

Mono Encoder using FoaPanB

FoaPanB encodes a monophonic input to a First Order Ambisonic signal (B-format), as a planewave. PanB is the SuperCollider inbuilt equivalent.

This first example encodes a PinkNoise source as a planewave and decodes to stereo.

Omni Encoder using FoaEncoderMatrix, Transforms using FoaTransform

Encodes a monophonic input as an omnidirectional soundfield, then re-image via two transforms using the FoaTransform UGen wrapper.

Route Encoding Synth to a separate Decoding Synth

Encode a planewave, and route to a single decoder:

Kernel Decoders and Encoders

B-format Sound File and Binaural Decoder

In this example we're working with a B-format sound file. As the source is already encoded, an encoding stage is not needed. For audition, a binaural (HRTF) decoder is used. This decoder takes a subjectID as an argument. It would be wise to experiment with various subjectIDs to discover which suits your own head.

Encode an Ambisonic UHJ Stereo File, Decode to HRTF

Ambisonic UHJ is the stereo compatible Ambisonic format, and a suitable Ambisonic B-format signal can be retrieved from UHJ encoded signals.1

Here we will encode (transcode, actually!) a UHJ Stereo file to B-format. For audition, a binaural (HRTF) decoder is used. This decoder takes a subjectID as an argument. It would be wise to experiment with various subjectIDs to discover which suits your own head. suits your own head.

ATK in Non-Realtime

ATK and Score

In many cases, examples using Score are often trickier due to the need for the use of bundles. Since the Kernels2 also pass in hardcoded buffer IDs, we need to make sure those are referenced, as well.

The example below decodes a B-format input file to Stereo Ambisonic UHJ using the ATK's FoaDecoderKernel: *newUHJ decoder.

ATK and the Composer's Toolkit (Ctk)

The Composer's Toolkit (Ctk) quark offers a convenient model for working in a score based paradigm in both Realtime and Non-Realtime.

The example here, as above, decodes a B-format input file to Stereo Ambisonic UHJ using the ATK's FoaDecoderKernel: *newUHJ decoder.

And, this example uses both a Kernel Encoder and Decoder. First an Ambisonic UHJ soundfile is encode to B-format. Then, it is decoded using the ATK's binaural (HRTF) decoder decoder.

[1] - See further discussion here.