Professional Documents
Culture Documents
Steve Harris+Joern Nettingsmeier-Audio Engineering
Steve Harris+Joern Nettingsmeier-Audio Engineering
Steve Harris+Joern Nettingsmeier-Audio Engineering
xml
1 of 57 06/02/2004 03:42 PM
file:///home/nettings/LAD-2004-AE/slides.xml
A word of warning
This talk is absolutely packed. We will flood you with information.
For two hours straight.
Except there’s the lunch break. :-D
And there will even be Maths.
Three things will help you survive:
We’ll start at the very beginning.
You will be able to ask questions after each section, and possibly get answers.
We’ll explain everything twice, first from the analog point of view (Jörn), then from
the digital (Steve).
Note: Another general-purpose q & a session is planned at the end, so if your question
does not relate to the current topic, please hold it until later.
2 of 57 06/02/2004 03:42 PM
file:///home/nettings/LAD-2004-AE/slides.xml
Sound waves
Sound is pressure waves travelling through a medium.
Sound waves consist of alternating high and low
pressure zones.
These zones oscillate in the direction of travel (a
longitudinal wave)
Sound waves travel through air at approx. 340
m/s (v0, depending on temperature and humidity.
The oscillating speed of sound is called the
frequency f, measured in cycles per second or
Hertz [Hz].
The combined length of one high- and one
low-pressure zone is called the wavelength λ .
We find:
λ=v 0 /f
Hearing
We detect sound with our ear-drums. Like a microphone diaphragm, they move along
with the pressure waves.
The softest sound humans can hear corresponds to an air pressure change of only
0.00002 Pa (Pascal). (The normal air pressure on earth is 102,300 Pa.)
The loudest sound we can endure has a pressure change of 200 Pa.
Our hearing range covers 10 orders of magnitude of intensity!
The audible frequency range reaches from from 20 Hz to 20 kHz. The upper bound
moves down with age.
We perceive frequency as pitch, in a logarithmic fashion: pitch intervals are
ratios of frequencies, not differences.
The range from a given frequency to twice that frequency is called an octave.
3 of 57 06/02/2004 03:42 PM
file:///home/nettings/LAD-2004-AE/slides.xml
Lp = 20 log p / p0
Lu = 20 log u / u0
4 of 57 06/02/2004 03:42 PM
file:///home/nettings/LAD-2004-AE/slides.xml
Analog Signals
The voltage changes with the speed and direction of the diaphragm movement.
Ideally, the signal is a perfect and complete representation of the sound.
Audio Signals
Audio signals can be visualized with an
oscilloscope.
It displays voltage U vs. time t.
This is called the time domain view.
The strength of the signal at any one time is called
amplitude and roughly corresponds to loudness.
Most audio signals are periodic - they follow a
repeating pattern.
One period is the section between three adjacent
zero crossings.
The signal’s frequency f (in Hertz) is the number
5 of 57 06/02/2004 03:42 PM
file:///home/nettings/LAD-2004-AE/slides.xml
6 of 57 06/02/2004 03:42 PM
file:///home/nettings/LAD-2004-AE/slides.xml
When electro-magnetic fields interfere with the cable, both hot and cold wires pick them
up the same way.
At the input stage, the cold signal is inverted again and added to the hot.
Since they are back in phase, they amplify each other.
7 of 57 06/02/2004 03:42 PM
file:///home/nettings/LAD-2004-AE/slides.xml
But the two halves of the noise are out-of-phase now - when added, they cancel out.
8 of 57 06/02/2004 03:42 PM
file:///home/nettings/LAD-2004-AE/slides.xml
9 of 57 06/02/2004 03:42 PM
file:///home/nettings/LAD-2004-AE/slides.xml
Analog signal stages will clip the signal if the amplitude is too high, producing distortion.
10 of 57 06/02/2004 03:42 PM
file:///home/nettings/LAD-2004-AE/slides.xml
A clipping stage can not follow the input signal, and flattens out the peaks of the wave.
The result now resembles a square wave.
Clipping generates new harmonics, which produce the typical distorted sound.
Both noise and clipping cannot be undone. Noise reduction and peak reconstruction are
lossy processes.
11 of 57 06/02/2004 03:42 PM
file:///home/nettings/LAD-2004-AE/slides.xml
Questions?
Digital Signals
12 of 57 06/02/2004 03:42 PM
file:///home/nettings/LAD-2004-AE/slides.xml
13 of 57 06/02/2004 03:42 PM
file:///home/nettings/LAD-2004-AE/slides.xml
Trying to PCM endode a signal at 21kHz that contains components obove 10.5kHz
14 of 57 06/02/2004 03:42 PM
file:///home/nettings/LAD-2004-AE/slides.xml
Anti-aliasing filters
The best thing to prevent aliasing would be a bricakwall lowpass filter:
15 of 57 06/02/2004 03:42 PM
file:///home/nettings/LAD-2004-AE/slides.xml
In practice you can’t get a response that good, but its the ideal
16 of 57 06/02/2004 03:42 PM
file:///home/nettings/LAD-2004-AE/slides.xml
Problems: aliasing
Even though the analogue signal will have been antialiased on the way in it is still
possible for aliasing to be created by processing
This can happen if some processing causes the frequency compenents to be shifted
below 0 or obove the Nyquist frequency
Or if the PCM data is treated as if it were continuous in synthesis:
If the signal is built up from sinewaves, all below the Nyquist freuency then the signal will
look a bit odd in PCM form, but will reconstruct to something that sounds like a saw wave
Quantisation
Quatisation is the approxiation of the level of the analogue signal to the most appropraite
digital representation, eg. a 4 bit (16 level) sample of an arbitrary signal is quantised as:
17 of 57 06/02/2004 03:42 PM
file:///home/nettings/LAD-2004-AE/slides.xml
18 of 57 06/02/2004 03:42 PM
file:///home/nettings/LAD-2004-AE/slides.xml
Interpolation
To reconstruct a discrete signal we can lowpass filter it with a brickwall lowpass filter, so
it makes sense we can do the same to interpolate
We can get a brickwall filter by replacing every impulse in the descrete signal with the
"sinc" function:
19 of 57 06/02/2004 03:42 PM
file:///home/nettings/LAD-2004-AE/slides.xml
20 of 57 06/02/2004 03:42 PM
file:///home/nettings/LAD-2004-AE/slides.xml
Dither
Dither is a way of masking the intermodulation distortion, a small ammount of noise is
added to the signal before its truncated
21 of 57 06/02/2004 03:42 PM
file:///home/nettings/LAD-2004-AE/slides.xml
This makes the signal noisier (hurts the SNR), but makes the intermodulation distortion
even whitenoise, unrelated to the source signal and so less anoying
Dither (2)
This is a 1k Hz sine wave at -40dB’s truncated to 8 bits, both undithered and dithered
The graph on the left shows the intermodulation distortion caused by the truncated,
undithered signal
The graph on the right shows the lack of distortion, but reduced signal to noise ratio
[undithered sine], [dithered sine]
22 of 57 06/02/2004 03:42 PM
file:///home/nettings/LAD-2004-AE/slides.xml
Triangular dithering
As the high frequencies are percieved less strongly by passing the noise through a
gentle high pass filter and amplifiying it so it has the same ammount of energy we can
still mask the distortion, but make the noise less "loud"
The peak noise is higher - but that peak is
around 20kHz where human hearing is not
very sensitive.
Around the crucial 1-4kHz mark the noise
23 of 57 06/02/2004 03:42 PM
file:///home/nettings/LAD-2004-AE/slides.xml
Questions?
24 of 57 06/02/2004 03:42 PM
file:///home/nettings/LAD-2004-AE/slides.xml
Mixing
Mixing audio is just the ∑ operation, i.e. +
So to mix signals x1[] and x2[] into y[] we simply do:
Every time you add a channel the theoretical peak value doubles (if the peaks of the two
signals are the same)
You can divide by the number of channels to guarantee no clipping, but then the volume
will appear to go down as the number of chanels increases
Gain
Amplifying/attenuating audio is just the ∏ operation, i.e. *
So to attenuate x[] by 20dB (-20dB gain) into y[] we simply do:
Gain is usally expressed in dB’s, relative to a gain of 1.0 (unity) so we can do:
25 of 57 06/02/2004 03:42 PM
file:///home/nettings/LAD-2004-AE/slides.xml
Pan
Pannning is apply gain to a/sum channels to make them appear to come from
somewhere between a set of speakers
The simple case is for a single channel to be
panned between two speakers
We want to maintain an equal power as the signal
pans between the speakers, to avoid the dead
spot if we do the naive thing of fading linearly
between 0 at one end and 1.0 at the other
Constant
power pan
however
try to
retain a
constant
power
aproximation (left^2 + right^2) to avoid the "dead
spot"
[linear pan], [constant power pan]
26 of 57 06/02/2004 03:42 PM
file:///home/nettings/LAD-2004-AE/slides.xml
Delay
Another fundamental operation on digital signals is delay
Memory and delay are the same thing
Simply storing samples and getting them back later
Phase shift
27 of 57 06/02/2004 03:42 PM
file:///home/nettings/LAD-2004-AE/slides.xml
Both can be manipulated by delay stages. Manipulating the first is purely creative (i.e. a
matter of taste), while the second is corrective and needs to be done precisely right.
28 of 57 06/02/2004 03:42 PM
file:///home/nettings/LAD-2004-AE/slides.xml
When correlated but misaligned signals are mixed, there will be interference. They can
be realigned with corrective delay.
Uncorrelated signals can always be mixed together without artifacts: we are free to use
creative delays as we please.
29 of 57 06/02/2004 03:42 PM
file:///home/nettings/LAD-2004-AE/slides.xml
All wavelengths in the signal that divide the distance between the microphones will
amplify, while those which leave a remainder of half the wavelength will cancel.
This is called the comb-filter effect. Comb-filtered signals sound hollow and are totally
immune to equalization.
It can be compensated by applying a corrective delay to
the leading signal.
To find the correct amount, do a rough calculation (time =
distance / speed of sound), start with that value and
fine-tune by ear until the sound is full and natural.
30 of 57 06/02/2004 03:42 PM
file:///home/nettings/LAD-2004-AE/slides.xml
Questions?
31 of 57 06/02/2004 03:42 PM
file:///home/nettings/LAD-2004-AE/slides.xml
32 of 57 06/02/2004 03:42 PM
file:///home/nettings/LAD-2004-AE/slides.xml
XC = 1 / (2 π f C)
33 of 57 06/02/2004 03:42 PM
file:///home/nettings/LAD-2004-AE/slides.xml
The capacitor blocks low frequencies, and lets high ones pass.
With an additional resistor acting as a voltage divider, we can build a simple high-pass
filter with a slope of 6dB per octave.
The cut-off frequency f0 (defined as the -3dB point) is
f0 = 1 / (2 π R C)
where G is the gain in dB, and Uout and Uin are proportional
to the resistances across in- and output:
XL = 2 π f L
34 of 57 06/02/2004 03:42 PM
file:///home/nettings/LAD-2004-AE/slides.xml
f0 = R / (2 π L)
with
35 of 57 06/02/2004 03:42 PM
file:///home/nettings/LAD-2004-AE/slides.xml
or peaking filters.
Since they can only remove energy, they are called passive filters.
By adding amplifiers, we can create active filters that allow boosting.
The filter properties can be improved by cascading filter circuits, and made tweakable by
using potentiometers instead of resistors.
36 of 57 06/02/2004 03:42 PM
file:///home/nettings/LAD-2004-AE/slides.xml
Filters
The most basic filter is simply a delay, mix and gain operation
All normal filters can be represented as a combination of delays, mixes and gains
37 of 57 06/02/2004 03:42 PM
file:///home/nettings/LAD-2004-AE/slides.xml
errors do not build up as much, but the bandpass filters must allign exactly, otherwise
there will always be peaks and/or throughs in the signal where the bands do not meet
exactly
Using an equalizer
0th Rule: Listen!
- Before you do anything else, walk up to the instrument or singer and listen quietly and
patiently. This is the ideal you want to recreate.
1st Rule: The best EQ is no EQ!
- Don’t try to compensate bad mic placement, cheap mikes or shabby room acoustics
with EQ.
2nd Rule: Down is good, up is evil!
- First try to listen for bands that need attenuation before boosting everything else.
3rd Rule: Sweep is your friend.
- If you have a semi-parametric filter, boost the gain and sweep through the available
range to get a feel for how all the frequencies sound.
4th Rule: Start with low Q.
- If you have a fully parametric filter, set it to a broad bandwidth, zero in on the problem
and then narrow the bell until the effect is lost, then back out a little.
38 of 57 06/02/2004 03:42 PM
file:///home/nettings/LAD-2004-AE/slides.xml
Questions?
39 of 57 06/02/2004 03:42 PM
file:///home/nettings/LAD-2004-AE/slides.xml
Controlling dynamics
(compressors/expanders)
40 of 57 06/02/2004 03:42 PM
file:///home/nettings/LAD-2004-AE/slides.xml
The current amount of compression can be monitored on the gain reduction meter.
41 of 57 06/02/2004 03:42 PM
file:///home/nettings/LAD-2004-AE/slides.xml
The envelope follower reads the signal level form either the side chain input or the main
input, feeds it to the gain control module (which does the ratio conversion) and uses that
to drive an amplifier on the main output
42 of 57 06/02/2004 03:42 PM
file:///home/nettings/LAD-2004-AE/slides.xml
(Some of these situations only call for gentle macrodynamics reduction and can be
43 of 57 06/02/2004 03:42 PM
file:///home/nettings/LAD-2004-AE/slides.xml
44 of 57 06/02/2004 03:42 PM
file:///home/nettings/LAD-2004-AE/slides.xml
Expansion
An expander works complementary to a compressor: it makes soft signals even quieter.
The most common use case for this is the noise gate: whenever the program material is
so quiet that the noise in the chain becomes audible, it can be reduced or completely
muted by the gate.
It is important to get the attack and release times right, or the gate will be
"stuttering" around its threshold.
Expanders can also be used to create the famous "In the Air Tonight" gated
reverb drum sound. Mix drums with way too much reverb, and cut off the reverberation
as soon as the drum sound has decayed.
Unfortunately, it is almost impossible to liven up material with an expander that has been
compressed to death.
45 of 57 06/02/2004 03:42 PM
file:///home/nettings/LAD-2004-AE/slides.xml
Questions?
46 of 57 06/02/2004 03:42 PM
file:///home/nettings/LAD-2004-AE/slides.xml
From an audio engineering POV, the first boils down to stereo (and surround)
techniques, and the second to reverberation.
Both aspects can be captured during recording, or they can be faked afterwards.
47 of 57 06/02/2004 03:42 PM
file:///home/nettings/LAD-2004-AE/slides.xml
48 of 57 06/02/2004 03:42 PM
file:///home/nettings/LAD-2004-AE/slides.xml
Distance information can in theory conveyed with only one source (monaural or
monophonic sound). But then everything seems to come from the same place, so this is
not very interesting.
To create or recreate an impression of direction and spatial sound, it is essential to have
at least two sources (binaural or stereophonic sound).
There are two basic stereo techniques: intensity stereo and phase stereo.
Things to keep in mind are mono compatibility and control of stereo width.
49 of 57 06/02/2004 03:42 PM
file:///home/nettings/LAD-2004-AE/slides.xml
50 of 57 06/02/2004 03:42 PM
file:///home/nettings/LAD-2004-AE/slides.xml
X = M + S, Y = M - S
The nice thing is you can control the width after the recording by changing the S level.
The crudest stereo technique is pan-pot stereo, achieved by panning close-miked or DI
mono sources. It needs artificial reverb to sound convincing.
51 of 57 06/02/2004 03:42 PM
file:///home/nettings/LAD-2004-AE/slides.xml
The delay lines (in reality there are more than 4) feed into allpass filters and then into a
multiplication matrix that mixes portions of the input signals into each output.
The delay line lengths and allpass filters need to be very carefully tuned to prevent
metalic or grainy sounds.
52 of 57 06/02/2004 03:42 PM
file:///home/nettings/LAD-2004-AE/slides.xml
This impulse response is used inplace of each sample in the source signal, just as for
sinc interpolation
53 of 57 06/02/2004 03:42 PM
file:///home/nettings/LAD-2004-AE/slides.xml
Some reverbs allow detailed configuration of the room dimensions, or to choose from
simulations of mechanical reverb generators (plate, spring). Some also let you tune the
levels of the early reflections and the reverb tail separately.
54 of 57 06/02/2004 03:42 PM
file:///home/nettings/LAD-2004-AE/slides.xml
55 of 57 06/02/2004 03:42 PM
file:///home/nettings/LAD-2004-AE/slides.xml
Thank you.
56 of 57 06/02/2004 03:42 PM
file:///home/nettings/LAD-2004-AE/slides.xml
Q&A
57 of 57 06/02/2004 03:42 PM