Well, this is odd. I was jimmying up a simple morse code trainer just to see if 
it could be done. I used perl/Tk and bound the mouse buttons to some callbacks 
which use the hi-res timer to determine the length of the pulses sent by the 
user. It actually works with only a few lines of code. Then it occurred to me 
that I need to turn on a tone when the mouse button is pushed, and then turn it 
off when the button is released. This has me stumped. It has to be something 
that looks like a subroutine call to turn on the tone, and then immediately 
return, even though the tone is still sounding. Then another sub call to turn 
the tone off. obviously, a call to $widget->bell() won't cut it. It will look 
more like
 
tone_on();
# do calculations and draw some stuff on gui
# while the tone is sounding in the background
tone_off();
 
Is there any way to do this in perl? Basically, I need to turn on a tone and 
then have it run in the background until I turn it off.
 
ideas?
 
 
_______________________________________________
Boston-pm mailing list
[email protected]
http://mail.pm.org/mailman/listinfo/boston-pm

Reply via email to