PC Speaker - Pulse-width Modulation

Pulse-width Modulation

The PC speaker is normally meant to reproduce a square wave via only 2 levels of output. However, by carefully timing a short pulse (i.e. going from one output level to the other and then back to the first), it is possible to drive the speaker to various output levels in between the two defined levels. This effectively allows the speaker to function as a crude DAC, thereby enabling approximate playback of PCM audio. This technique is called pulse-width modulation (PWM) and is notably used in class D audio amplifiers.

With the PC speaker, this method achieves limited quality playback; the quality depends on a trade-off between the PWM carrier frequency (effective sample rate) and the number of output levels (effective bitrate). The clock rate of the PC's programmable interval timer which drives the speaker is fixed at 1,193.18 kHz. This relatively low modulation frequency limits the resolution and produces poor but recognizable audio.

This use of the PC speaker became obsolete with the introduction of the Sound Blaster and other sound cards.

Read more about this topic:  PC Speaker

Famous quotes containing the word modulation:

    Every accent, every emphasis, every modulation of voice, was so perfectly well turned and well placed, that, without being interested in the subject, one could not help being pleased with the discourse; a pleasure of much the same kind with that received from an excellent piece of music. This is an advantage itinerant preachers have over those who are stationary, as the latter can not well improve their delivery of a sermon by so many rehearsals.
    Benjamin Franklin (1706–1790)