- UCLA M.S. Computer Science
- Android Developer
- Freelance IT
or, thoughts from a random graduate student
I've heard T-Pain himself mentioned that the famous I Am T-Pain app will be coming to Android, and that there will be much rejoicing. What does this mean for MicDroid? Well, despite the fact that I definitely don't have the backing of a company to equalize on features, I don't plan on closing up shop. It will however let me work at a more leisurely pace (as if the pace I work at isn't leisurely enough already), because there are a few things which are interesting enough to me to keep me working on this project.
Those of you out there who actually keep up to date with my commits on github will probably have noticed that MicDroid is in fact capable of background music now, albeit with some pretty serious caveats. First and foremost is the fact that in order to set a track as background music, it is required that the track be in WAVE format, and not MP3, AAC, or any of the other less popular audio formats. This is primarily because Android does not expose any sort of audio decoder (or encoder) API to developers, despite the fact that most phones have hardware capability to do so. The current workaround is to use Lame4Android to decode MP3 to WAVE, then set that WAVE as backgrond music. Ideally I'd like to add liblame to MicDroid and just decode MP3s on the fly, but the MP3 codec does in fact have licensing issues, and I'd prefer not to deal with that for now, at least not until other more interesting problems have been solved.
The other two remaining issues that I'd like to look at are echo cancellation and audio resampling. Both of these are necessary since phones may be recording at an arbitrary sample rate, while background music may be playing at a different sample rate. Since MicDroid uses a simplistic Output = Mic / 2 + Music / 2 sort of formula to mix, this means the PCM data input to the mixer needs to be sampled at the same rate. Currently I'm looking to tap CCRMA's resample library to do this, which means reading and understanding the code. Sadly my background is in software, so I don't have the DSP knowledge to make it a trivial task, so this may take longer than I hope. Secondly, the echo cancellation, which will make it far easier to deal with live correction (hopefully), is something else I'd love to add in. Personally I'm actually not too sure there's a lot that can be done, due to the lack of any low latency audio API in Android, but I think it's a direction worth looking into. The best sources for this seem to lie in VOIP software and solutions, and I'm looking into sourcing some code from Oslec and csipsimple. Again, DSP is not my strong suit, so it remains to be seen how much I can do with the code.
So in summary, there are still plenty of things left to build, and plenty of directions to expand. I'm thinking that once I get basic audio mixing capabilities functioning using resampling I will release an update with instrumental support as an experimental feature. Additionally, it is my plan to do a write up about the various audio processing that MicDroid does as well.
Until then though, I have plenty of coding to do.