Take the 2-minute tour ×

I want to extract the vocals from a .wav file in c/c++. (remove instruments)

Q1. Can I extract vocals by using a BPF(Band Pass Filter)?

Q2. Can I extract vocals by comparing L-channel and R-channel?

If the answer is yes, then how? Now, I've done FFT, but I don't know what to do next.

Is there any other good way? If you know, please tell me.

share|improve this question
You can't. It's very complex operation –  Ari Sep 20 '12 at 11:43
See manual.audacityteam.org/man/… for a discussion. It is not an exact science. –  Antoine Mathys Sep 20 '12 at 12:14
you need a short time fft wich is not exactly an fft... –  ted Sep 20 '12 at 12:41
The voice is the singers instrument. You won't be able to isolate it from the other instruments perfectly. –  harper Sep 20 '12 at 12:52
Particularly wrt Q2, it very much depends on how the sound was recorded and mixed. –  MvG Sep 20 '12 at 14:04
show 1 more comment

closed as not constructive by CaseyB, George Stocker Sep 21 '12 at 16:28


2 Answers

EDIT: Ah damn, @Antoine beat me to it in the comments.

I'm no expert by any means, but a not-optimal way to do this for popular modern stereo songs is to flip (invert) one of the L/R channels, and recombine the song.

This is because USUALLY studios mix the vocals in the center, resulting in the same waveform for vocals in L/R.

Not the best way, not guaranteed. But works pretty well on the three songs I've had to do it on so far.

share|improve this answer
add comment


No, vocals share frequencies with other instruments, there's no single band that encapsulates an exclusive instrument range. For example, you will find that even bass instruments make use of higher sound frequencies, especially when distortion and overdrive are applied (or any other effect that adds harmonics to a signal).


Subtracting left from right channel (or right from left) will remove anything panned dead center (usually vocals). It will not remove any stereo vocal effects.

It is best to perform this subtraction from a wave/aiff file rather than an mp3 to yield the best results.

share|improve this answer
add comment
