Beep on WIndows 11
MRAB
python at mrabarnett.plus.com
Sun Nov 12 12:12:17 EST 2023
On 2023-11-12 11:16, Chris Angelico via Python-list wrote:
> On Sun, 12 Nov 2023 at 21:27, Y Y via Python-list
> <python-list at python.org> wrote:
>>
>> I am curious and humble to ask: What is the purpose of a BEEP?
>>
>
> There are several purposes. I can't say which of these are relevant to
> the OP, but some or all of them could easily be.
>
> * A very very simple notification that can be triggered by any program
> * An audio cue that is not routed to your regular audio system (good
> if you use headphones but are AFK)
> * An extremely low level signal that requires little-to-no processing power
> * An emergency signal that does not even require a CPU (probably not
> in this instance though!)
> * Imitating a pre-existing audio signal that works by beeping
>
> Depending on what's needed, a more complex system might suffice (for
> example, I cover the first two points by having an entire separate
> audio subsystem with its own dedicated speakers, which I can invoke
> using VLC in a specific configuration); but a basic beep is definitely
> of value. I suspect in this situation that the first point is
> important here, but it's up to the OP to elaborate.
>
> (Note that the "no CPU emergency sound" option usually requires a
> motherboard-mounted speaker or speaker header, which not all have
> these days. Sad.)
>
Recently, I wanted a program to beep.
In the old days, with a BBC micro, that was simple. It had 3 tone
channels and 1 white noise channel, with control over frequency,
duration and volume, beeps on different channels could be synchronised
to start at the same time, there was a sound queue so that the SOUND
command returned immediately, and there was an ENVELOPE command for
controlling the attack, decay, sustain and release. All this on an 8-bit
machine!
My current PC is way more powerful. 64-bit processor, GBs of RAM, etc.
Python offers winsound.Beep. 1 tone, no volume control, and it blocks
while beeping.
More information about the Python-list
mailing list