WAVE file
Continuous change of delay time causes a pitch shift
The way we commonly avoid clicks when changing the amplitude of a sound is to interpolate smoothly sample-by-sample from one gain factor to another, using an object such as line~. Does that same technique work well for making a smooth change from one delay time to another? As it turns out, that's not the best way to get a seamless unnoticeable change from one delay time to another, because changing the delay time gradually will actually cause a pitch shift in the sound.
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.
Trigger sound cues with the mouse or from the computer keyboard
This is effectively pretty much identical to Trigger sound cues from the computer keyboard, but a) it allows the user to trigger sound cues either
The error object
When Max detects a bug or a problem in your patch, it posts an error message in the Max window, such as “sfplay~: cant find file <filename>”.
Rhythmic delays in time with a musical tempo
The tempo-relative timing capabilities in Max can be used to synchronize MSP processing in time with a musical beat. In this example, timings of delays are specified in tempo-relative time units so that they remain rhythmically correct for any tempo.
Windowing an audio signal
In signal processing, a "window" is a function (shape) that is nonzero for some period of time, and zero before and after that period. When multiplied by another signal, it produces an output of 0 except during the nonzero portion of the window, when it exposes the other signal. The simplest example is a rectangular window, which is 0, then briefly is 1, then reverts to 0. The windowed signal will be audible only when it is being multiplied by 1––i.e., during the time when the rectangular windowing occurs.
Preload and play sound cues
A single sfplay~ object can refer to many different sound files, or even specific portions of sound files, with a unique "cue" number assigned to each sound. Once those sound cues have been preloaded (i.e. taught to the object), you can cause the object to play a cue just by sending the desired cue number in its left inlet.
Multiple delays with stereo panning
Multi-tap audio delay with feedback
Audio delay is achieved by creating a buffer in which the most recent past sound can be stored. Usually this is called a "ring buffer" or "circular buffer", because when the buffer is filled (with, let's say, the past one second of sound), it loops around and begins refilling itself at the beginning, thus overwriting the sound that was stored more than one second ago.