I don't see an easy way.
You could use android.media.AudioTrack with setPlaybackRate and a "file" consisting of a simple sine wave, but this is an ugly hack to playback a single tone of arbitrary frequency. Better yet you could synthesize the audio files as needed (creating 8-bit PCM files programmatically is left as an exercise for the reader).
IMHO, the "cleanest" approach would be to dynamically generate the appropriate MIDI data, taking advantage of the built-in MIDI decoder.

Reply With Quote

Bookmarks