- 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.
Google announced Gingerbread today and the list of new shiny things to play with is quite long. It includes things like a complete native API for activities/OpenGL ES/OpenSL ES/sensors, audio effect API, and NFC. Of particular interest to me is the OpenSL ES, audio effects, and AAC encoding APIs. It's very obvious to see that these platform changes are meant to push Android gaming in a serious way. Google is hoping game developers will sign on, meaning we might see quite a few more corporate-produced games. All of this will mean a lot of interesting things for the future, especially for MicDroid. Unfortunately all of these fancy new toys are available only under 2.3, meaning we will all need to start pushing for updates from our phone providers. :)
Finally, I'd like to take a minute to talk about MicDroid and updates. Especially the fact there haven't been too many in recent weeks. The most obvious reason for this is that I'm back in school, and classes are taking up a significant portion of my time. I'm hoping (again) to get more free time in the coming 3 week holiday break to put some fixes out for Galaxy S (which I cannot test easily), and (finally) finish up LAME MP3 support and background music import. Additionally, I'd like to take a moment to apologize to Galaxy S users for the latest update. I'm not certain where the failure is coming from, but my suspicion is the audio hardware initialization and wave writing code. I can't really imagine going out to pick up a Galaxy S phone, but if any kind soul out there would like to lend some Galaxy S testing time, it would be much appreciated. Finally, I'm also going to be looking at integrating new 2.3 features, as well as hoping that Google drops the 2.3 source code soon :)
Happy holidays!
I actually made a post on reddit about this a little bit ago, so I thought it might be a good idea to explain in more detail here.
There are an awful lot of settings available in MicDroid, and here's a bit more explanation about what they do.
Android Settings
Prevent Screen Lock: Self-explanatory, screen won't turn off while recording if this is on.
Enable Ads: Self-explanatory, disable this to not show ads.
Recording Settings
Enable Live Correction: Enables playback of tuned sound over speakers in realtime. Requires headphones, otherwise you get really nasty feedback. Also requires that your phone be powerful enough to run it. Realistically this means anything with an ARM v7 chip, which is pretty much all phones after the Motorola Droid 1 except the MyTouch Slide, HTC Aria, and any Samsung phone not as powerful as the Galaxy S (Galaxy, Intercept, etc).
Change Sample Rate: Allows user to change the sample rate of the recording from 44.1kHz to 8kHz. Higher numbers means better sound typically, although it does require your phone to be a bit more powerful. Also, not all phones can record at all sample rates. If you are having trouble getting your phone to record, try changing this to 8kHz or 22kHz.
Change Buffer Size: Allows user to change the buffer size (indirectly). Larger values means the buffer is larger. This value is actually a multiplier, so the difference between an 8x value and a 16x value is VERY large. Larger buffers mean there will be less skipping if your phone can't keep up with the recording and processing. Larger buffers also take much longer to fill than smaller ones, so if you are using Live Correction, it is HIGHLY recommended you keep this number SMALL. Samsung Galaxy S* users are recommended to bump up this setting if they experience trouble recording.
Key Settings
Change Key: Self-explanatory, this allows the user to change the key the program is tuning to. For purposes of this program, minor keys are the same as the relative major key. Musically this is not exactly correct, but due to the way the program processes the notes (it looks at key signature, not the order of notes), there is no difference.
Pitch Settings
Pull to Fixed Pitch: This oddly named setting controls the degree to which the pitch you hear is your voice, versus a specific pitch (Concert A by default). Higher numbers make it sound more like a generated tone. This should be defaulted to 0.0.
Pitch Shift: Controls how many notes the output is shifted by. Setting negative numbers tends to make the sound deeper, positive numbers tends to make the sound squeakier. Usually you don't need to change this setting too much, maybe a few notes negative if you find the default makes you sound rather chipmunk-like.
Correction Settings
Correction Strength: This aptly named setting controls the strength of the auto-correction. Higher numbers implies you want the program to make your voice sound more like the correct pitch. Leaving this at Full is generally fine.
Correction Smoothness: This setting controls how gradual the transition is from tuned note to tuned note. For a more natural sound (similar to what is used for vocals in most songs), set this to 'Some' or more. For the T-Pain/Madonna effect, this NEEDS to be set to 'No Smoothing'. The abrupt transitions between tuned notes is what gives this setting it's signature robotic sound.
Formant Correction: Allows formant correction. This option allows the following to be changed, but does nothing by itself if the Warp Amount is not changed.
Correction Warp Amount: This setting is meant to fix the chipmunk sound that frequently happens. Negative values attempt to counteract this by making the sound deeper. Positive values seem to make the sound even squeakier. I personally find that this setting is generally unneeded, as pitch-shifting tends to give a better result. Probably a better idea to use negative numbers, if at all.
Mix: This setting changes the amount of tuned (processed) sound output versus original (unprocessed) sound. Generally you want the tuned signal, as that's why you're running this app. :P
Default Settings
Reset to Default: self-explanatory, resets all settings to default.
*Samsung Galaxy S: These phones include the T-Mobile Vibrant, AT&T Captivate, Verizon Fascinate, and Sprint Epic 4G and US Cellular Mesmerize.
MicDroid 0.40 has been released!
Release highlights include many force close errors fixed, including some more weird async task related rotation issues. Also there have been ads added to the recording library. AdMob ads can be removed via a setting in the options however, they're purely optional. Code for instrumental support has been added, however it is not enabled, since it only supports wave files currently, and that isn't much use for most users. Future work primarily involves getting LAME built as a library for proper mp3 support. Hopefully this release will be relatively trouble-free, and have fixed most of the outstanding issues from 0.39. Thanks for your support!
I've been pretty busy with school (I know I keep saying it) so I haven't had as much time to devote to Android related things recently, and for that I apologize.
Android
My girlfriend made a giant Android cake for my birthday, and it was delicious! I bought a G2 that same day to replace my Nexus One, because I've been waiting for a high-spec Android slider on T-Mobile for nearly a year. Now all it needs is permanent root... Also, I'm selling my Nexus One, so if anyone out there is interested, feel free to email me about it.
MicDroid
The latest work available on GitHub shows that backing instrumentals are now working, although the functionality is pretty rough, and is limited to wave files only right now. The next logical step is to make the instrumental selection and playback/record functionality a little more user friendly, with a nice countdown toast (or overlay if I can find someone to do that for me), and a nice instrumental selection menu. Additionally, mp3 support via LAME will be included before I release again, since that is one of the big items people have been waiting for, and would allow music library import, mp3 saving, and MMS support (MMS requires mp3 format). This means the next MicDroid release is probably a while off. I'd like to include an ad library too, partly because I intend to get familiar with the API, and partly because ad revenue would be nice too ;) although I fully intend to leave the user an option to disable ads. Finally, if anyone wishes to help out with MicDroid development, feel free to fork at GitHub and submit patches back to me.
Tyrian
This is pretty much stalled. Fortunately OpenTyrian on the Android Market is at a very playable state. I should concentrate on getting mp3 support for MicDroid done first.
UCLA
Classwork comes first now. I don't intend to repeat my undergraduate academic performance.