Answers.Body: <p>The <a href="http://en.wikipedia.org/wiki/PC_speaker" rel="nofollow">classic PC Speaker</a> is a very simple system that was designed to be inexpensive and use off-the-shelf parts of the early 1980s.</p>
  
  <p>The core problem is that the PC speaker system consists of a cheap speaker, a timer, and digital pulses. Using this system, you can get quite a lot of interesting sounds out that weren't originally intended. But you are limited to square waves and the harmonic content that comes with them.</p>
  
  <blockquote>
    <p>I don't think there is any spec I can read about frequency response.</p>
  </blockquote>
  
  <p>The best you can find is specs for the timer and then run experiments with the actual hardware. The early IBM PCs had discrete timers, but at some point that functionality got rolled into the VLSI chipsets that PC makers used to build motherboards.</p>
  
  <p>If you have an actual audio chip built into the motherboard (fairly common, these days, much less common even in the late 1990s), then it is likely that the PC speaker functionality is emulated there. So the behavior will be different from the original hardware.</p>
  
  <p>Your integrated sound card should produce the most accurate sound. But at the upper end of the sound range, you may be limited by the physical capabilities of your laptop speakers. If you drive the speaker faster than it can move, then you won't get the sound you expect.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2013-03-07T06:33:01.183Z
Answers.Text: That was my surprise that I actually have a true pc speaker in a laptop. It's interesting to know wave form, I was wondering why sound is so ugly from the true pc speaker. FYI in linux there is an alsa emulation of real sound card via the true pc speaker- just load `snd-pcsp` kernel module. Although noisy it's still amazing.
Answers.UserDisplayName: akostadinov
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2013-03-07T06:46:55.007Z
Answers.Text: Back in the '80s, there was a file floating around that, when executed, would speak "help, somebody! I'm trapped inside this computer" through the PC speaker.
Answers.UserDisplayName: ObscureRobot
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2013-03-06T22:33:41.137Z
Answers.LastActivityDate: 2013-03-06T22:33:41.137Z
Answers.UserDisplayName: ObscureRobot
Answers.Body: <p>There isn't a good answer to this.  It depends on the quality of the speaker and the quality of the sound chipset that is sending the output to the speaker.  20khz is a typical estimate of average human hearing range, so I wouldn't be that surprised if the sound card is more accurate.  Generally they try to cover the range from 20hz to 20khz as the "typical human hearing range".  A lot can alter that such as age and any hearing loss, but it's a general rule.  It's also entirely possible for someone to be able to hear considerably past 20khz (22 to 23 isn't unheard of.)</p>
  
  <p>Really, neither is designed as a calibrated audio system, so they may both be off by a bit, but for a simple sine wave, the sound card is likely much better quality than a simple PC speaker.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2013-03-06T18:57:42.843Z
Answers.Text: I actually tried generating pure sine wave with audacity. It seems more accurate to me but I thing the built-in laptop speakers produce parasite lower frequency sound above 16KHz. I'll have to try with some quality headphones. I can only say that these high frequency sounds are not pleasant.
Answers.UserDisplayName: akostadinov
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2013-03-06T19:41:07.153Z
Answers.Text: Yeah, pure sine waves at high frequency are not pleasant.  We usually hear them as harmonics of lower frequencies in day to day life.
Answers.UserDisplayName: AJ Henderson
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2013-03-07T06:40:07.140Z
Answers.Text: Keep in mind that your built-in sound card probably generates audio at 44KHz. That means that a 22KHz sinewave will come out as a square wave. But it won't be *that* bad because your speaker can't move that fast, so it will be a somewhat rounded square wave. At 16KHz, you are still getting a much rougher approximation of a sine wave than you would at 1khz.
Answers.UserDisplayName: ObscureRobot
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2013-03-06T17:09:25.613Z
Answers.LastActivityDate: 2013-03-06T17:09:25.613Z
Answers.UserDisplayName: AJ Henderson
Body: <p>I was wondering how accurate frequencies do PC speakers produce. I'm talking about the old small things in computer that usually beep.</p>
  
  <p>I used the <code>beep</code> linux command to generate some frequencies. But I noticed something interesting. When I use the hardware PC speaker I stop hearing anything on 1700Hz. Actually I barely hear up to 16850Hz and I feel it more like a pain in the back part of my head.</p>
  
  <p>Emulating PC speaker with the integrated sound card and listening through the laptop speaker I hear up to 20KHz and it is nothing like a pain.</p>
  
  <p>So I am wondering if any of these two can be trusted for producing frequencies above 8Khz? I'm more inclined to trust the old PC speaker because I expect to hardly be able to hear such high frequencies. Not having experience with known correct equipment it is hard to judge though.</p>
  
  <p>P.S. I don't think there is any spec I can read about frequency response.</p>
  
Tags: <sampling-frequency>
Title: how accurate frequency does a PC speaker produce
UserDisplayName: akostadinov
ThreadText: # how accurate frequency does a PC speaker produce
  
  (Asked by: username_0 on 2013-03-06)
  
  I was wondering how accurate frequencies do PC speakers produce. I'm talking about the old small things in computer that usually beep.
  
  I used the `beep` linux command to generate some frequencies. But I noticed something interesting. When I use the hardware PC speaker I stop hearing anything on 1700Hz. Actually I barely hear up to 16850Hz and I feel it more like a pain in the back part of my head.
  
  Emulating PC speaker with the integrated sound card and listening through the laptop speaker I hear up to 20KHz and it is nothing like a pain.
  
  So I am wondering if any of these two can be trusted for producing frequencies above 8Khz? I'm more inclined to trust the old PC speaker because I expect to hardly be able to hear such high frequencies. Not having experience with known correct equipment it is hard to judge though.
  
  P.S. I don't think there is any spec I can read about frequency response.
  
  **Tags:** sampling-frequency
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2013-03-06. Score: 2 | Accepted answer
  
  The [classic PC Speaker](http://en.wikipedia.org/wiki/PC_speaker) is a very simple system that was designed to be inexpensive and use off-the-shelf parts of the early 1980s.
  
  The core problem is that the PC speaker system consists of a cheap speaker, a timer, and digital pulses. Using this system, you can get quite a lot of interesting sounds out that weren't originally intended. But you are limited to square waves and the harmonic content that comes with them.
  
  > I don't think there is any spec I can read about frequency response.
  
  The best you can find is specs for the timer and then run experiments with the actual hardware. The early IBM PCs had discrete timers, but at some point that functionality got rolled into the VLSI chipsets that PC makers used to build motherboards.
  
  If you have an actual audio chip built into the motherboard (fairly common, these days, much less common even in the late 1990s), then it is likely that the PC speaker functionality is emulated there. So the behavior will be different from the original hardware.
  
  Your integrated sound card should produce the most accurate sound. But at the upper end of the sound range, you may be limited by the physical capabilities of your laptop speakers. If you drive the speaker faster than it can move, then you won't get the sound you expect.
  
  > **Comments:**
  > **username_0**: That was my surprise that I actually have a true pc speaker in a laptop. It's interesting to know wave form, I was wondering why sound is so ugly from the true pc speaker. FYI in linux there is an alsa emulation of real sound card via the true pc speaker- just load `snd-pcsp` kernel module. Although noisy it's still amazing.  
  > **username_1**: Back in the '80s, there was a file floating around that, when executed, would speak "help, somebody! I'm trapped inside this computer" through the PC speaker.  
  
  ---
  
  ### Answer by username_2 on 2013-03-06. Score: 1
  
  There isn't a good answer to this. It depends on the quality of the speaker and the quality of the sound chipset that is sending the output to the speaker. 20khz is a typical estimate of average human hearing range, so I wouldn't be that surprised if the sound card is more accurate. Generally they try to cover the range from 20hz to 20khz as the "typical human hearing range". A lot can alter that such as age and any hearing loss, but it's a general rule. It's also entirely possible for someone to be able to hear considerably past 20khz (22 to 23 isn't unheard of.)
  
  Really, neither is designed as a calibrated audio system, so they may both be off by a bit, but for a simple sine wave, the sound card is likely much better quality than a simple PC speaker.
  
  > **Comments:**
  > **username_0**: I actually tried generating pure sine wave with audacity. It seems more accurate to me but I thing the built-in laptop speakers produce parasite lower frequency sound above 16KHz. I'll have to try with some quality headphones. I can only say that these high frequency sounds are not pleasant.  
  > **username_2**: Yeah, pure sine waves at high frequency are not pleasant.  We usually hear them as harmonics of lower frequencies in day to day life.  
  > **username_1**: Keep in mind that your built-in sound card probably generates audio at 44KHz. That means that a 22KHz sinewave will come out as a square wave. But it won't be *that* bad because your speaker can't move that fast, so it will be a somewhat rounded square wave. At 16KHz, you are still getting a much rougher approximation of a sine wave than you would at 1khz.  
  
  ---
  
  