VOGONS

Common searches


The timbre of PC Speaker sound

Topic actions

First post, by SquallStrife

User metadata
Rank l33t
Rank
l33t

I'm gonna say it now. I don't like the way PC Speaker sound sounds from DOSBox.

I don't even like the way PC Speaker sounds coming from good headphones or speakers through the PC_SPK jack on sound cards.

I don't know how to describe the difference though. It's too.....crisp...maybe? Too....um....flat...perhaps? All I can tell you is that coming from a physical 8-ohm speaker, echoing around inside the case, somehow the sounds becomes fuller, or, something.

I think I might need to do some experimentation...

VogonsDrivers.com | Link | News Thread

Reply 1 of 22, by leileilol

User metadata
Rank l33t++
Rank
l33t++

Indeed. Gather a WAV sample of every PC speaker you can find and make them play back Do Re Mi with a studio microphone with no hard drives connected or fans spinning. Perhaps it's time for soundfonts of the PC speaker kind...

(and maybe early CD-ROM drives while we're at it 😁)

apsosig.png
long live PCem

Reply 2 of 22, by VileR

User metadata
Rank l33t
Rank
l33t

The "harshness" you hear is most likely the higher frequencies (harmonics) which would normally be somewhat attenuated when going from a physical PC speaker to your ears. Try a low-pass filter?

Or if you wanted to be *really* thorough, you could use a convolution reverb VST plugin, and sample the inside of an actual PC case as the "impulse-response" .wav... the same method used by guitar amp simulators to model the natural frequency response of speaker cabinets. :D

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

Reply 3 of 22, by Gemini000

User metadata
Rank l33t
Rank
l33t

TBH: I hate PC Speakers themselves because out of all the systems I've ever owned there was never a volume control... >_>;

The very first time I used DOSBox and discovered it playing back PC Speaker sound through my sound card, I pretty much never touched real DOS ever again! ;D

--- Kris Asick (Gemini)
--- Pixelmusement Website: www.pixelships.com
--- Ancient DOS Games Webshow: www.pixelships.com/adg

Reply 4 of 22, by carlostex

User metadata
Rank l33t
Rank
l33t
Gemini000 wrote:

The very first time I used DOSBox and discovered it playing back PC Speaker sound through my sound card, I pretty much never touched real DOS ever again! ;D

If you didn't like it you could always open the computer and unplug it. 😎

Reply 5 of 22, by SquallStrife

User metadata
Rank l33t
Rank
l33t

Or solder in a potentiometer, so you can control the volume!

Anyhow, this is the first comparison I've done. I know it's extremely un-scientific, but it illustrates what I'm trying to say, I think.

https://soundcloud.com/retroswim/pc-speaker-audio-comparison

The first sound is the raw capture from DOSBox. The next sound is the DOSBox capture played back through speakers, and recorded through a microphone.

The third sound is the sound coming from an actual PC speaker, recorded through a microphone.

You notice that coming from DOSBox, the effect loses that robotic buzz kind of sound, it just sounds like a falling square wave tone, whereas the original is far more nuanced.

VogonsDrivers.com | Link | News Thread

Reply 6 of 22, by carlostex

User metadata
Rank l33t
Rank
l33t
SquallStrife wrote:

Or solder in a potentiometer, so you can control the volume!

Even better!!!

Anyway there's no doubt the real thing is the best thing... Even though i don't like PC speaker recordings from DOSBox, i think that rerouting the signal via the PC_SPK sounds even worse. I also prefer to mike the PC Speaker, it captures its frequencies much better. I would also NOT center the mic with the speaker, but rather place it a little off axis, otherwise it's gonna be a festival of high frequencies and little more.

Reply 7 of 22, by VileR

User metadata
Rank l33t
Rank
l33t
SquallStrife wrote:

You notice that coming from DOSBox, the effect loses that robotic buzz kind of sound, it just sounds like a falling square wave tone, whereas the original is far more nuanced.

Try ykhwong's build (SVN-Daum) - it incorporates a patch for improved PC speaker emulation which isn't in mainline DOSBox yet. Attached is the raw capture using that build.

EDIT: also included is an EQ'd version with the high frequencies rolled off, to demonstrate what I was talking about in my previous post. The effect is rather drastic on purpose, but it should be closer to what you hear from a real speaker.

Attachments

  • Filename
    raw + EQd.zip
    File size
    79.98 KiB
    Downloads
    76 downloads
    File license
    Fair use/fair dealing exception

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

Reply 8 of 22, by Jepael

User metadata
Rank Oldbie
Rank
Oldbie

There is a big difference between real hardware and emulation, and the better the emulation, the more it will suck CPU horsepower to make it more accurate.

The timer that generates the square wave beeps runs at 1.19318 MHz ("sampling rate" if you prefer), not to mention how the mathematical square wave gets converted into analog sound from the speaker, echoing inside the case. It is not simple to reproduce that with a sound card running "only" at 48 kHz sampling rate. So one simulated sound sample contains about 24.8 speaker timer ticks.

The basic way of simulating this is to just calculate for each 48kHz output sample if the speaker bit is currently high or low and live with all the effects like phase jitter on output edges and the generated audio containing ideal steps that have infinite frequencies. Fast but not very high quality.

Mathematically the correct process would be to actually simulate the 1-bit 1.19318 MHz sound stream and resampling with low pass filtering that to 16-bit 48kHz. As that will suck CPU power way too much, it can be faked with band-limited step resposes (bleps).

Reply 9 of 22, by Mau1wurf1977

User metadata
Rank l33t++
Rank
l33t++

Anyone played F15 Strike Eagle II with the PC Speaker? Man that sound was LOUD and annoying.

My website with reviews, demos, drivers, tutorials and more...
My YouTube channel

Reply 11 of 22, by Mau1wurf1977

User metadata
Rank l33t++
Rank
l33t++
leileilol wrote:

How about F-117A? 😀

I never played that game. No idea, sorry.

My website with reviews, demos, drivers, tutorials and more...
My YouTube channel

Reply 12 of 22, by SquallStrife

User metadata
Rank l33t
Rank
l33t
VileRancour wrote:
SquallStrife wrote:

You notice that coming from DOSBox, the effect loses that robotic buzz kind of sound, it just sounds like a falling square wave tone, whereas the original is far more nuanced.

Try ykhwong's build (SVN-Daum) - it incorporates a patch for improved PC speaker emulation which isn't in mainline DOSBox yet. Attached is the raw capture using that build.

EDIT: also included is an EQ'd version with the high frequencies rolled off, to demonstrate what I was talking about in my previous post. The effect is rather drastic on purpose, but it should be closer to what you hear from a real speaker.

Yeah, that sounds a lot more like the real thing than mainline DOSBox, the EQ'd version even moreso. Thanks for sharing!

VogonsDrivers.com | Link | News Thread

Reply 15 of 22, by Jepael

User metadata
Rank Oldbie
Rank
Oldbie
bjt wrote:

If I wanted to add a volume control to my PC speaker output, what kind of potentiometer would I need?

Quite big one.

The other speaker leg should sit directly at +5V, while the other leg is driven by a open collector driver through some resistance. At some point the driver was just a discrete 3904 transistor with two 68 ohm resistors in parallel, or 34 ohms.

So basic rule is don't short the 5V to anywhere, and for safety try to put the potentiometre to the negative side, not to the 05V side. Directly shorting 5V over 34 ohms causes about 150mA to flow, so it would dissipate 0.75W in the poor SMD resistors.

OK, so assuming you have 34 ohms fixed resistance, and you have a fixed 8 ohm speaker there, and you are not having any short circuits, you are only ever heating the pot at 0.15 W max, if speaker is stuck to ON position and pot is stuck at 42 ohms.

I don't know if this is a job for linear or logarithmic pot, but at least 0.2W pot with say up to 1 kilo-ohms of resistance should work, maybe 100 ohms even. Best to try with different resistances first to approximate how low volume you want.

Reply 16 of 22, by jwt27

User metadata
Rank Oldbie
Rank
Oldbie
Jepael wrote:

I don't know if this is a job for linear or logarithmic pot, but at least 0.2W pot with say up to 1 kilo-ohms of resistance should work, maybe 100 ohms even. Best to try with different resistances first to approximate how low volume you want.

I made a PC speaker to line-out circuit two weeks ago. For the load resistor 100 ohms seemed to work best to get a 5V square wave out of it. Less resistance just dropped the voltage, any more turned it into a sawtooth. (however in the end I just went with an op-amp in open-loop, as a simple schmitt trigger)

So, as a volume control, I think a 100 ohm log pot would do fine.

Reply 17 of 22, by bjt

User metadata
Rank Oldbie
Rank
Oldbie

Thanks for the info. I think I will try this 😀

EDIT: Does this look OK? http://www.technologysupplies.co.uk/Wirewound … tiometer-100ohm

To confirm, the pot should be in series with the speaker, on the ground side?

Reply 18 of 22, by idspispopd

User metadata
Rank Oldbie
Rank
Oldbie
Gemini000 wrote:

TBH: I hate PC Speakers themselves because out of all the systems I've ever owned there was never a volume control... >_>;

We had one on our first PC (Amstrad PC1640 - PC6400 for the Americans). I missed that feature on all later PCs.

Reply 19 of 22, by sliderider

User metadata
Rank l33t++
Rank
l33t++
SquallStrife wrote:

I'm gonna say it now. I don't like the way PC Speaker sound sounds from DOSBox.

I don't like the way PC Speaker sound sounds when it comes from a PC Speaker. Thank heaven the Adlib people came along and took us away from all that horrible tinniness and crackle.