MSP

Arpeggiate the harmonic series

This example repeatedly arpgeggiates the first 16 notes of the harmonic series based on the frequency 65.406395 Hz, which is the fundamental frequency of the open C string on a cello. The note rate can be adjusted anywhere from 1 note per second to 100 notes per second. The default initial rate is 8 notes per second.

Vibrato

In music the term vibrato (Italian for “vibrated”) means small repetitive fluctuations of pitch and loudness in a tone. Singers and instrumentalists use vibrato intentionally to add interest and expressivity to their sound.

Scale and offset

There’s a simple way to convert one range of values into a corresponding set of values in a different range. The mathematical operations necessary to do that are “scaling” (one multiplication) and “offsetting” (one addition).

Biquad filter

The biquad~ object is a biquadratic filter. In technical terms, that’s a second-order IIR filter with two poles and two zeros; in practical terms, it’s a versatile filter that can have a wide variety of characteristics—lowpass, hipass, bandpass, notch, shelf, etc.—depending on the values of the coefficients in the filtering equation. But unless you’re a trained electrical engineer, you probably don’t know exactly how the coefficient values correspond to particular filtering characteristics.

ADSR filter envelope

An ADSR envelope generator is a common tool for controlling the amplitude of a note, and in fact it can be used to control any parameter of a sound. In this example, one adsr~ object controls the amplitude of a note while another adsr~ controls the cutoff frequency of a lowpass filter on the sound. Both are triggered at the same moment, but they have slightly different parameters for independent envelope shapes.

Rhythmic filtered noise bursts

This example demonstrates how the settings of a resonant bandpass filter can be altered in a rhythmic way for musical effect. The three table objects each contain 16 numbers, which will be used as the parameter settings for gain, center frequency, and Q in a reson~ object. The numbers in the table objects are looked up by a counter that cycles repeatedly through the table indices, 0 to 15.

Resonant bandpass filter

The reson~ object is a resonant bandpass filter; it passes frequencies in a specified region, and attenuates the other frequencies. It requires only three parameter values: input gain, center (resonated) frequency, and a resonance quality factor (Q). The Q determines the bandwidth of the passed region around the center frequency. Specifically, Q is defined as center frequency divided by bandwidth, where bandwidth is the extent, in Hertz, above and below the center frequency before the frequencies will be significantly attenuated.