balance

A useful subpatch for mixing and balancing two sounds

To mix two sounds together equally, you just add them together. If you know that both sounds will frequently be at or near full amplitude (peak amplitude at or near 1) then you probably want to multiply each sound by 0.5 after you add them together, to avoid clipping. However, if you want to mix two sounds unequally, with one sound having a higher gain than the other, a good way to accomplish that is to give one sound a gain between 0 and 1 and give the other sound a gain that's equal to 1 minus that amount.

Control the balance between two channels of audio

This abstraction allows you to adjust the balance between two channels of audio. The audio channels come in the first two inlets, and a control signal comes in the right inlet. When the control signal is 0, the two channels pass through unchanged. As the control signal approaches -1, the amplitude of the right channel is reduced (till completely silent at -1) while the left channel remains unchanged; as the control signal approaches 1, the amplitude of the left channel is reduced (till completely silent at 1) while the right channel remains unchanged.