# Synthesizing wind instruments
Pipes produce a harmonic series just as strings do. For wind instruments where the mouth is placed over one end, this becomes a closed pipe, which produces only odd harmonics. The clarinet acts like a closed pipe.[^1]
For pan pipes, start with a [[Square wave]] (with maybe some blue noise). A pan pipe is a cylindrical bore with a closed end, which can produce only odd harmonics. You can also try a [[Triangle wave]] for this reason. Add a separate blue noise oscillator or a high-passed white noise. For the chiff transient, send the noise in parallel through a lowpass filter and amplifier controlled by an envelope. Send the other split noise channel through keytracking tuned filters to emulate the instrument's formant (for middle C, tune to 250, 750, 12,450 Hz, and so on), then have it fade in after the chiff. Follow all this with a lowpass filter. You can also patch vibrato, tremolo, and a little filter modulation too (consider using an inverted amplitude modulation as the filter opens and closes to keep a steady volume).[^2]
Other types of flutes, like the shakuhachi, have a hole at the bottom, which results in both even and odd harmonics. All other flutes are also 'open' if they have finger holes.[^3]
The recorder's higher harmonics are slightly stretched sharp. I might be able to synthesize this with frequency shifting and additive synthesis. Another method for generating a recorder's spectra is to use two oscillators tuned an octave apart to emulate the weak amplitude of the second harmonic. Minimoog programmer Tom Rhea used a triangle wave with white noise, brightness modulation, and an envelope that opens and closes the filter before the volume envelope has finished opening (which emulates the transient of blowing a recorder). Another method is to use a square wave with a pulse width of about 40%, which results in a weak second harmonic and a slightly suppressed third harmonic. You can get similar sounds, like penny whistles, by modifying the patch.[^3]
The transverse flute has a brighter sound due to having larger finger holes, compared to wooden flutes which sound mellower due to their smaller finger holes. The flute's harmonic spectrum is limited to about 2kHz. Its first couple harmonics are also attenuated when compared to a traditional sawtooth. This can be emulated with either additive synthesis or a high pass filter. Use a variable high pass filter with aftertouch to emulate how high frequencies become louder with greater blowing pressure. For the volume envelope, set a moderately short release, which will allow the instrument to be played more legato. In lieu of vibrato, create a brightness modulation. Gordon Reid writes, "Tests show that trained players tend to vary the blowing pressure by about ±10 percent with a frequency of around 5Hz to 6Hz."[^4]
I was able to synthesize a flute sound using noise and a resonant comb filter (see [[Ping a keytracking resonant filter with a sample]]).
[^1]: [Synthesizing Wind Instruments](https://www.soundonsound.com/techniques/synthesizing-wind-instruments)
[^2]: [Synthesizing Pan Pipes](https://www.soundonsound.com/techniques/synthesizing-pan-pipes)
[^3]: [Synthesizing Simple Flutes](https://www.soundonsound.com/techniques/synthesizing-simple-flutes)
[^4]: [Practical Flute Synthesis](https://www.soundonsound.com/techniques/practical-flute-synthesis)