How can I get the instrumentals only from a file and remove the vocals?
I understand this is called karaoke.
A software that can do this is called sox
It has an option for karaoke:
So from command line this ...
would create music with vocals removed.
Can't get any easier?
There are more programs. audacity can do it too. It is graphical.
Here is a how to. What sox automated you need to do manually with audacity so it is a bit more difficult but also lets you tweak more (so based on experience one or the other might be a better options).
To have a live removal of vocals from a stereo recording we can add a LADSPA filter as a sound output to pulseaudio. There is a quite good karaoke plugin from the Steve Harris' LADSPA Plugins which will remove central vocals from a stereo recording, and which can also be used with Audacity.
These plugins will be installed with the package swh-plugins . The amount of voice removal and consecutive mono conversion is given as control parameter in dB.
To apply the effect we need to know the pulseaudio name of our default audio sink with
The default sink name is marked with an asterix like in the example below:
We can then apply the karako filter with the following command
Note down the module number given as output from above command in case we want to remove it again (
Choose this newly created audio output sink as output in your sound setting before you start playback of your music player.
Note that not all music recordings are suitable for this karaoke plugin, the more central the vocal stay the better. Mono recordings will not work.
The "Remove Vocals" option in most programs uses a clever trick. Usually when recording a song, the vocals are centered, meaning they are present at an equal volume in both the left and right channels. On the other hand, usually instruments are off-center, meaning they are louder in either the left or the right channel. Therefore, you can try to remove the vocals by "subtracting" the two channels. Since the vocals are the same in both, they disappear completely. Since the instruments are louder in one than the other, they are quieter, but still present.
This technique obviously does not work on mono files that do not have separate left and right tracks. Moreover, it more or less generates a mono output. Even for songs that were recorded with centered vocals and off-center instruments, it normally cannot remove the vocals completely.
While it is possible Virtual DJ used some secret or proprietary algorithm to achieve better performance, I find that unlikely, especially given the content of their FAQ on the subject. In fact, they even make a recommendation for an alternative program, which is incidentally the same one I was going to recommend regardless.