Beep Command in SMSQ/e and QemuLator

Anything QL Software or Programming Related.
User avatar
QL Fanatic
Posts: 782
Joined: Mon Dec 13, 2010 11:17 pm
Location: UK, Essex

Beep Command in SMSQ/e and QemuLator

Postby Mr_Navigator » Mon Aug 07, 2017 8:06 am

Struggling with some graphic differences between the QL and the SMSQ version in QemuLator which have been briefly explored here and a future QUANTA article, I decided to run the identical program in both QPC2 version 4 and the SMSQ patched version of QemuLator.

Aspect ration being the most obvious difference on my setup, however something I was not expecting was a difference in sound.

In QemuLator a simple BEEP 20,5 produces a click
In QPC2 the same command produces a beep

This seems strange why there would be any differences, however on reading the manual it states

Since version 3.02, the beeper is no longer emulated through the PC speaker (this was only possible under Win9x/ME anyway) but through the soundcard by using the DirectSound interface. This way all Windows systems can benefit from the emulation. The emulation has been completely rewritten for this purpose and the sound is now quite similar to the original beep.
Sound emulation can be configured to be enabled (default), disabled, or enabled automatically. The reason this item is optional is that under some Windows versions DirectSound applications can work simultaneously with other DirectSound programs but not with old waveform applications. This means that after starting QPC, some applications can’t emit any more sounds, even when QPC is not beeping. Now the emulation can be completely switched off or, if you still want the occasional beep and have other applications work correctly, you can set it to “automatic” mode. In this mode, DirectSound is enabled before every beep and released again immediately. The drawback is that this procedure needs some time (there’s some “latency”) thus short beeps may simply get lost (i.e. the sound is switched off again before the soundcard has time react).
Furthermore, there is an option to set the default volume of the beeper emulation. This is useful because an emulated beep can be much louder than normal sounds.

So I guess using the soundcard makes the difference, where QemuLator pipes it through the PC speaker routine even though it ends up at the same point.

It would be interesting to know if the original BBQL and SMSQmulator produce a click or beep.

QLick here for the Back 2 the QL Blog
User avatar
Super Gold Card
Posts: 739
Joined: Mon Feb 16, 2015 1:40 pm
Location: Veneto

Re: Beep Command in SMSQ/e and QemuLator

Postby Cristian » Mon Oct 02, 2017 8:25 pm

Mr_Navigator wrote:
It would be interesting to know if the original BBQL and SMSQmulator produce a click or beep.

The original QL produces a "click" (almost the same as Qemulator)

User avatar
Super Gold Card
Posts: 600
Joined: Sun Feb 02, 2014 10:54 am
Location: Esslingen/Germany

Re: Beep Command in SMSQ/e and QemuLator

Postby mk79 » Thu Oct 05, 2017 3:53 pm

QPC's original beep code was based on QXL's beep code and it did the timing using the 50Hz poll. I rewrote the code for QPC2, but the timing is still based on the poll, which makes the shortest possible sound interval 20ms. A parameter of 20 however requests a sound of 44µs, which in this case will be (heavily) rounded up.


Who is online

Users browsing this forum: No registered users and 5 guests