The tapin~ and tapout~ objects work together to delay sound. The tapin~ creates a place in memory for storing a circular buffer of the most recently received signal. Its argument specifies how many milliseconds of audio it should store. Any connected tapout~ object accesses that memory to get the recent past of an audio signal.
Some interesting effects can be obtained by feeding the output of a delay line back into itself and adding that to whatever new sound is coming in. The result is delays of delays, echoes of echoes, etc. As was shown in the discussion of Comb filtering, short delays fed back at a specific rate will have a strong resonance effect on the timbre of a sound.
In addition to the delay~ object, another way to implement a circular buffer for audio delay is with the pair of objects called tapin~ and tapout~. Those two objects are always used as a pair; the outlet of a tapin~ object should only be connected to the left inlet of a tapout~ object.
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.
One possible solution to the problem of clicks occurring when delay time is changed is to fade the amplitude of the delayed sound to 0 just before changing the delay time, then fade back up immediately after the change. This does avoid clicks, but causes an audible momentary break or dip in the sound. This shows one way you could implement such momentary "ducking" of the amplitude.
This is a flanger that can easily be used as an abstraction (subpatch) within any audio patch. Simply save this patch in Max's file search path with the file name "flange~.maxpat", and it can then be used as a flange~ object, as shown in the example "Try the flange~ abstraction".
The "chorus" effect is commonly used to enrich a sound. The effect gets its name from the way that a chorus of people singing or speaking in unison sounds different from a single person. By extension, a group of violins sounds different from a single violin (even though we don't call a violin section a "chorus"), and the same effect even takes place inside a piano because most of the hammers strike two or three strings tuned in unison rather than a single string.
The delay~ object does not permit its delayed signal to be fed back into its own left inlet. (You can probably imagine how that would make it impossible for MSP to calculate the correct signal, since you'd be asking it to perform infinite recursion: the signal plus the delayed signal plus the delayed sum of those two plus...). If you want to get delay with feedback, you need to use objects that are designed to handle that.
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.