Signal Processing Stack Exchange is a question and answer site for practitioners of the art and science of signal, image and video processing. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have two audio signals that I want to mix at various mixing ratios. Initially, I simply went for something like

$y(t) = \alpha \cdot x_1(t) + (1-\alpha) \cdot x_2(t)$
where $\alpha$ is the ratio between zero and one and $x_1$ and $x_2$ are the two signals.

However, I have seen a few panning curves that did not mix signals linearly. They told me that a linear mix would change the overall loudness while mixing.

Is there something to that or is a linear mix the correct way to do it?

share|improve this question
Are you asking about mixing (2 inputs, 1 output) or panning (1 input, 2 outputs)? In a sense, they're the opposite of each other. – Dave Tweed Jan 4 '13 at 18:17
@DaveTweed I want to mix two inputs A and B into one output. – bastibe Jan 4 '13 at 20:30
In that case, the perception of "loudness" is very dependent on the nature of the signals. – Dave Tweed Jan 4 '13 at 20:52
up vote 9 down vote accepted

That depends somewhat on the application. In most cases a "constant energy" pan will be best. This can be expressed as $$y(t)=\sqrt{\alpha} \cdot x_{1}(t)+\sqrt{1-\alpha}\cdot x_{2}(t)$$ where $\alpha = .5$ is the point of equal energy.

If you are working with fixed point signals, such as wave files for examples, you may run into clipping problems. That could be a topic for a separate question.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.