## A MUSICAL APPROACH TO SPECTRUM ANALYSIS

### ...or look at the maths but listen to your ears

This document is not a white paper on DFT or a thesis on the physics of sound, merely a few practical examples to illustrate the problems associated with reading spectrum data.

Discrete Fourier Transform is a mathematical process which deconstructs a complex waveform into a series of simpler waveforms of specific amplitude and frequency. Ostensibly it may be used to determine what notes are present in a chord. However, effective analysis of what is essentially a bunch of numbers requires a lot of ancillary knowledge: the physics of sound, the nature and significance of overtones, the harmonic series, musical intervals, pitch perception, tuning.

Analysis using Fourier Transform techniques is made simple and musically useful by Andy Robinson's excellent Transcribe! software. The program translates the frequencies (numbers) into a graphic depiction of spikes aligned with notes on a piano keyboard.
Here is the audio spectrum for an E dominant seventh chord - E7

### What the ????

The frequencies represent a chord but our ears hear a single note!
The mathematics alone can not tell us what notes are being played.
To understand what spectrum analysis can tell us we should first examine the audio spectrum of a sound whose origin we already know.

The example above is an Electric Guitar's open 6th-string E2 - the first note of The Beatles' song Day Tripper. The distinctive twang is achieved by rolling off the bass frequencies, boosting the treble and compressing the signal. The E2 itself is filtered out yet our brain still perceives it as the note that was played.
This is the phenomenon of pitch perception.

Paul H. Erlich in MusicTheory@yahoogroups.com explains:
Pitch is a perception formed from many partials and corresponds to the best-fit fundamental for a harmonic series that would include those partials. Even if the fundamental is physically absent, and all the other partials are there, you hear only one pitch, and it corresponds with the frequency of the missing fundamental.
The spectrum is showing us the first six overtones of the harmonic series for the note E2 which resemble a dominant-seventh chord spread over two octaves:

 HARMONIC SERIES 1st-Harmonic 2nd 3rd 4th 5th 6th 7th INTERVAL fundamental octave fifth octave major-third fifth minor-seventh NOTE NAME E2 E3 B3 E4 G#4 B4 D5

Observe that the major-third and minor-seventh are slightly flat in comparison with equal temperament (else the spikes would appear exactly in the middle of the piano-key graphic).

Second sample demonstrates how the sound of the single note E2 is still heard when the low frequencies are filtered out completely - even though the spectrum now appears as a chord of G#dim.

The harmonic series extends well beyond the range of instruments to the limits of audible human hearing; thousands of individual frequencies of varying amplitude. As stated above the pitch perception phenomenon requires the bulk of these to be present in order that the best-fit fundamental be heard as a single pitch. In the next sample the high frequencies have been filtered leaving a notch around the harmonics displayed.

The guitar on Day Tripper was subjected to a long chain of processing: the tone controls on the guitar and amplifier, the microphone and mic-pre-amp, filtering and compression during recording and mixing, further EQ and compression in mastering. And then the sample was filtered for this demonstration. We may expect that strange things happen.

### Pure acoustics are surely more predictable...

The next example is an acoustic guitar recorded with no processing. The first part is the open 6th-string E2. Again we see very little fundamental and the familiar dominant-seventh harmonic series.
The second part is an E7-chord played as 022130. The lower notes in the spectrum correspond precisely with the voicing of the chord E2 B2 E3 G#3 D4 E4. We see virtually no B3 which is not being played because the 2nd-string is producing D4 at Fret-3.

However, we should see B3 as the 2nd-Harmonic of B2 and the 3rd-Harmonic of E2. The very loudest note is B4 which isn't being played at all. These relative amplitudes are affected by the point at which the string is picked and the location of the microphone - its position along the string-length and the distance from the sound-hole.

Also present are two D5's (out of tune with each other) a D#5 and an E5 which musically would sound very dissonant were it not for the fact that none of them are actually being played. D#5 is the 5th-Harmonic (Maj3) of B2 while the lower D5 is the 7th-Harmonic (min7) of E2 - observe that they are slightly flat.

Thankfully we cannot hear the cluster of spikes at F#6 which are variously the 18th‑Harmonic of E2, 12th‑H of B2, 9th‑H of E3, 7th‑H of G#3 and 5th‑H of D4

### What's it mean then?

From all of this we might conclude that the spectrum is not particularly useful since it displays frequencies corresponding to notes which are obviously not being played. Conversely, careful examination of these overtones can provide clues to the presence of the notes from which they are produced - in particular, identifying the slightly flat major-third and minor-seventh harmonics.

Another consideration is understanding how the sound changes over time especially in an ensemble. The Transcribe! software allows study of the spectrum in tiny fragments which can be stepped through time incrementally. Looping longer segments, varying the speed and shifting the sound into a higher register can exaggerate pitch changes and make lower frequencies more recognisable.

Remember to keep a musical head and listen or else it can end up horribly wrong