Plugin fun: An Introduction to Digital Audio (Part 1)
Introduction
This article is the first in a short series explaining the concepts of digital audio processing in software. The series will be backed up with the development of a VST plugin – a software component which works with audio and may be used with almost all digital audio processing software packages (called DAWs – or Digital Audio Workstations). As such it is generally aimed at software developers of any background, but should be of interest to anyone with a technical interest in the topics covered.
We’ll start with the basics – how sound and music is modelled and represented, digital audio concepts, what tools are available, and move on to specific useful topics including examples of types processing (including delay, reverb, chorus, filters, EQ, compression and spectrum analysis).
Starting with the second or third in the series, each article will be accompanied by a downloadable archive containing source code for a plugin, designed to be modified and experimented with in order to get some hands-on experience.
Models of Sound
Sound is simply the movement or vibration of air. We’ve all seen sound waves represented graphically, like this –


An entire sound can be represented entirely by a waveform or collection of waveforms, much like the one shown above. To reproduce the sound from the waveform, an object is made to move or vibrate in line with the changing of the waveform. Typically this is a speaker diaphragm moved by an electromagnet. Imagine tracing along the x axis at a constant speed, and looking at how the level of the wave varies. As the amplitude of the wave moves up, the speaker would move in one direction – and as it moves down, the speaker would move in the other direction.
The resulting changes in air pressure are propagated and move through the air, eventually causing vibrations which are detected within our ears.
Pitch and Loudness
Two of the fundamental properties of a sound as we hear it – pitch and loudness – we perceive based on the behaviour of the waveform as it moves through continuous cycles. The more cycles per second there are, the higher the frequency, and so the higher the pitch. Similarly, the higher the amplitude of the waveform is, the louder it will be.
Measuring Frequency
The frequency, or number of complete cycles per second, is measured in Hertz (Hz). Each musical note has a particular specific frequency - the standard ‘Concert Pitch’ reference for Middle A is 440Hz. For each octave (12 notes) higher the frequency is doubled. This means that the frequencies of musical notes are not equally spaced. In order to discover or convert between musical notes and frequencies, you can see http://www.phy.mtu.edu/~suits/notefreqs.html or use the following equation:

Where fn is the frequency of the note you are trying to obtain and n is the number of semitones away from Middle A the note is.
Measuring Loudness
Physically, sound is measured as a Sound Pressure Level (SPL), with the unit dB (decibel). The dB scale is a logarithmic one, so that the entire range of human hearing can be represented with meaningful values. This means that while the human pain threshold may be pressure levels literally millions of times louder than the quietest sounds we can hear, we can represent the difference between the same two amplitudes using a decibel figure of around 100dB.
It is very important to note that the dB is a relative unit. When we talk about a 10dB sound, it is implied that this is relative to the quietest sounds the human ear can perceive (which itself would be written as 0dB. In exact terms this is around 0.00002 Pascals).
It works out that for a change in about +3dB in volume, the amplitude of a signal will double. Relative to the human hearing threshold, some typical approximate values are:
| Quiet room | 15dB |
| Normal conversation | 50dB |
| Typical TV | 60dB |
| Major road traffic noise | 80dB |
| Hearing damage from long-term exposure | 85dB |
| Loud live music gig | 100dB |
| Hearing damage from short-term exposure | 120dB |
Summary
This concludes the first in the series! Next time - Digital Models of Sound (Digital Audio).
Labels: Digital Audio, Plugin