Audio: Convert mono to stereo?

Discuss all kind of algorithms and data structures from their mathematical and programming sides.

Moderators: Darobat, RecursiveS, Dante Shamest, Bugdude, Wizard

Audio: Convert mono to stereo?

HI all!

I am searching for an algorithm to convert mono file (wave) into stereo.
I know how to convert stereo into mono:
mono = (l+r)/2;

But, how do I convert mono into stereo?
Maybe:
stereoLeft = c
stereoRight = c

Have in mind, that both channels being equal is not a problem...
Any suggestions are very welcome!

Thanks!

loobian

Posts: 679
Joined: Mon Sep 15, 2003 3:09 pm

Re: Audio: Convert mono to stereo?

loobian wrote:But, how do I convert mono into stereo?
Maybe:
stereoLeft = c
stereoRight = c

Agree with this one, well it must be, you can't do anything else with a mono sound but play it on both left and right
Fighting for peace is like fucking for virginity
Eddi

Posts: 18
Joined: Thu Oct 16, 2003 12:16 pm
Location: Iceland

Well, you COULD implement funky wave patterns which makes it waver from left to right and back again. Or you could output sounds of a specific frequency range through one channel and everything out the other.
I beleive I have actually seen that second one pulled off in such a way that one instrument played left, another played right, and vocals was centre. I'll see if I can find that info again. Didn't save it because it didn't interest me at the time.

Wizard

Posts: 3226
Joined: Mon Sep 22, 2003 4:52 pm
Location: ON, CA

I think you can make it sound slightly 3D by delaying the one side a fraction of a second behind the other.
outchanter

Posts: 12
Joined: Sat Oct 18, 2003 9:02 am

The above algorithms would work, but if you don't want it to sound like it's mono on 2 speakers, then a possibility would be to dampen certain pitches on one speaker.

For example, if you wanted a sub, then you could remove all pitches below \$sub_level on your normal speakers and only play pitches below \$sub_level on your sub.
This concept could also be reproduced with maybe vocals, or other certain instruments, you'd just have to find the pitch ranges of certain instruments and hope that they don't crossover to often.

>> RC
Reiken

Posts: 9
Joined: Mon Oct 20, 2003 3:23 pm

Ok, so the only thing I need to know is - how do you remove pitches from a wave?
outchanter

Posts: 12
Joined: Sat Oct 18, 2003 9:02 am

Use a 1D low pass filter (similar to blurring images, e.g. gaussian filter).
But you can get better control over frequencies via FFT (Fast Fourier Transfrom).

jgbauman

Posts: 358
Joined: Sat Sep 27, 2003 9:00 am

Ok, well that person seems to know what they are talking about, speak to them.
Reiken

Posts: 9
Joined: Mon Oct 20, 2003 3:23 pm