The line~ object calculates and performs that interpolation, sending out a signal that arrives at a specified destination value in a specified amount of time. Once the signal arrives at that value, it stays there until it receives another message telling it to transition linearly to a new signal value.
To play short grains of sound, especially ones randomly chosen from a sound file, it's usually necessary to impose some sort of "window"—an amplitude envelope—to taper the ends of the grain in order to avoid clicks. This patch shows how to generate four types of window function, and read through them with a phasor.
The adsr~ object provides a signal in the shape of an ADSR envelope (attack, decay, sustain, release) commonly used in synthesizer design. You specify an attack time in ms (time to get from 0 amplitude to peak amplitude), a decay time in ms (time to settle to the sustain level), a sustain level (an amplitude factor, not a ms time), and a release time in ms (time to return to 0). Those values can all be supplied as initializing arguments, and/or as floats or signals in the second, third, fourth, and fifth inlets.
Each MSP object (each object that has signal input and/or output) is always producing signal as long as audio is turned on. For example, signal generators like cycle~ (sinusoidal wave generator) and saw~ (band-limited sawtooth wave generator) are always producing a full-amplitude wave. You control the amplitude of that wave with multiplication, using *~ or some other object that performs a multiplication internally (such as gain~).
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.
The way that a sound’s amplitude evolves over time is called its amplitude envelope.
The function object permits you to design a shape made up of line segments, and then you can send that information (out the second outlet) to a line~ object to cause a changing signal with that shape over a specified amount of time. When the function object receives a bang, first it sends out its initial value as a float (0. in this case), then it sends out a list of subsequent values and destination times.