I'm trying to write a music player app for Android that allows the user to take the lead vocalist out of the song.
The math involved is like so:
amount_of_removal * ((left * (balance)) - (right * (1 - balance))) + (1 - amount_of_removal)*(left + right)
Is there any possible way to apply a custom AudioEffect
to an audio stream? Even if I open and decode the file myself?
Okay, looks like I overlooked some rather important information when I posted this question.
Chief among them is the fact that most music formats are so-called "lossy", because they don't store everything that makes up the audio waveform. MP3
, for example, basically disassembles a waveform into its component frequencies, but only stores the loudest ones, discarding the quieter ones.
Couple this with the fact that, for several styles of music, the lead singer is the loudest part of it (especially when they're singing), and you have some issues with sound quality, as some of the quieter frequencies are now needed, now that the lead singer isn't there to mask it.
This means that the best format to read from is actually the lossless ones, and probably one of the easiest is the ancient WAV file.
Overall, the steps required to do what I want is probably something like this:
The only drawback I can see from here (not having tested this yet) are possibly performance issues, as using straight Java might be a little slow.