Generate sounds programmatically

702 views Asked by At

I want to develop a bada application that generate notes when user touches the screen.

Is there any way to do that? I remember my old Amstrad CPC 464 had a BASIC instruction, SOUND, to generate sounds programmatically.

Is there any library to do that?

1

There are 1 answers

0
Pihhan On

in Osp::Media, you have TonePlayer classes, or low-level AudioOut class, which should alow you to play anything you need. I think generation of array with sinus is not that hard, but i do not think today's application should have one tone beeps. Better to include playing from resource file with prepared beeps, and maybe allow user to use his own sounds.

I think TonePlayer is easy enough to do what you want. See their example how they use it.