Audio objects are connectable objects i.e. objects which output can be connected to the input of another audio object. In the INScore model, the following objects are audio objects: audio, video, faust (see section faustObjects) and audioio (see section audioioObjects).
Audio objects support the following messages:
- connect: connect the outputs of the object to the destination inputs. The destination must be a another audio object. Inputs and outputs count must be the same on source and destination. The destination supports regular expressions.
- disconnect: disconnect the outputs of the object from the destination inputs. Note that errors (e.g. no existing connection with the destination) are silently ignored.
Note: The connect message assumes that the source and destination are located in the same hierarchy (i.e. they have the same parent).
- in: gives the number of inputs of the audio object
- out: gives the number of outputs of the audio object
Faust is a functional programming language for sound synthesis and audio processing. Faust objects are available, providing that the Faust library has been loaded.
Creating a Faust object
The faust or faustf types must be used to create a Faust object.
Note: The faust type exists with the native version but to load a pre-compiled DSP. faustdsp and faustdspf types are not supported.
The expected arguments of the set message are:
- an optional integer that indicates a number of voices used to create a polyphonic DSP (see section webFaustPoly). Note that when present, a polyphonic DSP is created even if equal to 1.
- 1: Faust DSP code (see the Faust language for more information).
- 2: a Faust DSP file.
By default, a Faust DSP appears as a browsable block diagram.
Note: The Faust language uses characters that have a special meaning in HTML: for example, with the split operator <:, the '<' character will be interpreted as an opening HTML tag and you should use HTML escapes (e.g. < instead of <). This is necessary for inline DSP code only, DSP files are not concerned.
Faust objects supports the audio objects messages plus an additional query message:
- ui: gives the Faust processor parameters (see section webFaustParams) i.e. for each parameter: its OSC address followed by the parameter UI type, a label, the minimum and maximum values and the parameter step.
Faust objects parameters
A Faust DSP code can declare UI elements that are used by architecture files to build controllers providing users with dynamic control of the DSP parameters. In INScore, DSP UI elements are used to extend the Faust object address space. For example, when a DSP code declares a UI element named 'Volume', a Faust object which address is /ITL/scene/dsp is extended as /ITL/scene/dsp/Volume.
Faust parameters support two types of messages:
- 1: set the parameter value
- 2: gives the parameter value
Note: When a parameter which type is button is set to 1, it is automatically reset to zero after a short time (corresponding at least to one audio buffer size).
Polyphonic objects (i.e. Faust objects created using the optional voice number) support additional messages:
- keyOn and keyOff messages take 3 integer parameters: a MIDI channel, the note pitch and the velocity.
- allNotesOff: similar to MIDI all notes off message
Audio Input / Output
Audio input / output objects are provided as audio object (\see section audioObjects) to the represent the physical audio inputs and outputs, in order to homogenize the connection process. An audio input / output type is audioio. It is created with a number of inputs and outputs as arguments.