System Beep?

Karsten Hilbert Karsten.Hilbert at gmx.net
Sat Mar 9 06:32:15 EST 2019


On Sat, Mar 09, 2019 at 11:55:03AM +1300, DL Neil wrote:

> You've piqued my interest. I haven't worked with sound using Python, but a
> future project, presently graphics/video, could easily expand...
> 
> I don't think it is an OpSys fault, per-se. Someone with some Python-audio,
> indeed Linux-audio (in my case) experience may well blow-apart my theory,
> but here goes (E&OE):
> 
> Python print()s to files. Normally the shell and a running program will
> print() to the screen. This can be piped or re-directed to a disk-file (for
> example). Thus, many such implementations have no bell to ring!

Well, "back in the days", there was a known difference
between "playing music" and beeping the system speaker.

The latter was a built-in real speaker which could be beeped
by various arcane and magic incantations, one of which was
sending the BEL control character to the terminal. Many, but
not all, terminals still support that one way or another.

But it's got nothing to do with access to any DSPs.

However, under the hood, the "system speaker" will nowadays
be faked any number of ways: flashing the terminal, piezo
buzzer, sending stuff to DSPs below the beloved
beep-the-speaker interface.

So, first of all, one needs to decide: do I want to *play*
sound, very likely from a file, or do I "simply" want to make
the system "beep" one way or another.

Or, in fact, do I want to grab user attention - for which
there is additional ways in today's toolkits, say

	https://wxpython.org/Phoenix/docs/html/wx.TopLevelWindow.html#wx.TopLevelWindow.RequestUserAttention

Karsten
-- 
GPG  40BE 5B0E C98E 1713 AFA6  5BC0 3BEA AC80 7D4F C89B



More information about the Python-list mailing list