Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android - how to create music note sound?

Tags:

android

audio

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

like image 742
user556560 Avatar asked Oct 10 '22 22:10

user556560


1 Answers

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

Playing an arbitrary tone with Android

like image 82
FoamyGuy Avatar answered Oct 13 '22 11:10

FoamyGuy