playing mono sound vs stereo sound

playing mono sound vs stereo sound

Post by Heli » Mon, 14 Dec 2009 11:54:04


Can I simultaneously play one wav file in one speaker, and another in the second? Both of the wav files are mono, and I can combine them into a two-column matrix, but this is added before being played in both speakers if I use wavplay.
 
 
 

playing mono sound vs stereo sound

Post by Dave Robin » Tue, 15 Dec 2009 00:23:02


Yes

Regards

Dave Robinson

 
 
 

playing mono sound vs stereo sound

Post by Heli » Tue, 15 Dec 2009 01:14:05

Well, I did suspect it was possible, thanks. Do you have suggestions as to what I might try?
 
 
 

playing mono sound vs stereo sound

Post by Dave Robin » Tue, 15 Dec 2009 01:53:04


Welll do exactly what you stated in your first contribution.

Your Mono 'soundtracks' probably get loaded with two channels (i.e. the data matrix contains 2 columns), one representing the left and one representing the right stereo channel. But both would contain the same information. Thus when playing it, you get the same sound out of each channel, giving you the impression that the sound source is directly infront of you.

Now if you replace one of the columns of the two with one of the columns from the other soundtrack, then when you play the composite soundtrack, you will get one set of contents in the right ear, and the other in the left ear.

The only thing to be careful of, is that the wav files were sampled at the same rate, and you truncate the length of the longest soundtrack to exactly equal to the length of the shorter one, so that combining the two becomes relatively trivial.

I guess you already know how to read in the original wav file,and to play the composite waveform through your sound system. If not come back.

Your original contribution seemed to suggest that you already had an excellent idea how to proceed, as you hadn't actually asked a question.

Regards

Dave Robinson