0

Is there any way to generate and play pure tones in Android? I know there isn't any MIDI support in Android at the moment so I was wondering if there were any third party libraries for doing it?

foobar5512
  • 2,470
  • 5
  • 36
  • 52
  • This Stack Overflow question might be what you are looking for... http://stackoverflow.com/questions/2413426/playing-an-arbitrary-tone-with-android – Mel Dec 28 '12 at 10:20

2 Answers2

0

In my experience, MediaPlayer actually will play MIDI files. As for generating the tones, the only library I know of is a general MIDI library, which you can probably use to create MIDI files on-the-fly and hand off to MediaPlayer for playback.

http://code.google.com/p/android-midi-lib/

LeffelMania
  • 12,765
  • 4
  • 32
  • 34
0

This blog post shows how to use the AudioTrack api and has an example of pushing a basic sine wav to it.

http://www.badlogicgames.com/wordpress/?p=228

Rich
  • 36,270
  • 31
  • 115
  • 154