[Tutor] Beep sound

Phil phil_lor at bigpond.com
Sun Mar 24 00:31:33 CET 2013


On 24/03/13 03:42, Bod Soutar wrote:
>
> On Mar 23, 2013 2:24 AM, "Steven D'Aprano" <steve at pearwood.info
> <mailto:steve at pearwood.info>> wrote:
>  >
>  > On 23/03/13 12:48, Phil wrote:
>  >>
>  >> Just out of curiosity how can a beep sound be generated?
>  >>
>  >> My interest in this came about because echo -e '\a' no longer works.
> Also print '\a' doesn't work, presumably for the same reason. The
> following is also mute:
>  >>
>  >> import Tkinter
>  >> Tkinter.Tk().bell()
>  >>
>  >> Print '\a', under Idle, causes a bell icon to be displayed so it
> seems that the lack of a beep is due to a system setting.
>  >
>  >
>  >
>  > Would you like us to guess what system you are running? Linux, Mac
> OS, Windows, FreeBSD, OpenBSD, Android, something else? My guess is...
> Windows XP. Am I close?
>  >
> I'm gonna guess Ubuntu, in which case the system beep is probably
> disabled system wide. Google "ubuntu enable disable system beep"
>

Thank you for your reply Bodsda,

Actually, I didn't think there was any need to make any guesses since 
"echo -e" is exclusively a Linux command. Anyway, I had already spent 
some time searching for an answerer and the answer given most often was 
to "modprobe pcspkr". This didn't lead to a working beep.

As I said previously, I'm was only curious and it's of little 
importance. There are many methods, some more complex than others, to 
play sound files. I found that the pygame library is the easiest to use.

Thank you again for taking the time to answer.

-- 
Regards,
Phil


More information about the Tutor mailing list