Mappers:
Filter:
Examples (extension) | Libraries > SATIE

Mappers
ExtensionExtension

What are mappers and how to use them

Go back to SATIE Plugins

Description

Mappers are useful for intercepting spatializer parameters and applying mapping functions to them. This is particularly useful and when combining various spatializers for custom setups or designing new spatializers, that may require extra parameters or use different parameters altogether.

Every SATIE Plugin must include a Mapper. The low level method SatieFactory: makeSynthDef requires a mapper, which overrides spatializer's parameters. In the most common case we will use a default Mapper, which is provided with SATIE in plugins/mapper directory and which simply forwards the parameters unchanged.

Here is its implementation:

The default Mapper's signature corresponds to what SATE expects by design, and what provided spatializers that were originally included. However, a Mapper can contain any paramaters. Accordingly, if you design a spatializer that uses a custom set of parameters, you must provide a corresponding Mapper.

SATIE user/developer will usually use Satie: makeSynthDef to compile custom SyntheDefs. The default value for paramsMapper is \defaultMapper defined above. It is user's responsibility to use a mapper that corresponds to the intended behaviour.

There are several examples of mappers in the plugins/mappers directory.

So let's take the near-field/far-field example and explore a use-case. We configure a SATIE server with two spatializers:

We can then assign a SATIE object to a global variable:

We can disable the automatic generation of SATIE plugin SynthDefs, to be able to inspect what we have done with

Then we will make execute makeSynthDef method, to build the synth with the intended mapper, which is the near-field/far-field controller and we add some house-keeping code for UI:

And finally, we will instantiate the sound (and set its gain to 0 dB):

Change its azimuth

And crossfade between near-field and far-field by changing the value assigned to nfIndex

Go back to SATIE Plugins