Figure 1(a): The stretched string.
At the end of the last Synth Secrets, I promised that we would start looking at the synthesis of traditional instruments. And that's what we're going to do this month, starting with wind instruments. But don't imagine for a moment that I'm going to draw a couple of block diagrams, tell you to set this voltage-controlled wotsit to that value, and spoon-feed you a couple of simple synth patches. After all, if you understand the nature of a sound, you can make huge leaps forward in synthesizing it. This is true whether you are synthesizing orchestral instruments, human voices, or vibrating columns of air in pipes, which is essentially what wind instruments are. So with this in mind, let's turn our thoughts to oscillating bodies...
Of Strings & Pipes
Cast your mind back to the first part of this series (see SOS May '99 or www.soundonsound.com/sos/may99/articles/synthsec.htm). If you're old enough, you'll remember that we started all this by considering the nature of a stretched string fixed between two points, and why it prefers to vibrate at certain frequencies that we call 'harmonics'. Figure 1(a) shows such a string, oscillating at its fundamental mode of vibration. Just to remind you, Figures 1(b) and 1(c) show the second and third such modes of vibration.
Figure 1(b): The second mode of vibration of a stretched string.
Figure 1(c): The third mode of vibration of a stretched string.
Let's now consider the open rigid pipe shown in Figure 2. As the pipe isn't suspended in a vacuum, it has a column of air inside it. It might appear that the air can enter and exit without anything special happening; however, as you know from everyday experience, if you blow across the top of such a pipe, it will generate a pleasant note. You may therefore assume (correctly) that the air inside it is oscillating in such a way as to produce a harmonic series. But how?
Figure 2: Air moving through a pipe.
It's hard to explain in words, but the reason pipes produce a harmonic series is very similar to the reason why strings do. A string has to be fixed at both ends for harmonic motion to occur; this is called a boundary condition. The pipe has an analogous condition: the pressure of the atmosphere outside the pipe is, well, the pressure of the atmosphere. Therefore, the pressure at the precise ends of the pipe must also be the local atmospheric pressure, or else all the air would either rush out of, or into, the pipe itself.
Figure 3(a): The pressure of the initial pulse, and that of the reflected pulse in a simple pipe.
Figure 3(b) (above) and 3(c) (below): The second and third harmonics of an open pipe.
As you can see, this is a very similar diagram to Figure 1(a), representing the stretched string. Having read the first part of Synth Secrets, you shouldn't find it requires a great leap of understanding to realise that Figure 3(a) represents the fundamental frequency of the pipe. What's more, it's easy to see what the wavelength is... the pressure pulse must travel both down and back up the pipe to complete one cycle, so the wavelength of the fundamental is twice the length of the pipe.
So, for example, if the pipe is 0.34 metres in length, and given that the speed of sound is 340m per second, the pulse will travel down the pipe in a thousandth of a second (1mS). It will then pass back up, also in a thousandth of a second, so the period is 2mS, and the frequency of the fundamental is therefore 500Hz. Do these figures look familiar? They should, because they're identical to our example of a resonant body in part 22 of Synth Secrets.
There's another way in which a pipe is very much like a plucked string... provided that the boundary conditions are met, many different modes of vibration are possible within it. Figures 3(b) and 3(c) represent the second and third harmonics of the pipe. Again, the similarity to the stretched string is startling, and like the string, the pipe will support many such modes simultaneously. Indeed, since every harmonic is possible, we could even envisage situations where pipes produce sawtooth waves and many other complex tones.
Closing The Pipe
Despite all this, we have not reached the point where we can discuss pipes as musical instruments. This is because the oscillations within them have apart from a brief, hypothetical puff across one end of the pipe appeared as by magic, with no visible means of generating and sustaining the standing waves I have described. In other words, there is no realistic energising mechanism in this description. So now we must add a means to give energy to the column of air, and to sustain the standing wave within it.
This mechanism is you... or, rather, those people who can play a wind instrument. And the means by which they do so is by blowing into a mouthpiece. But if you are a total novice and try to do this, you will probably be unable to produce a pure note. What's more, you will find that your lips tingle after just a few seconds, and this can be a bit uncomfortable. The reason for is quite unexpected... you may believe that you are blowing a continuous stream of air down the pipe but, in fact, you're producing a stream of pressure pulses. Your lips are, therefore, acting as a valve, creating short pulses of high-pressure air, each followed by a lull before the next. If the timing of these pulses is appropriate to the length of the pipe (and therefore the wavelength, and therefore the fundamental frequency or a harmonic) you will produce a note. If not, a strangled fart is most likely to ensue. Good players control this timing by regulating the tension of their lips and the air pressure in their mouths. Bad players are unable to do this, and we've all heard the results of that.
Figure 4(a): The pressure in a blown pipe.
Figure 4(b) and 4(c): The second and third modes of vibration in a closed pipe.
Fortunately, it's not hard to understand the changed response of the pipe. If you look at Figure 4(a), you'll see that the boundary condition at the right-hand end is unchanged. The pipe is still open here, and the pressure differential (compared to the outside atmosphere) must still be zero. However, the closed end (ie. where you blow) is now a region of maximum pressure, and the fundamental waveform now appears as shown in Figure 4(a).
I should warn you that this is a crude way of describing a complex phenomenon, but it nonetheless suggests a very important consequence of blowing into a pipe. Whereas the air only needed to flow down and back up the pipe once to complete a cycle in an open pipe, it needs to complete the round trip twice in a closed pipe. This means that the wavelength of the fundamental is now four times the length of the pipe, rather than double! The musical consequence of this is obvious: the closed pipe produces a note one octave lower than you would otherwise expect. Given our 34cm pipe, the wavelength is now 136cm (instead of 68cm as before), so the fundamental lies at 250Hz rather than 500Hz.
You might ask whether there are any other changes caused by closing one end of the pipe, and you would be wise to do so. Let's look at the second and third modes of vibration, just as we did for the open pipe in figures 3(b) and 3(c).
By studying figures 4(b) and 4(c) you'll see that, in 4(b), one length of the pipe holds three-quarters of a full wavelength. For the next mode, shown in 4(c), one length of the pipe contains 5/4 (ie. one and a quarter) wavelengths. This means that the wavelength at 2/4ths, 4/4ths, 6/4ths (and so on) are missing in a closed pipe. In other words, unlike an open pipe, a closed pipe produces only odd harmonics!
The Characteristics Of Wind Instruments
OK, that's enough theory for the moment. Let's now ask ourselves how we can use this knowledge to understand and synthesize monophonic wind instruments.
Figure 5: The recorder.
Now let's move on to a more complex instrument, the clarinet. Ignoring for the moment the holes along its length and the small 'bell' at its end, this is another cylindrical tube. However, instead of having an edge to cut the air and set up the vibrations, it uses a single reed that acts in the same fashion as the 'lip valve' I described above. Since it is, therefore, a closed pipe, we might expect it to produce a waveform that contains only odd harmonics, and whose lowest note has a fundamental wavelength of four times the length of the instrument. And we would be right. The clarinet has a very distinctive 'hollow' sound which, on a synthesizer, we associate with square waves... the only common synthesizer waveform that contains just odd harmonics.
Figures 6 (above) and 7 (below): Two very different waveforms derived from the same 10 harmonics.
Now let's turn our attention to the brass family... instruments such as bugles, cornets, trumpets, trombones, and tubas. These are 'lip-valve' closed pipes, so we might expect them to act and sound like the clarinet, producing odd harmonics only, and having a characteristic 'hollow' timbre. But experience tells us that these instruments are very brash, and that the square wave is quite unsuitable for synthesizing them. Indeed, if ever there was a family of sounds that demanded the use of the sawtooth wave, this is it. So what's gone wrong with our analysis?
The answer is to be found in the bore of the instrument. The recorder and the clarinet are cylindrical pipes, whereas much of the bore of a brass instrument is conical. Does this make a difference? You bet it does... Apart from the open pipe, there are two shapes of bore that generate the complete harmonic series. One is the cone, and the other is the flare a geometric shape in which the radius of the bore increases by a constant factor for each doubling of the length of the pipe.
More About Harmonics
Of the three instruments described, only the clarinet acts like a closed pipe. This suggests that the recorder and the trumpet both of which produce the full harmonic series should sound dissimilar to the clarinet, but quite similar to each other. In practice, experience tells us that this is far from true, so how can we further differentiate between them?
Figure 8: The harmonic structures of the same note played quietly and loudly on the same instrument.
So it's not enough to know just the number and type of harmonics present in a sound, we also need to know the relative strengths if we are to analyse and recreate the correct timbre. To illustrate this, I've drawn Figure 8, which shows the relative strengths of the first 20 harmonics of the same note played both quietly and loudly on the same brass instrument. You can learn a lot from this diagram. For example, the fundamental is the dominant harmonic of the quiet note, so you hear this as the perceived note. In contrast, the eighth harmonic is dominant in the over-blown note; you would hear this as a squawk three octaves higher than the fundamental. Also, the quiet note contains just six harmonics, making it 'soft', whereas the loud note includes significant amplitudes of at least 15 harmonics so, quite ignoring the additional loudness of the note, the sound is brighter.
Figure 9: The harmonic structures of a low-pitched note and a high-pitched note played with the same amplitude.
Other Components Of The Sound
By this point, you must be getting pretty tired of all this talk of harmonic structures. But ask yourself this: when you choose an oscillator waveform on a synth, the type of filter and its cutoff frequency, the amount of filter resonance, and the nature of any contour generators or modulators applied to the cutoff and resonance... what are you really doing? The answer is... you're determining the harmonic content of the sound you're synthesizing. So let's end this month by considering some of the factors we need to consider when we synthesize a trumpet (see Figure 10).
Figure 10: Synthesizing some of the fundamental characteristics of a trumpet.
Secondly, we know that, as the note gets louder, it contains more harmonics, so we must set up a low-pass filter whose cutoff frequency rises and falls as the loudness of the note increases and decreases, respectively.
Thirdly, we know that the relative amplitude of the lower harmonics decrease as the note gets louder. This means that we must introduce filter resonance (or some other form of EQ) that emphasises higher harmonics as the loudness of the note increases.
Fourthly, we know that a high note has fewer harmonics than a low note, so we must set up our filter tracking such that, as the pitch rises, the cutoff frequency rises more slowly, thus tapering the harmonic series.
If we do all of this, we have a chance of creating a tone that is reminiscent of the trumpet we are trying to emulate. Sure, we've yet to consider the transient response at the start of the note, or any changes in amplitude and brightness that occur as we sustain and release the note. Furthermore, we've ignored all forms of modulation and expression, as well as the formants of the real instrument. But this is not a problem. We can and will do these things...