Mixing Mono Samples with Stereo Samples, Audio DSP using C# |
Mixing Mono Samples with Stereo Samples, Audio DSP using C# |
Apr 19 2012, 06:18
Post
#1
|
|
|
Group: Members Posts: 5 Joined: 19-April 12 Member No.: 98974 |
Hello,
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 |
|
|
|
![]() |
Apr 19 2012, 19:26
Post
#2
|
|
|
Group: Members Posts: 1559 Joined: 24-June 02 From: Catalunya(Spain) Member No.: 2383 |
Could I ask which is your background? I don't want to assume too much (or to little).
Like they said, when having the same sample rate and the same bit depth, Mixing equals to the sum of the values. Doing a division is not a requirement but it might be needed depending on the goal.* Likewise, changing the number of channels of a signal is also quite straightforward: Mono to "N" is just using the same stream for the other channels "N" to mono is mixing the streams into a single one. Since this can cause changes in the volume, a "channel matrix" is applied. Channel matrix is just doing a multiplication before doing the addition, in order to change the amplitude of the signal in that channel. In 5.1 to stereo matrixes, generally the different channels reduce their volume in different amounts before being mixed together. (In a matrix, one source channel can go to more than one destination channel, like when converting stereo to 5.1). Depending on your background you could take a look at http://www.dspguide.com/ . It talks about digital signal processing, and might be helpful for you in the future. (Obviously, if you have just started, most of that will be clueless math and strange words). * Concretely, if you sum the same signal twice, its peak will double and that could cause clipping. Said that, if one mixes 32 streams, it is not wise to have a division by 32 (this would lower the peak of one stream by 30dB. Think that the mute of some car radios is only 20dBs). This post has been edited by [JAZ]: Apr 19 2012, 19:28 |
|
|
|
AltAudio Mixing Mono Samples with Stereo Samples Apr 19 2012, 06:18
pdq How about converting the mono to stereo (two ident... Apr 19 2012, 12:49
Speedskater Is this anything like M-S Stereo System? That... Apr 19 2012, 13:40
AltAudio How about converting the mono to stereo (two ident... Apr 19 2012, 15:32
db1989 It’s one of the simplest operations that can... Apr 19 2012, 16:08
AltAudio QUOTE (db1989 @ Apr 19 2012, 10:08) It’s ... Apr 19 2012, 16:41
db1989 QUOTE (AltAudio @ Apr 19 2012, 16:41) Ok,... Apr 19 2012, 17:35
AltAudio QUOTE (db1989 @ Apr 19 2012, 11:35) QUOTE... Apr 19 2012, 18:11
pdq Don't the stereo streams just contain alternat... Apr 19 2012, 17:25
pdq To create mono from stereo you would take pairs of... Apr 19 2012, 18:27
DVDdoug Mick,
Typically, a stereo mixer (hardware or soft... Apr 19 2012, 19:43
AltAudio Ok thanks for the input. I am a .NET developer and... Apr 19 2012, 22:00
DVDdoug QUOTE I am a .NET developer and I've got an al... Apr 20 2012, 00:34![]() ![]() |
|
Lo-Fi Version | Time is now: 20th May 2013 - 22:50 |