Getting sound from internal source?

25 views
Skip to first unread message

Terry Pinnell

unread,
Sep 5, 2022, 1:01:29 PM9/5/22
to
I have a program that sets alarms, and as well as displaying a message
at the set date/time it is capable of playing a sound track (.WAV
file).

But that sound only plays if my speakers are switched on.

Is there a command prompt or batch file that will 'beep' the internal
'sounder'? There always was one that got activated to tell you of a
serious fault when failing to boot-up, so I'm hoping that still exists
in modern PCs?

MikeS

unread,
Sep 5, 2022, 3:02:14 PM9/5/22
to
It still exists at least on most desktop motherboards but you need very
low level programming to access it. Long ago Microsoft or somebody wrote
a beeper driver (probably using interupts) for that purpose but it
needed "real" MSDOS to obtain direct access to the hardware. I doubt you
can do that with a command prompt or MSDOS emulator running under modern
Windows because you are too isolated from the hardware.

MikeS

unread,
Sep 5, 2022, 3:13:38 PM9/5/22
to
This may be the driver I remembered:
https://www.driverguide.com/driver/detail.php?driverid=34380

Dallas

unread,
Sep 5, 2022, 3:51:50 PM9/5/22
to
We do take for granted that our PC will have a sound card these days.

I remember pretty clearly installing a BEEP.EXE program on a MSDOS system on a desktop that did not
have a sound card. And then wiring in a potentiometer on a knob to adjust the volume of the
internal speaker (beeper).

That was a long long time ago.

Kerr-Mudd, John

unread,
Sep 5, 2022, 4:12:26 PM9/5/22
to
On Mon, 5 Sep 2022 20:02:12 +0100
MikeS <Mi...@fred.com> wrote:

> On 05/09/2022 18:01, Terry Pinnell wrote:
> > I have a program that sets alarms, and as well as displaying a message
> > at the set date/time it is capable of playing a sound track (.WAV
> > file).
> >
> > But that sound only plays if my speakers are switched on.
> >
> > Is there a command prompt or batch file that will 'beep' the internal
> > 'sounder'? There always was one that got activated to tell you of a
> > serious fault when failing to boot-up, so I'm hoping that still exists
> > in modern PCs?
> >
> It still exists at least on most desktop motherboards but you need very
> low level programming to access it. Long ago Microsoft or somebody wrote
> a beeper driver (probably using interupts) for that purpose but it
> needed "real" MSDOS to obtain direct access to the hardware. I doubt you

pianola.exe?
(cant find it on the internets, but I have a pianola.arc file on my PC^w
archive hard disk.)

> can do that with a command prompt or MSDOS emulator running under modern
> Windows because you are too isolated from the hardware.


--
Bah, and indeed Humbug.

Zaidy036

unread,
Sep 5, 2022, 6:14:00 PM9/5/22
to
ECHO <Ctrl>-G ?

Zaidy036

unread,
Sep 5, 2022, 6:15:26 PM9/5/22
to
Echo/| CHOICE /N 2> nul & rem BEL ?

Terry Pinnell

unread,
Sep 7, 2022, 4:54:39 AM9/7/22
to
Tried it anyway but on running got:
"This app can’t run on your PC
To find a version for your PC, check with the software publisher."

Terry Pinnell

unread,
Sep 7, 2022, 5:01:31 AM9/7/22
to
True. My old XP PC now doing duty in my shed/workshop has a
transducer, and its documented beeps were useful diagnostics on
several occasions.

So on modern PCs are you saying that ALL types of failure can now be
indicated by either the monitor or sound card via external speaker?

Terry Pinnell

unread,
Sep 7, 2022, 5:04:30 AM9/7/22
to
I'm a batch novice, but FWIW running neither of those produced any
sound.

Dallas

unread,
Sep 7, 2022, 9:03:44 AM9/7/22
to
On 9/7/2022 4:01 AM, Terry Pinnell wrote:
> So on modern PCs are you saying that ALL types of failure can now be
> indicated by either the monitor or sound card via external speaker?

I am not sure how a laptop emits the startup code beeps.

Zaidy036

unread,
Sep 7, 2022, 11:32:27 AM9/7/22
to
"CHOICE" worked on my Win 10 Pro BUT just checked and have external
speaker. It gives a beep-beep due to error in choice not valid.

Check if Choice is available by opening cmd window and type: Choice /?

Terry Pinnell

unread,
Sep 7, 2022, 12:01:42 PM9/7/22
to
Yes, it's available. But your BAT only delivers sound from the
external speakers.

Conclusion: no piezo transducer in modern PCs ;-(

Dallas

unread,
Sep 7, 2022, 12:17:19 PM9/7/22
to
On 9/7/2022 11:01 AM, Terry Pinnell wrote:
> Conclusion: no piezo transducer in modern PCs ;-(

Then does the BIOS on a modern PC or laptop not produce startup beeps (POST) for these conditions?

https://www.computerhope.com/beep.htm

JJ

unread,
Sep 7, 2022, 11:46:05 PM9/7/22
to
On Wed, 07 Sep 2022 09:54:37 +0100, Terry Pinnell wrote:
> MikeS <Mi...@fred.com> wrote:
>>
>>This may be the driver I remembered:
>>https://www.driverguide.com/driver/detail.php?driverid=34380
>
> Tried it anyway but on running got:
> "This app can’t run on your PC
> To find a version for your PC, check with the software publisher."

That's a driver for the old Windows v3.x. It won't work for any 64-bit
Windows.

JJ

unread,
Sep 8, 2022, 1:32:01 AM9/8/22
to
PC speaker beep is no longer (natively) supported by 64-bit Windows starting
from Windows 7. 32-bit versions still support PC speaker beep.

The reason why the PC speaker won't beep is because of Microsoft want
Windows to support some server class computers which don't have a
Programmable Interrupt Controller (PIC) chip which is normally used to drive
the PC speaker on and off along with a Programmable Interval Timer (PIT)
chip.

(long URL warning)
https://docs.microsoft.com/en-us/archive/blogs/larryosterman/whats-up-with-the-beep-driver-in-windows-7

But Microsoft's solution is lazy one: by using sound card to make the beeps.
FYI, making PC speaker beeps DOES NOT actually require a PIC chip. The use
of PIC in this case is to provide a notification when a timer has been
triggered, so that the program doesn't have to repeatedly ask "is it time
yet?" - which will consume CPU computing time. IOTW, PIC help offload the
waiting time from the CPU to the PIC chip. i.e. PIT signals the PIC, which
in turns, signals the CPU to execute some code. And for timing accuracy's
sake, that repeated time check must not be interrupted for e.g. executing
other thread. So for timing accuracy's sake, it will require one CPU core
dedicated just for repeatedly checking whether the time is up or not. While
this is not multitasking friendly, it IS possible to use beep without a PIC.

64-bit solution is not impossible, but it's problematic. By using 64-bit
Windows XP's Beep driver (BEEP.SYS) to replace the one in Windows 7 or
newer. It's problematic due to Microsoft's monopolizing driver signature
enforcement policy, since the XP driver has no digital signature. The driver
signature check can be disabled, but it has to be done manually during the
OS boot, and the process has been made less convenient since Windows 8
(users have to reboot TWICE just to access to the OS boot menu). 64-bit
Vista embed the beep driver in one of its kernel files, so it's impossible
to retrieve its beep driver.

Third party solution is possible using either a generic hardware I/O driver,
or 64-bit XP driver which is digitally signed. So far, I only found one. I
haven't actually checked it yet (i.e. whether the digitally signed driver is
actually accepted by Windows), but it seems to have all of the needed
components.

https://github.com/cocafe/pc-beeper

Download from the "Releases" sidebar section.

There's also RecallXpBeepStyle project, but its application is a GUI based
one, so it's not usable from command line. The interresting thing is that,
it uses an XP driver, so it can be used to replace the one in Windows 7 or
never. The driver file is in: EventExample/bin/Debug. Or just download the
whole package from the "Code" button then "Download ZIP" link.

https://github.com/LinZong/RecallXpBeepStyle

Terry Pinnell

unread,
Sep 10, 2022, 8:00:59 AM9/10/22
to
The above was mostly outside my technical grasp, sorry. But can you
answer a basic question please. In the unhappy event that my desktop
PC fails to boot, my first step would be to ensure my speakers are
powered on. Can I then rely on getting all the POST messages that I
would have heard on much older PCs?

Did those (which usually relied on a tiny piezo transducer to deliver
the beeps) include any concerning the power supply? Presumably not,
unless they were dependent on the battery?

JJ

unread,
Sep 11, 2022, 7:54:36 AM9/11/22
to
On Sat, 10 Sep 2022 13:00:56 +0100, Terry Pinnell wrote:
>
> The above was mostly outside my technical grasp, sorry. But can you
> answer a basic question please. In the unhappy event that my desktop
> PC fails to boot, my first step would be to ensure my speakers are
> powered on. Can I then rely on getting all the POST messages that I
> would have heard on much older PCs?

PC motherboards should still either have a connector to a PC speaker, or
have a buzzer attached on the motherboards themselves. For those without a
buzzer on the motherboard (i.e. with a PC speaker connector), it would
depend on whether the PC case includes a PC speaker or not. Some PC cases
nowadays no longer include a PC speaker, so the PC speaker connector on the
motherboard is not connected to anything, or can't be connected to anything
unless we manually add a PC speaker ourselves. Thus, without a PC speaker,
no beep sounds will be heard, even though the BIOS/firmware POST do generate
the beep signal.

> Did those (which usually relied on a tiny piezo transducer to deliver
> the beeps) include any concerning the power supply? Presumably not,
> unless they were dependent on the battery?

Motherboard buzzer or PC speaker do not take power from the motherboard
battery. They take power from the power supply which is fed to the
motherboard. The motherboard battery is exclusively for keeping the
motherboard clock and BIOS/firmware CMOS NVRAM chips powered on, so that the
clock is still running and the clock/date part of the CMOS NVRAM can be
updated.

Ammammata

unread,
Sep 15, 2022, 8:24:35 AM9/15/22
to
Il giorno Mon 05 Sep 2022 09:02:12p, *MikeS* ha inviato su
alt.msdos.batch.nt il messaggio news:tf5h3k$3lej2$1...@dont-email.me. Vediamo
cosa ha scritto:

> Long ago Microsoft or somebody wrote
> a beeper driver

yes, confirm, I used it before I bought a Sound Blaster
it was working fine, I used to listen to MOD files
(it was a little "hissing", but for sure better than a simple "bip")

Ammammata

unread,
Sep 15, 2022, 8:33:50 AM9/15/22
to
Il giorno Sun 11 Sep 2022 01:54:36p, *JJ* ha inviato su alt.msdos.batch.nt
il messaggio news:ex9owfvhxcaa$.zk8w1j24l3fm$.d...@40tude.net. Vediamo cosa
ha scritto:

> Some PC cases
> nowadays no longer include a PC speaker

I have a huge collection of pc speakers, removed from many pc before I
trashed them as well as fans, internal USB plugs, cards, disks, RAM
modules, CMOS batteries and jumpers ;)

FileGod

unread,
Dec 14, 2022, 11:49:40 PM12/14/22
to
With the old DOS editor you could hit "control P" then "control G" as I recall to create a beep.bat' it is high ascii for the bell symbol, it uses the PC speaker if you have one, I have a beep.bat, I will try and paste it for you:

Zaidy036

unread,
Dec 15, 2022, 11:58:23 AM12/15/22
to
ECHO( | CHOICE /N 2> NUL
Reply all
Reply to author
Forward
0 new messages