Simple flanging

 

The number of samples of delay can be provided in the right inlet of delay~ as a MSP signal instead of an individual Max int message. The main reason for doing that would be to get a special effect by continuously modulating the delay time. When the delay time is continuously modulated by a repeating signal such as a low-frequency oscillator (LFO), the effect is called “flanging”. (Essentially, any time the delay is changing continuously, that’s a simulation of the sound source moving toward us or away from us, which introduces a “Doppler shift” in the perceived pitch.) Notice that the signal in the right inlet of delay still represents samples of delay, so we need to scale the output of cycle~ to the appropriate range and offset its center point. In this example we scale its range to + or – 21 samples and offset that by 22 samples, so the delay time fluctuates between 1 and 43 samples, 6 times per second. Subtle flanging of + or – 1/2 ms, as is shown in this example, imposes a modest vibrato on the incoming sound. You can play around with different flange rates and different depths of vibrato to get a variety of effects. When the flanged sound is mixed with the direct sound, the two sounds interfere in potentially interesting ways.