VOGONS


First post, by NY00123

User metadata
Rank Member
Rank
Member

Hey there,

Before I get into the details, let me ask just one thing: If someone who is reading this has got a working PC with the relevant properties, please upload a recording! I think it should be OK to do so with a microphone.

Alright, well, it may be true that the IBM 5150, along with PCs released much later, had speakers used to approximate square waves. However, on one of the very first PCs I got to use, I am not sure this is what was approximated. Nowadays, I'd say that the various beeps sounded more like sawtooth waves or "asymmetric" square waves. When I say "asymmetric", I mean that the so-called "duty cycles" of the waves are not 50%.

I think that I have got a good approximation in Audacity (http://audacity.sourceforge.net/), by generating a sawtooth wave and then applying a specific kind of equalization, using a curve file attached to this post.
I have also attempted to make similar sounds in DOSBox, although what you'd see are really quick hacks which attempt to generate "asymmetric" square waves, rather than equalized sawtooth waves. Furthermore, they don't seem to work well with some low-frequency sounds.

To understand better what I'm talking about, here are a few tests that you can make:

1. Play the attached OGG file to have a rough guess of the way a
a 440Hz "beep" would sound on such a PC.
2. Generate a tone with Audacity. Basically, you should generate a Sawtooth tone of some frequency (440Hz seems to work), then ask for Equalization under the "Effect" menu, pick "Save/Manage Curves" and import the XML file I've attached (you should rename it to have the .xml extension first) and finally select it as the curve to use. You may then listen to the result with "Preview" and apply with "OK".
This is, more or less, how I've generated the OGG file.
3. Apply dosbox-svn-pcspkr-non-true-square-wave.diff against a recent revision of DOSBox SVN. It is basically a hackish attempt to replace the true square waves with "asymmetric" ones.
4. However, here it may be more important for some that the sounds in certain games, like Keen 1 and 4, are somewhat more true to the original. This is why I've attached similar diff which combines a different patch from ripa. For the original patch, check out "dosbox_patched4.zip" from the following thread (3rd page):
ripa PC Speaker patch (was Want to use PC Speaker and not Sound Blaster in StarControl 1)

Thanks for any useful info that ones may add!
(Most important, though, is to know what are these sounds exactly.)

NY

Last edited by NY00123 on 2012-11-05, 18:26. Edited 1 time in total.

Reply 1 of 7, by MaxWar

User metadata
Rank Oldbie
Rank
Oldbie

For fucks sake dude!! Did you have to make this sound sample so loud? I almost had a heart attack!

FM sound card comparison on a Grand Scale!!
The Grand OPL3 Comparison Run.

Reply 2 of 7, by NY00123

User metadata
Rank Member
Rank
Member

[May I go with sarcasm?]Sorry all, but the volume you've heard is not far from Audacity's default. I simply adjust the speakers accordingly.[/Sarcasm]

I do agree it is pretty annoying, though... I have corrected the OGG file, *as well as* the XML file! (Yes, the XML would also produce a loud tone, even with a lower volume sawtooth wave geenrated initially).

Apologizes to all and please re-download if you've already done so.

Reply 3 of 7, by MaxWar

User metadata
Rank Oldbie
Rank
Oldbie

One time ive heard this type of 'buzz' sound was when the ram was not properly installed in my 386 and when powered it would make steady bursts of a "similar" Buzz kind of sound. But normally it Beeps just like other PCs.

FM sound card comparison on a Grand Scale!!
The Grand OPL3 Comparison Run.

Reply 4 of 7, by VileR

User metadata
Rank l33t
Rank
l33t
NY00123 wrote:

Alright, well, it may be true that the IBM 5150, along with PCs released much later, had speakers used to approximate square waves. However, on one of the very first PCs I got to use, I am not sure this is what was approximated. Nowadays, I'd say that the various beeps sounded more like sawtooth waves or "asymmetric" square waves. When I say "asymmetric", I mean that the so-called "duty cycles" of the waves are not 50%.

What kind of PC was that? possibly it had some additional circuitry that modified the duty cycle/waveform, or the speaker was physically filtered somehow... though I can't really imagine a reason to do that.

[ WEB ] - [ BLOG ] - [ TUBE ] - [ CODE ]

Reply 5 of 7, by NY00123

User metadata
Rank Member
Rank
Member
MaxWar wrote:

One time ive heard this type of 'buzz' sound was when the ram was not properly installed in my 386 and when powered it would make steady bursts of a "similar" Buzz kind of sound. But normally it Beeps just like other PCs.

Alright; It seems to be different case, since for me that is kind of beeps that games and other apps would make. You would recognize patterns like beep-based sound effects and music; It's just that the individual beeps themselves weren't square waves.

Basically, I wonder if someone has still got such a PC and can record the beeps, so their structure can be revealed.

VileRancour wrote:

What kind of PC was that? possibly it had some additional circuitry that modified the duty cycle/waveform, or the speaker was physically filtered somehow... though I can't really imagine a reason to do that.

Unfortunately, I can't remember a lot about it. It was from the beginning of the 90s, more or less, with some AMD processor (apparently at a level similar to the 386). On the very beginning it also didn't have any sound card. If it helps in any way (probably not), it could run games like Wolfenstein 3D with a sufficiently good framerate for the gameplay. Maybe not as smooth as 70fps, but enough to be worth playing.

Considering the circuit you've referenced to, unfortunately I have got a limited knowledge when it comes to circuits in general. Truly, I can try and make rough guesses, though.

It does make one wonder how would a speaker be physically filtered so it turns square waves into sawtooth(-like) waves. So it might make more sense that something is done on the hardware level, although it's just a guess.

Maybe the circuit can give a good guess about the way it worked in my case, though.

Reply 6 of 7, by MaxWar

User metadata
Rank Oldbie
Rank
Oldbie

Maybe it is possible the Speaker was damaged? Or maybe the signal was too strong for it and it sort of distorted?

Just ideas here.

FM sound card comparison on a Grand Scale!!
The Grand OPL3 Comparison Run.

Reply 7 of 7, by NY00123

User metadata
Rank Member
Rank
Member
MaxWar wrote:

Maybe it is possible the Speaker was damaged? Or maybe the signal was too strong for it and it sort of distorted?

Just ideas here.

I can't tell for both unfortunately. What is sure is that the distortions were quite consistent 😳
However, see point 2 of the following...

On a side note, I've had a few more tests. Let's begin with the more boring one...

1. These would be tests for replicating the kind of sound from that OGG file within DOSBox. It isn't yet there, though. On the DOSBox-technical side, the circuity mentioned earlier has given me an idea that I wonder why I haven't thought of doing... [It basically says: Multiply the desired wave length by a constant like 8, so you have the chance to emulate multiple sound sample levels per actual beep cycle.]

2. You may see a new OGG file attached to this post. (I *think* it shouldn't be too loud...) It is basically the same OGG as before, but with a high-pass filter applied. The cut-off frequency is relatively high if you wonder: 8000Hz (for what started as a 440Hz sawtooth wave).
While I haven't attempted to replicate *this* on DOSBox, if this is the way I heard the sound then it could be a sign of a physically malformed speaker 😳

Thanks again for the help!