I’m evaluating BASS and FMOD as possibilities for my app.
I want to be able to remove vocals by using a center pan removal technique. Is there a simple and efficient way to do this realtime, and if not realtime, then normally to a cached mp3 file?
I have no experience with fmod yet.
Thank you for your responses.
- hippocoder asked 8 years ago
Are you saying the source file is multichannel? (ie greater than stereo) If so that’s quite easy with Channel::setInputChannelMix.
If you’ve got a stereo sound with vocals mixed into it, that’s going to be harder, but as a center pan means the left and right signal will contain the same data, you would want to subtract it from the mix as it plays.
You can do that yourself by creating a dsp unit with System::createDSP where you process the samples yourself via the ‘read’ callback (you get passed chunks of interleaved l/r floating point data), then add the user dsp to fmod’s playback system with Channe::addDSP
[quote:10cj2oqw]I want to be able to remove vocals by using a center pan removal technique. Is there a simple and efficient way to do this realtime, and if not realtime, then normally to a cached mp3 file? [/quote:10cj2oqw]
It would not be difficult to make a custom DSP which does centre pan removal.
Here is the code, drop this into the dsp_custom example and change the createSound from "drumloop.wav" to a stereo song with lyrics panned to the centre.
FMOD_RESULT F_CALLBACK myDSPCallback(FMOD_DSP_STATE dsp_state, float *inbuffer, float *outbuffer, unsigned int length, int inchannels, int outchannels)
for (unsigned int sample = 0; sample < length; ++sample)
float left = inbuffer[sampleoutchannels];
float right = inbuffer[sampleoutchannels+1];
float out = left – right;
outbuffer[sampleoutchannels] = out;
outbuffer[sample*outchannels+1] = out;
Note: this DSP code assumes the system is running in stereo which it should be for iPhone anyway.
I tested this on a couple of songs, some work better than others.
- Guest answered 8 years ago
This code works well in the dsp_custom example!
Is it possible to extract center pan?
Maybe this is the opposite case to center pan removal.
I hope to use only the extracted vocals in my iphone app and I have still many things to learn until using Fmod as I wish.
- kongdol answered 7 years ago
Please login first to submit.