Summary

Combine up to 4 audio signals together, each with adjustable gain. All channels support signal attenuation or amplification.

Audio Connections

PortPurpose
In 0Input signal #1
In 1Input signal #2
In 2Input signal #3
In 3Input signal #4
Out 0Sum of all inputs

Functions

gain(channel, level);

Adjust the amplification or attenuation. "channel" must be 0 to 3. "level" may be any floating point number from 0 to 32767. 1.0 passes the signal through directly. Level of 0 shuts the channel off completely. Between 0 to 1.0 attenuates the signal, and above 1.0 amplifies it. All 4 channels have separate settings.

Examples

File > Examples > Audio > SamplePlayer

File > Examples > Audio > Synthesis > PlaySynthMusic

File > Examples > Audio > Analysis > SpectrumAnalyzerBasic

File > Examples > Audio > Analysis > DialTone_Serial

File > Examples > Audio > MemoryAndCpuUsage

Notes

Signal clipping can occur when any channel has gain greater than 1.0, or when multiple signals add together to greater than 1.0.

More than 4 channels may be combined by connecting multiple mixers in tandem. For example, a 16 channel mixer may be built using 5 mixers, where the fifth mixer combines the outputs of the first 4.