Sound Hardware
Written by Harry Fairhead   
Thursday, 05 January 2023
Article Index
Sound Hardware
Programming sound

The original PC could just about manage to make a rasping sort of “beep”, but today’s machines are expected to make any noise you care to think of and sound like a hi-fi or even better. We’ve come a long way since the tiny internal loudspeaker used to make the beeps – it's still in there, but rarely used.

The original PC was very primitive by today’s standards and IBM didn’t think that users even wanted graphics, let alone sound. All this changed when Creative Labs launched the SoundBlaster card in 1989.

There were sound add-ons before this but this one was the first to offer the right range of features and at a price to establish itself as a de facto standard. If you wanted a sound card it had to be a SoundBlaster and this is the single product that made Creative Labs into a well-known company.

What is really surprising about the very first sound card is that it was so sophisticated. Given that it was just replacing the most primitive of sound hardware imaginable it could have offered much less and still been considered a reasonable upgrade. Instead the features that you consider as desirable in a modern sound card were present in the very first unit sold.

So what was so special about the SoundBlaster?

Put simply it provided everything you needed to input and create sounds. It had a Digital to Analog Converter (DAC) which in principle promised to allow a PC to make any sound it care to compute but the real breakthrough was a multichannel FM synthesis chip.

Using FM synthesis you could create a reasonable imitation of almost any musical instrument – without putting a heavy load on the CPU.

If you recall how feeble the processors of the time were you can see that this was an important advantage. It allowed games programs to play impressive multi-instrument music and still have processing power left over to make explosion noises and animate the space ship! The difference between the DAC and the FM approach still exists today but these days its mainly a software distinction – i.e. MIDI versus Wave files and this is something that we will look at in more detail.

The DAC Approach

A DAC takes a stream of numbers that the software sends to it and converts them into voltages proportional to each number.

As long as the machine can send the data to the DAC fast enough, the resulting signal can recreate any sound. The problem here is that you need to know how to create a stream of numbers that sounds like what you want to hear.

For example what stream of numbers do you send to a DAC to make the sound of a guitar string or a human voice? In practice software only creates sounds from scratch using a DAC when they are very simple or have a property that makes them easy to program.

For example a zap gun sound is just a rising tone and an explosion is mostly random noise plus some low frequency components. In most cases these program-generated noises don’t really sound like anything in the real world but this usually doesn’t matter.

Where a DAC really comes into its own is in combination with an Analog to Digital Converter (ADC) which was also included on the first SoundBlaster cards. An ADC takes an input signal and coverts it to a stream of numbers. If you take a sound, put it through a microphone to convert it to a voltage signal and then put it into an ADC you have a stream of numbers which when fed to a DAC will produce the same sound as when fed to a loudspeaker. You can think of the ADC as the recorder and the DAC as the playback. Of course the stream of numbers can be stored on disk in a file to be played back later. This is what a “wave” file is and it’s the most basic way that your PC can record and playback sound.

 ADCDAC

 

The only complications in this very simple picture relate to practical issues of quality and the amount of space needed to store a sound on disk. The number of samples, i.e. measurements, of the audio waveform taken per second determines the playback quality. Generally speaking 8KHz (i.e. 8000 samples per second) is telephone quality sound and anything in the region of 20KHz sampling produces CD quality sound. Of course, there is the basic difference between mono and stereo and a stereo wave file is going to be twice as big as a mono file because it records sound from a left and right channel.

Rather than simply record the data to disk “as it comes” it makes sense to apply data compression techniques in an attempt to reduce the disk space needed to store it. The best known of these compressed formats is MP3, which achieves amazing compression ratios without losing the quality needed to listen to music. MP3 is an important technology but it’s just another compression format.

Until quite recently another hardware restriction on sound cards was that they weren’t capable of full duplex sound processing. For reasons of cost and complexity sound cards could either record, i.e. use their ADC, or playback, i.e. use their DAC, but not both at the same time.

This wasn’t a huge problem until applications such as Internet Telephony came along and made two-way sound important. Today most sound hardware is “full duplex” and can walk and chew gum at same time – but it is worth checking!

MIDI

The DAC/ADC combination is perfect for recording sound, playing sounds back over the Internet or for sound effects within games or other software.

It’s not so good if what you want to do is put a musical sound track to a game or for that matter if you want to use your PC as a synthesizer. The solution to this particular problem was initially to incorporate an FM Synthesizer chip on the sound card.

Before the SoundBlaster the only place that you would find such a chip was in an electronic keyboard. An FM chip is quite different to a DAC in that it can only produce a predefined set of sounds. This makes using it a completely different proposition to using a DAC. Instead of sending it a stream of numbers that define the shape of the sound waveform to be produced, an FM chip needs to be sent a stream of commands telling it what notes to play, for how long and how loud and which instrument to mimic.

The original SoundBlaster could play chords and mimic more than one instrument at a time and so it was able to produce very complex music for the time. Given that a single command to play a note could generate a few seconds or more of sound you can also see that not much data is needed to generate sound. On the other hand there is no equivalent of an ADC to make it easy to record music.

fm

You can send wave data to the DAC or commands to play particular notes on the FM Synth



Last Updated ( Sunday, 08 January 2023 )