Class Audio.Mixer

implements Audio.Source

An audio mixer. The mixer can contain any number of inputs and outputs. Independent gain values can be set for each input/output pair and these gains can be controlled via scheduled events as well as any MIDI source.

Constructors

Mixer(integer inputs, integer outputs)

Create a new audio mixer.

Methods

void addGainController(Midi.Source source, integer control, integer input, integer output)

Connect an Midi.Source as a gain controller.

void connect(Audio.Connection connection)

Connect the Audio.Connection to the next available mixer input

void connect(Audio.Connection connection, float gain)

Connect the Audio.Connection to the next available mixer input

void connect(Audio.Source source)

Connect all channels of an Audio.Source to the next available mixer inputs

void connect(Audio.Source source, array gains)

Connect all channels of an Audio.Source to the next available mixer inputs

void connect(Audio.Source source, float gain)

Connect all channels of an Audio.Source to the next available mixer inputs

Audio.Connection connection(integer channel)

Returns a single channel of audio output from this component.

void scheduleGain(integer input, integer output, float gain, float measure)

Schedule a gain change between a given input and output

Method Documentation

void addGainController(Midi.Source source, integer control, integer input, integer output)

Connect an Midi.Source as a gain controller.

Parameters

void connect(Audio.Connection connection)

Connect the Audio.Connection to the next available mixer input. An exception will be thrown if there are no inputs available.

Parameters

void connect(Audio.Connection connection, float gain)

Connect the Audio.Connection to the next available mixer input. An exception will be thrown if there are no inputs available.

Parameters

void connect(Audio.Source source)

Connect all channels of an Audio.Source to the next available mixer inputs. An exception will be thrown if there are not enough available inputs.

Parameters

void connect(Audio.Source source, array gains)

Connect all channels of an Audio.Source to the next available mixer inputs. An exception will be thrown if there are not enough available inputs.

Parameters

void connect(Audio.Source source, float gain)

Connect all channels of an Audio.Source to the next available mixer inputs. An exception will be thrown if there are not enough available inputs.

Parameters

Audio.Connection connection(integer channel)

Returns a single channel of audio output from this component.

Parameters

Returns

void scheduleGain(integer input, integer output, float gain, float measure)

Schedule a gain change between a given input and output. Unity gain is 1.0

Parameters



Creative Commons LicenseThis work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.