A useful noise gate (ducker) subpatch for rejecting unwanted sounds

A "ducker" is a system that turns a signal down to 0 when it's below a given threshold. This is also frequently called a "noise gate" in audio engineering, because it acts as a doorway that closes out unwanted low-level ambient noise and lets through only the louder, more desired signal. It's useful for suppressing unwanted low-level audio, such as in a cell phone transmission when the user is not talking, or, more to the point for musical purposes, as in a microphone signal when the musician is not playing.

Linear interpolation to a new value

The rampsmooth~ object is useful for smoothing MSP signals, a sort of lowpass filter, especially appropriate for smoothing out overly sudden changes in control signals. The left part of this patch demonstrates the fact that internally rampsmooth~ is just doing linear interpolation. Whenever the input signal changes, rampsmooth~ heads toward that value from wherever it currently is, using the specified number of samples (depending on whether it has to increase or decrease) to get there.