PCBUILD Archives

Personal Computer Hardware discussion List

PCBUILD@LISTSERV.ICORS.ORG

Options: Use Forum View

Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Leif Gregory <[log in to unmask]>
Reply To:
PCBUILD - PC Hardware discussion List <[log in to unmask]>
Date:
Sun, 26 Apr 1998 10:03:30 +0900
Content-Type:
text/plain
Parts/Attachments:
text/plain (274 lines)
Jim,

On Friday, 24 April 98, at 9:22:16 PM you wrote:
_________________________ Begin Quoted Text _________________________

> The letters refer to the model.
>     SB = Sound Blaster
>     AWE = Advanced Wave Effect

> The numbers indicate how many bits of data are in one sound byte.
> More bits mean more complex sounds.  Like the number of singers
> in a choir -- the more there are, the richer and fuller the sound is.

> Jim Meagher
> ==========
> Micro Solutions Consulting    Member of the HTML Writers Guild & the
> [log in to unmask]              International Web Masters Association
> ==========
_________________________  End Quoted Text  _________________________

  You got the first part right, but the latter is a common
  misconception. Below is the soundcard article from one of my
  newsletters. Hopefully it will answer the question.


1. Audio (MIDI/WAV/Soundcards)

Most people have a soundcard installed in their computer. It performs
two main functions, the first is to play MIDI (Musical Instrument
Digital Interface) music, and the other is to play digitized (sampled)
audio.

MIDI - You can think of MIDI music as a sheet of music, a page with
musical notes on it. There is no actual sound encoded in a MIDI file
(hence it's small size), because it's left up to your computer to play
the note with the "correct" instrument. Correct is in quotes, because
this may not always be the case. Think of it this way, a friend writes
a piece of music for the piano. He has a grand piano that he uses, and
the music he wrote sounds really great on it. Later on, he gives you a
photocopy of is sheet music which you take home to play on your baby
piano. The notes are the same, but it sounds quite a bit different.
Sound cards are like this too, but there are more reasons as to why
they sound differently.

This is where it's going to get confusing.. :)


There are two main categories of MIDI:

FM synthesis - Instrument sounds are created "on the fly" by
oscillators.

WaveTable - A ROM chip on the soundcard contains an actual recorded
sample of the real instrument. Most wavetable soundcards also come
with wavetable RAM, so you can load instrument samples from disk,
allowing you to specifically tailor the instrument compliments to the
piece you are writing/playing.

The downfall to this, is that anyone who tries to listen to your MIDI
file must have their soundcard loaded with the same instrument samples
you had, for it to sound the way you had intended. Short of including
them in the zipfile along with your MIDI, they will only be able to
approximate it. A little further on, I'm going to talk about how the
line between MIDI and digital audio is getting a little blurry.

There are different standards to MIDI:
Adlib
Roland GS
Roland MT32
Microsoft Sound System
EMU8000 -- 32 voices, wavetable
GM -- General MIDI, FM
MPU-401

The number you see in the name of your soundcard (Soundblaster 16,
Orchid Soundwave 32, Soundblaster AWE64 etc.) refers to the number of
simultaneous voices it can output. It does NOT refer to the bit
resolution as most people are led to believe. Before I get further,
let me define these terms. Voices refer to MIDI instruments (piano,
clarinet, flute etc.), and bit resolution (which is 16-bit (maximum)
for your everyday store bought sound card) refers to how well a signal
at any given time is "described" in amplitude. Sound cards use 16-bit
digital just like your CD player (whether it be the CD-ROM drive in
your computer, or the CD player in your stereo system.)

So your Metallica CD should sound just as good when played on your
computer as the stereo in your house right!!!? Well, not exactly.
There are a good number of differences. Let's hit the obvious first,
your speakers. Unless you're like me and have the line level outputs
from your soundcard going to a stereo receiver using non-computer
speakers, then your sound isn't going to be anything like your home
stereo system. Don't get me wrong here. Altec Lansing has come out
with some good speakers and subwoofer, as did Bose.. But NEITHER sound
like a set of Bose 901s or Infinity SM-155s.. But I'm getting off
track here.. Another problem is the DACs (Digital to Analog
Converters). They convert the 1's and 0's encoded on the CD and
convert them to analog voltages to be sent to your speakers. In a home
stereo system and very high end sound cards for professionals, the
DACs are very high quality (I know, I know, there are cheapy home
stereo systems out there with lousy DACs too, but I'm speaking
generally). The last major problem I'm going to include on this
subject is noise filtering. Your computer generates A LOT of noise
(I'm speaking about electrical noise, not necessarily audible until it
is processed by your soundcard circuitry). The power supply, hard
drives, CD-ROM, tape backup, processor cooling fan, ZIP drive
etc...All generate noise. Some of this bleeds over into the sound card
circuitry. That's why you should try to install your soundcard in the
slot farthest from all of these devices.

Ok, now what we just talked about above (CD audio, 16-bit etc..) falls
into the other set of categories pertaining to soundcard audio called
digital audio (Very first paragraph of this article.) This can be a
little bit confusing, so let me explain. ALL sound information in your
computer is digital. It will remain digital until it passes through
the DAC on it's way to the speakers. What I'm talking about when I say
digital is that it was stored as 1's and 0's prior to it's use in
producing sound. These include .WAV, .VOC, .AU, CD audio, wavetable
samples etc... What it doesn't include is FM (Frequency Modulation (I
am not going to explain FM any further than to say that it is an
analog waveform where the intelligence is encoded on the carrier by
way of varying the frequency of the carrier wave in relation to the
"intelligence" of the modulating signal. As opposed to AM (Amplitude
Modulation) where the intelligence is encoded by varying the amplitude
of the carrier wave in relation to the amplitude of the modulating
signal)). FM in your soundcard is produced by oscillators. This is
where the voices thing comes in (First line, two paragraphs up). The
number of oscillators dictates the number of simultaneous voices your
soundcard can output. Soundblaster AWE64 has 32 hardware voices
(oscillators), and 32 software voices (created by mixing frequencies
in software and not hardware). The Orchid Soundwave 32 as well as the
old 8-bit Soundblaster have 11 voices.

Alright, let's get into the good stuff. On the digital audio side,
there is another term that is very important to sound quality. It's
called sample rate. A waveform is analog right!!? So, to be stored as
1s and 0s on your computer it must be digitized. This is acomplished
through sampling. You've probably already seen numbers like 11KHz,
22KHz, 44.1KHz etc.. Well this refers to the sampling rate of the
signal. So what exactly is sampling?? Well, I'm glad you asked!
Sampling is a digital representation of an analog signal. Get ready,
I'm going to tie some stuff together here from previous paragraphs
(just didn't want you to miss it), a single sample is (drumroll
please) 16 bits. That means it uses 16 bits to "describe" the
waveform's amplitude at any one given instant. This is about the only
point where the soundcard audio is of the same "quality" as a CD. Now,
you put a bunch of these samples together at a regular interval, and
you have a sampling rate. Here's an analogy:


When you watch TV, you are viewing 30 Frames Per Second (fps). That
means every second you see 30 pictures (or snapshots if you will). For
the most part all the pictures are the same, but very small
differences are happening. A hand is moving, a racecar is coming down
the track, a bullet is shooting out of a gun etc.. They are all single
pictures put together end after end at a certain speed which the human
eye percieves as fluid motion. Now contrast this with older computer
generated videos (i.e AVI, MOV, but not DVD (DVD is 30fps)). Generally
they were recorded at 15 fps. Although this is fast enough to provide
a reasonable semblance of motion, it doesn't compare to the 30fps of
your TV. Just some nickel knowledge for you, motion picture movies
(the ones you see at a theater) are 24 fps. Now, this explains the
sampling rate. You must have enough samples occuring fast enough to
provide a good representation of the thing you are sampling. Just as
the video of a 15 fps AVI looks jerky, an analog audio signal of a
symphony recorded at 22KHz will also sound non-fluid. Some more nickel
knowledge, CDs are recorded at 44.1KHz, so 22KHz is half that. 30 fps
vs 15 fps, 44.1Khz vs 22KHz. So, what is the 16-bit sample providing
information wise? Amplitude! I was going to attempt an ASCII drawing,
but I don't think it would help. So if you really want to figure out
this sampling thing. Do this:

1. Take a piece of notebook paper (preferrably with lines).

2. Turn the paper clockwise 90 degrees.

3. Start somewhere torwards the middle of the sheet on the left.

4. Draw a sine wave. (If you have no idea what this is, look on your
   keyboard for a little squiggly horizontal line. It's generally
   above the tab key, to the left of # 1 key. When you draw the
   sinewave, go all the way to the top of the paper, all the way to
   the bottom, so that it totally covers the sheet of notebook paper
   (from left to right also).

5. Now, take a piece of tracing paper and place it over your sine
   wave.

6. The bottom edge of your paper is your starting reference for every
   sample line you draw.

7. If you've done everything correctly, your sinewave should be
   divided up by the vertical lines already on the notebook paper. If
   this is correct, then with your tracing paper in place put your
   pencil down on the intersection of the bottom of the paper and the
   vertical notebook paper lines.

8. Draw a line from there, up to where you intersect the sinewave.

9. Move to your right, to the next vertical line and repeat step 8.

10. Repeat step 9 until you have used all the vertical lines in your
    sinewave.

11. Now remove the tracing paper from the notebook paper and look at
    it.

12. You'll notice that on top of the lines you drew is a very good
    representation of the sinewave on the notebook paper (If this
    wasn't clear, imagine your sinewave sitting on top of the lines
    you drew.)

Easy huh... Now, there are about 30 lines on a piece of notebook
paper. Let's pretend that the whole piece of paper is one second, and
that your sinewave is 1Hz (Hz is a unit of measurement for frequency.
It is the number of times a complete cycle happens in one second. So
1Hz is one complete cycle per second.) Your sampling rate for the
example you did on paper is 30Hz (30 samples per second). The minimum
sampling rate to reproduce a signal is twice the waveform's frequency.
So do the example over, but only describe it with two samples. One at
the highest peak, and one at the lowest. Redo it with 4 samples, 8, 16
etc... See how the higher your sampling rate the better you can
represent a waveform. So a 30 Hz sampling rate for a 1Hz signal is
awesome. The problem with audio, is that the frequencies you are
dealing with are much higher.. 0 to 4KHz for just the human voice,
some instruments can obtain 20KHz, which is generally the limit,
frequency wise of the human ear. So think about it... CDs are recorded
at a sampling rate of 44.1Khz, some instruments are capable of 20Khz,
Taking our paper example we did with a sampling rate of twice the
waveform's frequency, you can see that this is not good. This is why
you get those hardcore audiophiles complaining of the lack of audio
quality in CDs at higher frequencies. Me personally, my ear isn't
anywhere near as discriminating, so CD quality sounds good to me. :)


Well, I probably forgot tons of stuff I should put in here, but this
thing is already too long and in- depth. I'll leave off here with just
some nickel knowledge stuff.

- 8 bit recording quality can discern 256 levels of amplitude (volume)
- 16 bit can discern 65,536 levels

Do these numbers look familiar??? They look vaguely like color depth
for graphics cards and RAM (such is life in the binary world of
computers?)

BTW if you missed the piece I did on graphics cards, get it by
clicking here. It's pretty in-depth, but not as much as this soundcard
article.

<mailto:[log in to unmask]>

- Telephone quality is 8KHz sampling (Human voice is 0 to 4KHz)
- DAT tapes sample at 48KHz
- Sampling rates are per channel. So a stereo signal sampled at 11KHz
  is actually 22KHz (11KHz per channel).

I didn't get into encoding and companding with different standards
like A-Law, U-Law, FFT etc.... Maybe I'll leave that for a compression
article.

- Which brings up a point, one minute of recorded sound at 16 bit,
  44.1KHz sampling would take up 10MB. WOW!!!

Ok, Ok I'm going to stop now... :)




Leif Gregory
<mailto:[log in to unmask]>

Virtual Book Of Knowledge mailing list
<mailto:[log in to unmask]>

ATOM RSS1 RSS2