You are here

Synthesizing Simple Flutes

Synth Secrets
Published September 2003
By Gordon Reid

The Monty Python team once famously claimed that being able to play the flute was a simple matter of 'blowing here, and moving your hands up and down here'. But there's a lot more to it than that...

Synthesizing Simple Flutes header artwork montage.Last month I discussed the sound of the pan flute, leaving you with a diagram that showed how you could use a large modular synth to create a remarkably accurate simulation of the instrument. Successful though it was, the patch was a monster, and not one you could create on any basic (read... easily affordable) synth. This month, we'll look at another of the flute family, and see whether we can synthesize it using something rather simpler.

But first, I want to take a look at the Japanese Shakuhachi. Made from a single piece of bamboo, this is another instrument that requires you to blow over an aperture, but it differs from its more primitive cousin in three ways.

Firstly, you excite the air by blowing over a sharp edge at the mouth of the pipe. If you consider Figure 1 (below) you can see an instance when a jet of air blown against such an edge is deflected downward. At that moment, the part of the stream shown in orange is moving minutely faster than that shown in red, so the air pressure on the flow tends to press it upward. This is the principle that keeps aeroplanes in the sky: air moving faster over the top surface of the wing generates less pressure than that moving more slowly along the shorter underside. The net effect is therefore an upward pressure that lifts the machine off the ground.Figure 1: The pressure exerted when air passes under a sharp edge placed in the stream.Figure 1: The pressure exerted when air passes under a sharp edge placed in the stream.

If the upward pressure in Figure 1 is sustained for a fraction of a second, the jet is pushed upward, and we soon reach the situation shown in Figure 2. Now, the net atmospheric pressure is downward, and we quickly move back to the situation shown in the first diagram.

Figure 2: The pressure exerted when air passes over a sharp edge placed in the stream.Figure 2: The pressure exerted when air passes over a sharp edge placed in the stream.If the edge is connected to a pipe of some sort, it doesn't take much of a leap to realise that, at some frequency, the up/down vibration of the airflow will match the pipe's resonant frequency, and a standing wave will result, generating a sustained note. It turns out that the speed of up/down oscillation is roughly proportional to the speed of the air stream (ie. how hard you blow), which explains why, when you blow harder into an instrument of the flute family, the note jumps from the fundamental to the second harmonic, and then the third, and the fourth... and so on, as the increasingly rapid up/down motion excites higher modes of oscillation in the pipe.

Figure 3: Blowing a note on the Shakuhachi with all holes closed.Figure 3: Blowing a note on the Shakuhachi with all holes closed.The second difference between the pan flute and the Shakuhachi is that the latter is open at the bottom. Therefore, as explained in part 24 of this series (see SOS April 2001), the standing wave within it contains both odd and even harmonics. Indeed, all the instruments of the flute family are 'open' if they have holes, so the pan flute proves to be an oddity... it's the only flute that generates no even harmonics (this is not strictly true, although it is true for orchestral flutes. There is a class of organ pipes called stopped flutes that are closed at the top using wooden plugs. These generate the odd-harmonic series discussed last month, and offer a significant advantage to the organ builder; for any given pitch, they need only be half the length of their open brethren. Given that the longest open pipes are typically 32' long, this means that an organ with stopped 16' pipes can produce the same, deep pitches as larger instruments).

Figure 4: Blowing a note on the Shakuhachi with all but the lowest hole closed.Figure 4: Blowing a note on the Shakuhachi with all but the lowest hole closed.Thirdly, the Shakuhachi has holes. All the pipes we have considered before — whether open at one end or both, whether cylindrical or conical, and whether made from wood or brass — have boasted continuous bores. Even the valves on instruments such as the trumpet do not change this: they alter the length of the pipe, but they don't allow air to escape before the end is reached. Sure, there have been all sorts of complications such as end effects and harmonic stretching, but when it comes down to it, open pipes of a given length have always had a fundamental frequency of a certain pitch, (or an octave lower if you consider their closed brethren).

Figure 5: Blowing a note on the Shakuhachi with all but the lowest two holes closed.Figure 5: Blowing a note on the Shakuhachi with all but the lowest two holes closed.The holes complicate matters considerably, but for now we'll consider them simply to be ways of shortening or extending the effective length of the pipe. If you look at Figure 3 (above), you can see that, with all holes closed, the Shakuhachi produces the pitch associated with its entire length. But when you open the bottom hole (as shown in Figure 4), the effective length becomes shorter, a standing wave of shorter wavelength is generated, and a higher pitched note is produced.

Figure 5 (right) then shows what happens when you open the next hole... and so on. Given that the Shakuhachi has five holes — the four that you can see in these diagrams, plus a thumbhole that you cannot — it's not surprising that the instrument is ideal for playing the pentatonic scale that characterises traditional Japanese music.

The Recorder

In the western world, the most common flute with holes is probably the recorder (see Figure 6, right). There are many members of this branch of the family, some with cylindrical bores and some with a combination of cylindrical and truncated conical bores, but all excite the air by passing it over a sharp edge, as shown in Figures 1 and 2.

Figure 6: The recorder.Figure 6: The recorder.The shape of the recorders' bore is no accident. A few pages of physics (which, thankfully, we will not reproduce here) show that, if you want to play chromatic music over more than one octave using pipes with holes in the side, only cylinders and conical sections will work correctly. But if the recorder shares with most brass instruments its truncated conical bore and full harmonic series, why doesn't it sound like a trumpet? Clearly, the different excitation methods — lip valve versus edge — must have an effect, and it's no surprise that the recorder lacks the 'parp' of the brass instruments. But perhaps more significant is the fact that the air inside the recorder is excited at its widest point, and the bore then tapers towards the end, whereas you excite a brass instrument at its narrowest point, and the air column then flares towards the end. What's more, brass instruments have a horn that stretches the frequencies of the harmonic series considerably, and recorders do not.

All recorders share the same fingering system: six primary holes, a thumbhole underneath the pipe, and an additional 'little finger' hole at the far end. You might think that this would restrict the number of pitches available, but it turns out that every semitone is available, although the tuning is stretched by more than a semitone from the lowest note to the highest. Fortunately, it is possible for the player to correct this (or at least reduce its effect) by blowing low notes more strongly that high ones.

Figure 7: Playing a low 'C' on the recorder.Figure 7: Playing a low 'C' on the recorder.If you have played a recorder (and who, in an English primary school, ever escaped?) you will know that there can be numerous ways to finger a given note. But if this is true, the holes are not the simple features that we just discussed. Consider Figures 7 to 9 (below), which, for convenience, ignore the conical section within the instrument. These show three notes as played on the common descant recorder. The first diagram shows the instrument with all holes closed, playing the lowest pitch that it can produce. In this case, it's a low 'C'.

Figure 8: Playing a low 'D'.Figure 8: Playing a low 'D'.The next diagram (Figure 8) shows the same recorder with the lowest hole (ie. the one furthest from the mouthpiece) open. Like the Shakuhachi, this has the effect of shortening the pipe, resulting in the instrument playing a pitch somewhat higher than that in Figure 7. In fact, the note is a 'D'.

But what's happened to 'C#'? Clearly, you cannot play all 12 semitones on an instrument with just eight holes simply by lifting your fingers progressively toward the mouthpiece. Nonetheless, the recorder is capable of reproducing the complete scale. The reasons for this lie in some more physics that we'll skip, but which shows that it is not just the position of the holes that change the effective length of pipe; it's also the size of the holes and the amount by which each is covered. The hidden 'C#' is therefore revealed if you 'half-hole' the lowest hole.

Figure 9: A German recorder's fingering for a low 'F'.Figure 9: A German recorder's fingering for a low 'F'.Next, we come to Figure 9, which shows the instrument with three holes open. You might expect this to produce an 'F', which it does, if you are playing the 'German' recorder shown in Figure 6. If your instrument is based on the different, so-called Baroque style of recorder, with a different arrangement of large and small holes, the correct fingering is as shown in Figure 10 (below), with the third hole open, but the bottom two closed again. Playing the Baroque 'F' on the German instrument produces a dull 'E'.

Figure 10: The Baroque recorder's fingering for a low 'F'.Figure 10: The Baroque recorder's fingering for a low 'F'.This is a very strange result, but it illustrates an important fact: strictly speaking, opening a hole does not 'shorten' the pipe. It acts more like a valve or 'short-circuit' to the outside atmosphere, creating reflections and modifying the wave within the bore. You can have many of these 'short-circuits' along the length of the pipe, and it is their combination and interaction that determine the wavelength and, therefore, the pitch of the note.

Figure 11: A typical recorder spectrum.Figure 11: A typical recorder spectrum.If we want to pursue this discussion further, it becomes a bit intense, but the outcome is that there are many ways to combine blowing pressure, aperture size, and closed/open holes to obtain similar pitches on a recorder. Some of these pitches will lie almost exactly on a desired note, while some will be a little sharp, and others will be a little flat. Furthermore, the tonality will differ from one fingering to another, so a skilled player will pick the right fingering according to the demands of the music.

This multiplicity of almost identical notes leads to a significant problem for the synthesizer programmer; a simple VCO/VCF/VCA patch will never capture the nuances of the instrument. Indeed, this problem is not limited just to the recorder. Many basic wind instruments such as penny whistles, crumhorns, kortholts, rauschpfiefen and cornemuses require alternative fingerings if they are to play a wide range of music. What do you mean, you've no intention of synthesizing crumhorns, kortholts, rauschpfiefen and cornemuses? Oh well...

A Recorder Patch (Take I)

Figure 12 (a): sawtooth wave spectra.Figure 12 (a): sawtooth wave spectra.If you trawl through the patchbooks of history, you'll find that almost no synths offer a 'factory' recorder patch. I checked the books supplied with the ARP Odyssey, ARP Axxe, Roland SH101, Korg 700, 700S, 800DV and MS20, and found... nothing. There may be a simple reason for this — that few programmers in the 1970s found the instrument to be very interesting — but I suspect that the true reason is more basic: that it's very difficult to program a convincing recorder patch. Indeed, it's even more difficult than it was to recreate the sound of the pan flute last month.

Figure 12 (b): square wave spectra.Figure 12 (b): square wave spectra.Contrary to most peoples' expectations, the recorder can produce a huge range of timbres, ranging from warm to harsh, from gentle to glassy to brash. Many factors affect this, including the precise size and shape of the bore, the material from which the instrument is constructed, and the quality of the various parts. Some are more suited to solo use, while others work well in ensembles. Nonetheless, I'm not going to wheel out an enormous modular synth to attempt to obtain near-perfection. Instead, I'm going to take the opposite approach, and see whether we can create a reasonable imitation on a much simpler synthesizer.

Figure 12 (c): triangle wave spectrum.Figure 12 (c): triangle wave spectrum.Let's start by considering the spectrum of a note produced by a typical, modern, wooden recorder (see Figure 11, above). Omitting from the diagram the strong noise component, this has a dominant fundamental, with a handful of weak overtones. Given that odd and even harmonics are present, we might consider basing our patch on a sawtooth wave, filtering it to attenuate the overtones as shown. But if you try this, you'll find that it doesn't sound right, perhaps because the recorder's second harmonic is so weak. So perhaps a square wave or even a triangle wave (see Figures 12a, 12b and 12c) might sound more appropriate.

Figure 13: The recorder patch: Minimoog VCOs.Figure 13: The recorder patch: Minimoog VCOs.In truth, however, none of these sounds right, partly because the spectrum has the wrong shape, and partly because — as we have encountered many times before — the higher harmonics are 'stretched' sharp of their mathematical ideal. Ignoring this stretching (because there's nothing we can do about it) and concentrating on the spectral shape alone, we might get a little closer by summing two oscillators tuned an octave apart. Unfortunately, analogue synths are not stable enough for this to work, and no matter how carefully you adjust the pitches, you'll obtain an inappropriate chorusing of the sound. Digital, additive synthesis would perform better, but that is outside the scope of this month's article. So where do we go from here?

Figure 14: The recorder patch: Minimoog VCF.Figure 14: The recorder patch: Minimoog VCF.The only analogue synth that I could find which offers a 'factory' recorder patch is the Minimoog, whose programmer, Tom Rhea, based his sound on the oscillator section that I've reproduced as Figure 13 (above, right). As you can see, Rhea decided that a low-amplitude triangle waveform gave him the closest approximation to the sound he wanted, with just a smidgen of white noise added in the Mixer.

The output from the Mixer passes next to the filter, as shown in Figure 14. Note how this is closed until affected by the rapid Attack of the Contour, and that there is a fair mount of Emphasis applied. The uppermost of the three switches is on, so this is where Oscillator 3's output is directed, producing brightness modulation rather than vibrato (if you programme VCO pitch modulation in a recorder patch, it sounds wrong).

Figure 15: The recorder patch: Minimoog VCA.Figure 15: The recorder patch: Minimoog VCA.Figure 15 (above) shows the amplitude (VCA) contour. The Attack time is rather slower than that of the filter contour, meaning that the brightness of the sound peaks more quickly than the loudness. This relationship is an interesting one, so I have shown it in exaggerated form in Figure 16 (right). This demonstrates that the sound is brightest while it is still getting louder and that, by the time that it reaches maximum loudness, the brightness is already diminished. This lets a small burst of higher-frequency noise through at the start of the note, and goes some way to imitating the sound of blowing the instrument.

Figure 16: How the contours interact.Figure 16: How the contours interact.If we put all this together, adding the modulation controllers and output section, we obtain the patch shown in Figure 17 (below). It will never fool you into thinking that you are playing (or listening to) a real recorder, but with sympathetic performance and careful use of pitch-bend to imitate any changes in blowing pressure, it is somewhat 'recordery'. You can even tune oscillator 1 down to 4' or 8' to imitate alto, tenor and bass recorders, but you must be careful not to play over too wide a range; like the recorder itself, the patch works over two octaves or so, from middle 'C' upwards.

For reasons we need not discuss here, I am submitting this article from a hotel room in Tokyo. Given that my studio is somewhat in excess of 6,000 miles to the west of me, I thought that it would be interesting to finish by experimenting with one of the software synths loaded on my G4 Titanium PowerBook to see whether I could get closer to an authentic recorder sound. So I took a trip to Akihabara, bought a Yamaha descant recorder for just 1600 yen (about £8), and used it as the basis for the Oddity recorder patch in the next section.

Figure 17: The Minimoog recorder patch.Figure 17: The Minimoog recorder patch.

A Recorder Patch (Take II)

Using Gmedia's Oddity software (as reviewed in SOS August 2003) that I reviewed last month, I started with an oscillator setting that is not available on the Minimoog, selecting the pulse/square option of VCO2 and setting the pulse width to somewhere in the region of 40 percent. If you followed my explanation of pulse waves and sync functions a few months ago (see SOS March 2003), you'll recognise that this has a strong fundamental, a weak second harmonic, and a slightly suppressed third harmonic, as required by Figure 11. It retains much of the 'woodiness' of the square wave, but with a bit more 'edge' and, to my ears, is a much better basis for the patch. I set this an octave above middle 'C', made sure that there was no pitch- or pulse-width modulation, and combined the single oscillator with a small amount of white noise (see Figure 18).

Figure 18: The Oddity recorder: oscillators.Figure 18: The Oddity recorder: oscillators.

Next, I set the low-pass filter so that, as on the Minimoog, it opened according to the contour determined by the ADSR envelope. I found that, with the release set carefully, I could create a pleasant wooden 'thunk' at the end of the note. I also added a little resonance to add a touch of edginess to the sound (see Figure 19, below). Note that the filter tracks the keyboard; in this case at a rate of around 65 percent, which seems right to my ears.

Figure 19: The Oddity recorder: filters.Figure 19: The Oddity recorder: filters.

Now look more closely at the Sample & Hold section. I have taken the output of the noise generator (the white slider), sampled it at the LFO rate, and then slewed the result to create a smoothly varying random waveform. I used a tiny amount of this (the yellow slider in the filter section, set to five percent or less) to modulate the VCF. This recreates the small inconsistencies in blowing pressure produced by all but the most experienced recorder players.

Figure 20: The Oddity recorder: amplifier.Figure 20: The Oddity recorder: amplifier.

Finally, I routed the ADSR to the VCA, setting the initial gain to zero so that no sound leaks through between notes (see Figure 20, above). To parallel the Minimoog patch, I could have used the Oddity's second envelope generator for this, but it produces an ASR contour, which is not appropriate for this sound.

Figure 21: The Oddity recorder: complete.Figure 21: The Oddity recorder: complete.

The complete patch, shown in Figure 21, combines a better approximation to the true waveform of the recorder, an imitation of the instabilities of the instrument, and — in my opinion — somewhat more realistic filtering than we achieved on the Minimoog. But it will never sound convincing, because the recorder has a rather edgy, unstable quality, particularly evident in the flutter that occurs if you blow at a pressure that excites the jet at a frequency somewhere between two of the pipe's modes. The resulting instability, and the jump between modes that occurs if you increase or decrease the pressure just slightly, is the preserve of some very complex patching, or of physical modelling synths such as the Yamaha VL1 or Korg Z1. Furthermore, the recorder produces the tuned noise we discussed at length last month. Clearly, a large, modular synth is going to approach the ideal much more closely than either the Minimoog or the Odyssey.

Furthermore, this Oddity patch lacks the expression obtained by human recorder players who use techniques such as tonguing, gentle attacks, and legato to add interest to their performances. Nevertheless, it has a certain quality that is reminiscent of the original instrument and, with careful playing, it is useable. You can also modify it to coax a range of related sounds from the Oddity, including the aforementioned penny whistles and so on. Sure, it's a delicate timbre that will never grace your dance grooves, but that's not the point. You can learn quite a lot about the strengths and weaknesses of analogue synthesis by trying — and failing — to recreate the sound of the humble descant recorder.

Published September 2003