real-time retro sound generator

  ... share sounds with the community.

real-time retro sound generator

Postby dano4droid » Mon Apr 16, 2012 1:01 am

Android needs better sound APIs. At this time, we do not even have the ability to stream midi (we can play a midi file, but we can't stream individual midi notes. I have some really cool game ideas - but they would be difficult to implement without the ability to use real-time midi note generation. I hear the next version of the Android SDK will finally support real time midi streaming - But I decided I can't wait 3 years for all the devices to be upgraded to that version of the SDK.

Then I started researching how to get around this limitation. Here are the choices I found:
1) there is an Android API to write a midi file in real time (you can then tell the media player to play the rendered file) - this involves a lot of unnecessary writing to disk, and introduces a lot of delay (lag)

2) a midi streaming driver is available that was written 2 years ago. It no longer works on Android 2.3 and above. The author does not think it can work again with the latest Android SDKs.

3) use the NDK and some existing library (or modify one) to do the task.

After researching this. I determined that #3 is the best option at this time. SCUMM VM supports emulating the OPL2 (adlib) and C64 (SID) chips. The idea here is to modify the Android Scumm VM project to remove everything but the audio emulation. Change the library to allow us to send commands directly to the OPL2, and/or SID chips. In addition to sending commands directly to these chips - there would also be higher level apis in the Java level to do things like (play/stream midi commands/files, or cfm commands/files). The benefits here are numerous: 1) fm synthesis for retro style games 2) real time sound generation (also good for retro games) 3) the ability to play or stream existing CFM, or MID files (or real time commands). The only concern I have is the amount of CPU it will require to emulate these chips. If I have the time - I'll try to create this! (the retro sound API is a good name for it).
Posts: 3
Joined: Mon Dec 05, 2011 4:05 pm

Return to Sounds

Who is online

Users browsing this forum: No registered users and 1 guest