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?

Postby loobian » Sat Oct 18, 2003 2:54 pm

HI all!

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

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

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

Thanks!
User avatar
loobian
Site Admin
 
Posts: 679
Joined: Mon Sep 15, 2003 3:09 pm

Re: Audio: Convert mono to stereo?

Postby Eddi » Sat Oct 18, 2003 3:48 pm

loobian wrote:But, how do I convert mono into stereo?
Maybe:
read channel -> c
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

Postby Wizard » Sun Oct 19, 2003 7:25 pm

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.
User avatar
Wizard
Site Admin
 
Posts: 3226
Joined: Mon Sep 22, 2003 4:52 pm
Location: ON, CA

Postby outchanter » Thu Oct 23, 2003 5:22 am

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

Postby Reiken » Thu Oct 23, 2003 3:23 pm

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

Postby outchanter » Fri Oct 24, 2003 1:52 am

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

Postby jgbauman » Fri Oct 24, 2003 3:05 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).
User avatar
jgbauman
 
Posts: 358
Joined: Sat Sep 27, 2003 9:00 am

Postby Reiken » Fri Oct 24, 2003 7:35 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


Return to Algorithms & Data Structures

Who is online

Users browsing this forum: No registered users and 0 guests