Welcome Guest ( Log In | Register )

Mixing Mono Samples with Stereo Samples, Audio DSP using C#
post Apr 19 2012, 06:18
Post #1

Group: Members
Posts: 5
Joined: 19-April 12
Member No.: 98974


I've got two streams of audio sample that are stored in arrays, one mono and one stereo. I'd like to mix the mono into the stereo stream and output as stereo. Any known examples to accomplish?

Thanks in advance.........Mick
Go to the top of the page
+Quote Post
Start new topic
post Apr 19 2012, 19:43
Post #2

Group: Members
Posts: 3043
Joined: 24-August 07
From: Silicon Valley
Member No.: 46454


Typically, a stereo mixer (hardware or software) will have (at least) two controls for each input.

There is a level control, so if you are mixing A+B you can mix 30% of A with 70% of B, etc. The total does not have to add to 100%, because there is also a master level control, and if you are using floating-point there are essentially no limits. (You'd normally check/adjust the levels to prevent clipping before rendering to an integer format.)

For mono sources there is also a panning control (AKA "pan pot"). The pan control determines "where" the sound is located, left-to right, by adjusting how much of this mono signal gets mixed-into the left channel, and how much gets mixed into the right channel. If you pan to the center (equal amounts in both channels), the level is normally reduced by 3dB, because otherwise the single-track mono volume level is doubled, since it's duplicated in both channels.*

By default, you wouldn't use a pan-pot with stereo inputs, since the left-input normally goes to the left-output, and the right- input goes to the right-output. But, most mixers do allow you to pan the left & right stereo channels indpendently. So, you could move both channels to the left, or both to the right, or move them both to the middle, or criss-cross them, etc.

You will notice that pan controls can take care of stereo-to-mono, or mono-to-stereo (of course you don't have true stereo if you have the same sound in both channels).

* Not all pan pots follow this rule (there are different "pan laws"), and it's usually not that important, since you always have a level control to adjust the mono signal before mixing & panning. It does become important if you are moving the sound around during the track... i.e. If a speaker/singer starts-out on the left and moves across the "stage" to the right during the track/song. In that case, you don't want the voice to get louder in the "center".
Go to the top of the page
+Quote Post

Posts in this topic

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:


RSS Lo-Fi Version Time is now: 27th November 2015 - 04:40