10

Strangely I find no support for Midi in Android. The only thing that comes close is the Jetplayer, but this only takes a existing .jet file.

I want to dynamically generate a midi file with some intervals and play it. I even thought about just manually creating a .jet file with a tone and then transposing it with the jet player, but it limits the transposing to -12, +12. Which is not so good for me.

There also is a ToneGenerator on Android, but it's limited to predefined tones with no way to transpose.

Does someone know how to achieve midi generation and playback on Android?

3 Answers 3

5

Perhaps this Pragmatic Programmer thread might be of interest.

1
  • Found something there. It looks like the Mediaplayer in android does support midi files, so all I have to do now is find a existing midi generation library and use it.
    – Peterdk
    Apr 17, 2010 at 18:32
4

I currently settled for the dynamic generation of midi files that then are fed to the MediaPlayer. It's quite easy to build a simple midi file generator and the MediaPlayer works correctly with it.

I do have opened a feature request for direct streaming access to the synthesizer. If you are interested in streaming midi, please rate, star, comment there.

3

Better late than never, but there's a bare-bones Java MIDI library on Google Code here: http://code.google.com/p/android-midi-lib/

That can handle MIDI file generation and you can use MediaPlayer to play it back supposedly.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.