Page 1 of 1

beep (windows system tones)

Posted: Sat Feb 07, 2015 12:43 am
by Quentin
Hi, this is an ironic question to put to a forum that mostly does sound processing. I am using a touch screen and want a positive audio feedback for button presses. I notice that the msgbox module uses the windows system tone. I wonder if there is a simple way to leverage a preexisting system tone to get a click. Or if not, what is the cleanest way to used the audio toolbox to achieve this very basic goal? Perhaps there is a analogous example out there that I have not found.
Thanks,
Quentin

Re: beep (windows system tones)

Posted: Sat Feb 07, 2015 10:25 am
by Sonic Wallpaper
Hi - please see attached for a button that triggers a button sound. I took the standard button, and within the Ruby object, I added:

playSound @soundPath

in the mouseLDown method

and added an input for soundpath, so you can set the wav file outside of the button.

The path is relative, so the wav files is stored in the same location as the schematic. According the the docs - if you add a sub directory like "sounds" - the path would be:

sounds\button.wav

=========

I don't know if this is the best or right way, but it works :) I hope this helps.

FIRST POST! :ugeek:

//

Sonic Wallpaper

Re: beep (windows system tones)

Posted: Tue Feb 10, 2015 8:41 pm
by Quentin
Hey, thanks for that, I will give it a try itlooks to be just what I wanted.
Quentin