Combining IIR echoes with a one-pole, low-pass filter

Here is the code that I wrote: echo-filter.scm

Because the filter stretches the input pulse, which is then echoed, and each echoed sample is later filtered, a combination of high frequency, low echo attenuation and long smoothing by the filter can cause runaway gain, railing the signal. The string model is near the edge of this limit but the pipe model is not.

 

Model of a plucked string

To mimic a string, I used a small attenuation factor on the echo (so that it would ring for a long time) and heavy filtering (to make it sound less like a train of pulses and more sinusoidal).

This is what it sounds like: stringmodel.wav

Here is a picture of the waveform, showing the echo train: stringmodel1.jpg

Here is a picture of the waveform, showing the shaping of individual pulses: stringmodel2.jpg

Here is a sonogram of the sound: stringsonagram.jpg

 

Model of my copper pipe

To mimic the pipe, I set the echo period and attenuation factor to the values that I measured by recording the pipe. There is less filtering than for the string to mimic the pipe's somewhat harsh sound.

This is what it sounds like: pipemodel.wav

Here is a picture of the waveform, showing the echo train: pipemodel1.jpg

Here is a picture of the waveform, showing the shaping of individual pulses: pipemodel2.jpg

Here is a sonogram of the sound: pipesonagram.jpg