phasor~

Trapezoidal envelope

The trapezoid~ object allows you to make a control signal that rises to a certain level, stays there, then falls back to its initial level. That shape can be ueseful as an amplitude envelope or a filter envelope, for example. At its input trapezoid~ needs to be driven by a signal, usually a control signal that progresses from 0 to 1 in a straight line, such as phasor~ or line~.

Isolate a single bin of an FFT

This example shows how to isolate a single FFT bin, as opposed to displaying the entire spectrum. The example uses fft~ instead of fftin~, but the principle is the same.

Detect the end of a phasor~ cycle

This example demonstrates how to detect the end/beginning of a phasor~ cycle.

Tremolo effect in Max for Live

This patch shows one possible implementation of a tremolo effect as a Max for Live (M4L) device.

Sample and hold

The idea of “sample and hold” is to capture the amplitude of a signal at a particular instant in time, and hold it constant for a while. In MSP, the sah~ object allows you to do just that.

Very low frequency modulation for gradual change

This example combines seven pre-recorded saxophone sounds, slowly modulating several aspects of their playback to create an ever-changing mix.

The phasor~ object

The phasor~ object is one of the most valuable MSP signals to use as a control signal. (You wouldn't generally want to listen to it directly as audio because it's an ideal sawtooth wave and has energy at so many harmonics that it can easily create aliasing. If you want a sawtooth wave sound, it's better to use the saw~ object, which limits its harmonics so as not to exceed the Nyquist frequency.) The phasor~ outputs a signal that ramps cyclically from 0 to 1.

Using phasor~ directly as a control signal

If you need a linear signal that repeats at a specific rate, phasor~ can be scaled and offset to provide a repeating line from one signal value to another. In this example, we use phasor~ to directly control both frequency and amplitude of an oscillator.

Repeatedly reading a function with phasor~

The real value of phasor~ is that it provides a very accurate way to read through (or mathematically calculate) some nonlinear shape to use as a control signal (or even as an audio signal). Among other things, it might be used to create a "window" shape that can serve as an amplitude envelope for a sound. This patch demonstrates five different ways to create window or waveform shapes with phasor~. We'll discuss them (in good Max fashion) from right to left.

Transport-controlled phasor~

A phasor~ object, like other MSP objects such as cycle~ that use a rate for their timing, can have its repetition rate specified as a transport-related tempo-relative time value (note values, ticks, etc.). So if you want a phasor~ to work at a rate that is related to the transport's tempo, you can type in a tempo-relative time as an argument to specify its period of repetition instead of typing in a frequency.