SatieConfiguration:
Filter:
SATIE/Classes (extension) | Libraries

SatieConfiguration
ExtensionExtension

SATIE's configuration class

Description

This class is used to configure SATIE. It also provides access to its server's options. The initial configuration must be done prior to booting SATIE. The table below explains the order of setting of parameters:

Configuration at init time

(before SATIE)

-serverconfigured via constructor
-listeningFormatconfigured via constructor
-numAudioAuxconfigured via constructor
-outBusIndexconfigured via constructor
-ambiOrdersconfigured via constructor
-minOutputBusChannelsconfigured via constructor
-userPluginsDirconfigured via constructor

Configuration of instance variables

(still before SATIE)

-hoaEncoderTypeconfigured by user on the SatieConfguration instance
-generateSynthdefsconfigured by user on the SatieConfguration instance

Runtime

(before or after instantiating SATIE)

-debugconfigured by user on the SatieConfguration instance
-orientationOffsetDegconfigured by user on the SatieConfguration instance or via OSC

new

Create a new configuration.

Arguments:

server

The server instance. The server should not be booted. SATIE can be used with either scsynth or supernova.

listeningFormat

An array of listening formats. The default is [\stereoListener]. Can be configured with one or more listening formats, each with their own outBusIndex value. For a partial list of available formats, see -handleSpatFormat.

numAudioAux

A number of auxiliary channels. Auxiliary channels are used for routing audio signals to effects, especially, but can have other uses.

outBusIndex

An array of output channel offset values for the listeningFormats. There must be exactly one offset value per listeningFormat. The default is [0], which configures a single listeningFormat such that its signal is output starting from the server's first output channel. Overlapping or non-congruous channel setups are allowed (for the latter see minOutputBusChannels below).

ambiOrders

A list of Ambisonic orders. Currently, SATIE makes use of the SC-HOA quark and can be used up to order 3. You can specify multiple ambisonic orders in this list.

minOutputBusChannels

The minimum number of server outputs channels. The default is 2. This will ensure the server has at least this number of outputs. This can be used to guarantee an adequate number of output channels when doing non-congruous outBusIndex setups.

NOTE: Upon initialization, the number of output busses/channels needed is calculated automatically based on \listeningFormat. The actual number of physical outputs will be the larger number between the calculated sum and this option.

NOTE: The user must take into account the number of channels required for \ambiOrders. SATIE does not calculate this number automatically. If there are any ambiOrders specified, the user must add that sum to any other channels.
userPluginsDir

An optional path to a user-provided directory of SATIE plugins. The default value is "", which is ignored. This feature is useful for loading project-specific plugins, such as spatializers, prior to booting SATIE. This directory should be structured in the same way as described in SatiePlugin: -Description :

plugins/

  • sources/
    • some_source_plugin.scd

  • effects/
    • some_effect_plugin.scd
    • etc.

  • hoa/
  • mappers/
  • monitoring/
  • postprocessors/
  • spatializers/

Returns:

A SatieConfiguration.

fromJsonFile

Create a new configuration from a JSON file

Arguments:

path

A path to a JSON file containing a SATIE configuration. See example below for a description of such a JSON configuration file.

Returns:

A SatieConfiguration.

fromJsonString

Create a new configuration from stringified JSON

Arguments:

string

Stringified JSON containing a SATIE configuration. See example below for a description of such a JSON configuration file.

Returns:

A SatieConfiguration.

Instance Methods

.debug

Turns on debugging for this SatieConfiguration instance. Will post messages while SATIE boots.

.server

Current server

Returns:

Server instance

.listeningFormat

An Array of Symbols corresponding to the spatializer plugin names that SATIE was configured to use.

Returns:

Array

.numAudioAux

see Arguments

Returns:

Integer

.outBusIndex

see Arguments

Returns:

List

.ambiOrders

see Arguments

Returns:

List

.minOutputBusChannels

see Arguments

Returns:

Integer

.userPluginsDir

see Arguments

Returns:

String

.spatBus

An Array of Bus: *audio objects corresponding to each of the configured listeningFormats. Spatializers output their signal to their bus, and the \satieOutput synth reads from these buses and routes their signals to the hardware outputs.

Returns:

Array

.ambiBus

An array of Bus: *audio objects corresponding to each of the configured #ambiOrders. Ambisonic synths output their order N B-format signal to the bus that corresponds to that order. Ambisonic post-processors reads from these buses and route their signals to the hardware outputs.

Returns:

Array

.hoaEncoderType

Sets the type of Higher-order Ambisonics encoding to be used.

Arguments:

type

A Symbol which is either \wave, \harmonic, or \lebedev50 (default is \wave)

Discussion:

This setting has an effect on how SynthDefs for source type plugins are generated when using Ambisonics. There are three possible choices: \wave, \harmonic, and \lebedev50. The default hoaEncoderType is \wave. It will use the HOAEncoder UGen to encode a source into an Ambisonic B-format. The encoder type called \harmonic makes use of HOASphericalHarmonics to get its source into B-format. The \harmonic encoder is much more CPU efficient, whereas the \wave encoder is more configurable. An alternative approach to encoding is used by the \lebedev50 enocoder type. It takes a mono source, encodes it into a VBAP 50 point Lebedev grid, and then encodes the signal into B-format using HOAEncLebedev50. This approach has the avantage of allowing the source to be panned using the VBAP UGen rather than the Ambisonic UGens from SC-HOA.

.generateSynthdefs

Boolean. Tells the SATIE server whether it should generate audio plugins SynthDefs automatically upon boot. True by default. If set to false, the user needs to run Satie: -makeSynthDef by hand for each desired plugin.

.loadPluginDir

Loads a SATIE plugin directory

Arguments:

path

A String representing the path to a plugin directory

Discussion:

The plugin directory must be structured appropriately. See SatiePlugin

.sources

Instance variable holds audio plugins

Returns:

Dictionary

.effects

Instance variable for effects plugins.

Returns:

Dictionary

.spatializers

Instance variable hold spatializer plugins

Returns:

Dictionary

.mappers

Instance variable holds mapper plugins.

Returns:

Dictionary

.satieRoot

Absolute path to the root of SATIE's source code

Returns:

String

.satieUserSupportDir

Absolute path to SATIE's user support directory

Linux~/.local/share/satie/
macOS~/Library/Application Support/satie/
WindowsC:\Users\username\AppData\Local\satie\

Returns:

String

JSON Configuration

A SatieConfiguration can be created from a JSON file that describes a configuration. This is done via the class method SatieConfiguration: *fromJsonFile. An example JSON configuration is shown below.

The entire configuration is stored under the key called "satie_configuration". The nested JSON object that it contains has five keys: server, listeningFormat, outBusIndex, numAudioAux, ambiOrders, and minOutputBusChannels. The values that must be provided are listed below.

server
value can be null or a JSON object { }
server.name (optional)
value can be null or a String
server.supernova (optional)
value can be null or a Boolean
listeningFormat
value must be an Array of Strings
outBusIndex
value must be an Array of Integers
numAudioAux
value must be an Integer
ambiOrders
value must be an Array of Integers
minOutputBusChannels
value must be an Integer

See SatieConfiguration: *new for more information on the above configuration parameters.

Examples