Go back to SATIE-Overview
An existing spatialization project can be adapted fairly easily to use the NRT (non-realtime) functionality offered by SuperCollider. The advantage of using NRT is to process audio as fast as possible, or as slow as necessary, depending only on workload.
Here we provide examples of using SATIE to encode a group of sources into Ambisonic B-format and render this scene to a soundfile.
In this first example we are encoding a short sound moving in space into an Ambisonic B-format file.
We are using SuperCollider's default soundfile, defining our Ambisonic order, and choosing a number of sources to create.
In order to use SATIE's synthDefs (like spatializers or sources plugins) in a Score, we first need to configure and boot a SATIE instance. We instantiate a SatieConfiguration
then create a SATIE renderer and pass it the configuration. We must define the minOutputBusChannels
according to the ambisonic order. We are waiting for SATIE to boot and then call the replaceAmbiPostProcessor
method to create the Ambisonic 3rd order \Identity
plugin.
In order to be accessible by the NRT server, synthDefs must be stored as binaries in the Platform.resourceDir +/+ "synthdefs"
folder.
In addition to the \Identity
Ambisonic Post-processor, we will use the \sndFile
plugin as a source. Because we are using 3rd order Ambisonics in our configuration, SATIE has created 3rd order Ambisonic versions of each of its source plugins. \sndFileAmbi3
is the name given to the SynthDef of the 3rd order Ambisonic version of the \sndFile
plugin.
SATIE's naming convention for Ambisonic Post-processor SynthDefs is: "ambipost_" ++ "_s" ++ spatializerNumber ++ "_o" ++ order
In our case, the SynthDef created for the \Identity
Ambisonic Post-processor is \ambipost__s0_o3
.
replaceAmbiPostProcessor
operation is completed before storing the SynthDef. It may take 1-2 seconds. Once a SynthDef has been stored, you don't need to repeat the operation unless you are starting over from scratch.Once we have our SynthDefs names figured out, we can store
them to disk.
It's recommended to use a Score object to run NRT processes. A Score object prepares the binary OSC file for you in the correct format. For more information on NRT capabilities in SuperCollider and the score creation, see this guide Non-Realtime Synthesis (NRT).
To render the Score, we must call Score: -recordNRT. The rendering process can take a while depending on the workload. Once finished, you should have a new soundfile containing a 3rd order Ambisonic B-format recording in your Platform.recordingsDir
.
To make sure everything went well, you can listen to your Ambisonic soundfile using SATIE's binaural decoder.
Go back to SATIE-Overview