Dec 222017
Allows your PC speaker to talk. Turbo Pascal 4.0+ source. You need to make your own data files.
File TVSPKR.ZIP from The Programmer’s Corner in
Category Pascal Source Code
Allows your PC speaker to talk. Turbo Pascal 4.0+ source. You need to make your own data files.
File Name File Size Zip Size Zip Type
SPKR.DOC 1887 949 deflated
SPKR.EXE 7824 5468 deflated
SPKR.PAS 9741 3262 deflated

Download File TVSPKR.ZIP Here

Contents of the SPKR.DOC file

This program demonstrates a technique for playing digitized sound through
the speaker on faster 286's or 386's. This method employs pulse width
modulation at 16KHz to produce the equivalent of 6-bit resolution.
Basically, the system timer interrupt is taken over and speeded up
to 16KHz, rather than the normal 18.2 Hz. At each interrupt, the next
sound sample (scaled to a range of 0-72) is used as the duty cycle for
the speaker timer, i.e., the amount of time the output stays high between
interrupts. Low-pass filtering by the ear is mainly responsible for
reconstruction of the original signal. This technique is equivalent to
that being employed in "many times" over-sampling systems, where it is
cheaper to use very high speed 1-bit DACs and low pass filter the output,
rather than using costly high-resolution DACs at lower rates.

Sound input to the program is assumed to be in Turtle Beach SampleVision
format, though it would be fairly easy to substitute another source.
The program expects one command line parameter, which is the name of
the SampleVision file. Rate conversion to 16KHz is done assuming the
nearest 8KHz increment in the sampling range 8KHz to 48KHz.

There is currently a problem which has yet to be satisfactorily
resolved. Occasionally a high-pitched shrill will be heard over the
sound. This appears to related to the initialization sequence of the
programmable interval timer. In general, however, the sound quality
is very intelligible, especially for voice. Note that unless the
original signal is highly compressed, the low sound level of the pc
speaker will result in very soft output. In fact, pushing the sample
level beyond clipping may actually help in some cases. (Remember, this
is meant to be merely functional, not audiophile quality). Good Luck!

 December 22, 2017  Add comments

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>