1-hour Corona project: an iPhone beatbox

Not as impressive as the Beebes’ rapid app efforts, but yet more proof of how easy it is to throw something together in Corona. I did this to test latency for simple looped patterns, creating a skeleton beatbox project. About 1 hour of coding, not including the slider gadget I’d already made.

This shows Corona easily handling scheduled event sounds. Extending it to support asymmetric rhythms, fine volume control on each beat, multiple patterns and a pattern editor would be trivial.

And when Corona exposes more OpenAL interfaces, stuff like panning and 3D positioning would be easy to add.

I didn’t put it in the code exchange as that seems better suited to snippets rather than projects.

Get the project zip file here.

Slider at top is speed, grid is 4 channel, 16 step sequencer, button at bottom is start/stop. As is obvious, no graphic images have been harmed in the making of this. If any artist want to contribute some nice audio control images that would be nice. [import]uid: 3953 topic_id: 6208 reply_id: 306208[/import]

hey great, thanks for sharing. how is the timing on devices?

regards
j [import]uid: 6645 topic_id: 6208 reply_id: 21330[/import]

You’re welcome.

Sounds pretty tight on my iPhone 3GS.

Obviously in a pro audio app you’d need much finer granularity (and there are some pretty awesome mobile DAW tools out there), but for a simple, fun beatbox - or maybe a background player for non-repeating game music - the Corona/OpenAL/Lua combo looks pretty good to me. Certainly better than I expected.

[import]uid: 3953 topic_id: 6208 reply_id: 21338[/import]

thanks for that. in the windows simulator it loses sync quite a lot and that’s on an i7 processor… but windows timing for this kind of engine has never really been sturdy (as opposed to buffer methods: http://developer.anscamobile.com/forum/2011/01/21/soundposition#comment-18828)

I’d guessed that on a device though, where the processor is probably more dedicated the app, that the timing might work better

good work
regards
j [import]uid: 6645 topic_id: 6208 reply_id: 21369[/import]

That’s interesting. Thanks for the feedback. Even the sim on my low end Macbook Pro doesn’t have any noticeable latency. Also, I don’t think this would run well on Android. [import]uid: 3953 topic_id: 6208 reply_id: 21554[/import]