Developers for iPhone, iPod touch, and now the iPad have long complained about lack of access to the iTunes library, the file store and metadata for uploaded files. While version 3.0 of the OS provided limited playback capabilities (play/pause/stop), it was a far cry from what you’d need to build a DJ or other music app that made use of a user’s content. You couldn’t, for instance, adjust volume control, cueing, no mixing, or scratching.
Update/clarification: I may have exaggerated how much access is available. Obviously, Flare is working, as you can see, but the question of the exact mechanism by which it works and the documentation of the updated APIs is something that remains to be confirmed, beyond Asyn’c experience. I’m actively researching this issue. I’ve changed some wording to reflect the fact that what we do know about access to this functionality in the SDK, and how it works in the real world, is based on one shipping application for iOS 4 and the experiences of the developer of that app. The other issue is what mediates between the file in the database and playback; that is, unlike on desktop, you don’t necessarily get direct buffer access to files without an additional step. But the upshot is still that you can scratch tunes from iTunes, at least! -PK
Executive summary: It appears what has opened up is the ability to export assets from the library on the device, and following that extra step, use a local copy for access to buffers. See comments for more discussion. This would fall well short of being able to manipulate buffers from the file directly, but it’s a step. Stay tuned for further info next week as I confirm with developer sources.
With iOS 4.0, currently available for the iPhone and iPod touch, that changes, at least according to what we’re hearing from one developer – and seeing demonstrated in a shipping app. CDM has confirmed with developer Async Games that a new public API (meaning a fully supported developer tool) provides something closer to full-blown access to the iTunes library, in terms of not only metadata about tracks but also manipulation of audio data during playback. Result: you can now, for instance, scratch audio from songs uploaded from iTunes on a Mac or PC to the device. If correct, that would be likely to mean a coming flood of DJing on the iPhone and iPod touch, soon to be followed by the iPad whenever the 4.0 OS becomes available for Apple’s tablet. (Nor is this even limited in applicability to DJ apps – iTunes could become a more convenient way for syncing your own tracks and samples, or loading a playlist of backing tracks or other musical content onto your Apple mobile.)
The caveat appears to be that you need to “import” tracks from the library first; I’m confirming what that means and how long it takes. That would be shy of having direct, buffer-level access to tracks as seen in desktop DJ apps.
So far, the first app to actually ship with support for the feature is Flare Scratch, a simple simulation of a turntable with touch scratch support. You can scratch any song in your iTunes library, meaning this app developer has figured out a way to access audio buffers as they’re played. Apparently, the API isn’t entirely perfect, but it sounds like a step in the right direction, based on the impressions we hear from this developer. The developers of Flare Scratch also make a more full-featured DJ tool called Baby Decks DJ for the iPad, which could mean that, with iPad support, the tablet could become an all-in-one DJ solution. (Of course, a MacBook still has one significant edge – far, far greater storage capabilities.)
Incidentally, this isn’t an issue with Google’s Android platform, which provides open access to any file stored on the user’s SD card, and complete buffer access to that media (video, audio, the lot). Note that there may be some issues even on Android with using compressed assets; I’m writing some tests. Android developers, however, face a different set of challenges, like inconsistent handset audio drivers that can interfere with crackle-free, low-latency audio performance. (That situation looks brighter in the future, but it’s a whole other can of worms.)
Anyway, if you’re all alone on a park bench and want to scratch softly to yourself, you now have a solution. (Other videos, ranging from the useful tutorial to the somewhat frightening demo, at iflarescratch’s YouTube channel.)
I hereby open commenting to a bunch of people complaining about how this will ruin DJing and continue the slow decay of civilization itself. (Hey, I’m just the messenger. Leave me out of it.)