5

Folks,

In my android app, I need to display a musical instrument such that the user (mostly children) could press a key and I play the music note through the speaker.

I am trying to understand what it takes to generate a music note under Android. The examples on sound that I saw mostly use MediaPlayer or SoundPlayer to play media files. I am looking for sending a specific tone with duration to the speaker.

I would appreciate your help in pointing me in the right direction.

Thank you in advance for your help.

Regards,

Peter

user556560
  • 81
  • 1
  • 1
  • 2

1 Answers1

4

Check out this question for 1 possible implementation of Tone Generating.

Playing an arbitrary tone with Android

Community
  • 1
  • 1
FoamyGuy
  • 46,603
  • 18
  • 125
  • 156