The Basic Blown
Pipe
Tutorial home
Blown pipes include flutes,
recorders, and many organ pipes. A blown
pipe is probably the simplest wind model, so it’s a good place to start. Below is a basic blown pipe patch.
The patch contains three
basic parts:
Noisy air source: This is an
envelope generator that creates a voltage which represents the air pressure
going into the pipe. For added realism,
a small amount of noise is added to the signal.
Jet driver: This is a waveshaper that sums two inputs: the air coming into the pipe, and the air
being reflected back from the pipe. It
represents the mouthpiece, and implements the function Y=X^3-X, or
Y=X*X*X-X. What does this do? The waveshaping function looks like a
“hump”. When the input is either 0 or
64, the output is 0. Between these
points, it rises in a hump-like shape, rising to about 20 when the input is
about 40. This shape is the key to
creating an oscillation in the pipe.
Pipe: This is just a tuned delay line with a
lowpass filter. A zero-feedback comb
filter is used, because it can be tuned to the keyboard very easily. The lowpass filter smoothes the signal,
rounding off the edges. A highpass
filter after the pipe removes the DC offset (discussed below).
How does it work?
So, what happens when you
press a key?
- The envelope generator rises, admitting noisy
air into the pipe.
- Because the air pressure is close to the top of
the waveshaper’s “hump”, the waveshaper lets the air into the pipe.
- When the air returns to the front of the pipe,
it’s added to the incoming air.
This kicks the waveshaper down past the hump, near to zero, and
prevents more air from entering the pipe.
- When the “lack” of air returns to the front of
the pipe (via the delay line), this means that nothing is added to the
incoming air. So the incoming air
level is again near the top of the waveshaper’s “hump”, and the waveshaper
again lets the incoming air into the pipe, like step 3.
As long as the envelope
generator is admitting new air into the waveshaper, steps 3 and 4 are repeated
over and over again, causing an oscillation that is shaped like a square
wave. The oscillation time is determined
by the length of the delay line. By
making the delay line longer, the pitch is lowered (and vice versa). The lowpass filter smoothes the edges of the
square wave, softening the sound.
Some observations are:
- The
pitch is an octave lower than expected. For
example, if the delay is tuned to 1ms, you might be surprised to find that
the tone’s frequency is 500 Hz instead of 1 kHz. This is because it takes two trips
through the delay line to make a waveform.
- A
highpass filter is required to remove the “thumping” sound heard at the
start of a note. This is because there’s a positive DC
offset in the waveform. In fact,
the entire waveform is positive.
Although sometimes considered a problem with waveguide models, it
reflects a reality in wind instruments:
there’s always air coming out of the instrument. A highpass filter between the pipe and
the output (but not in the loop!) can get rid of the thump.
- The
instrument is out of tune, going especially flat when playing high notes. This is
because there are a few samples of “overhead” when the signal goes through
the loop, making each pass through the loop a few cycles longer than
expected. The lowpass filter is a
big contributor to this. A few
overhead samples don’t make much of a difference on a low note that’s 1000
samples long. But on a high note
that’s only 40 samples long, a 4-sample delay will drive the pitch flat by
10%, almost two semitones. A
correction for this will be addressed later.