The algorithm behind the chorus effect isn't a spectacular or amazing trick - it's actually fairly simple. What happens when two people play instruments in unison? Well they are not always playing in precise synchronization, so there is some delay between the sounds they produce. In addition, the pitch of the two instruments can deviate somewhat, despite careful tuning. These are the functions that your chorus effect is reproducing.
This slight delay can be easily implemented with a delay line. Creating the detuning effect may not seem very simple at first, but it can be achieved by transforming the simple delay line into a variable length delay line. The 'variable length' part just means that the delay time changes over time, though it's effect on the pitch may not be very clear at first.
To understand how the pitch is changed, picture the delay as a recording device. It is storing an exact copy of the input signal as is arrives, much like a cassette recorder, and it then outputs that a little later, at the same rate. To increase the amount delay, you want a longer segment of the signal to be stored in the delay before it is played back. To do this, you want to read out of the delay line at a slower rate than it's being written (the recording rate is unchanged, so more of the signal is being stored). Reading back at a slower rate is just like dragging your fingers on the wheel of the cassette, which we know lowers the pitch. Similarly, to reduce the delay time, we can just read back faster, analogous to speeding up a playing cassette, which increases the pitch - the 'munchkin effect.'
So now, by mixing this delayed and pitch modulated copy of the input together with the original, we have the chorus effect. A diagram for our chorus effect is given in Figure 1.
This structure may look very familiar to you - it's basically our other friend the flanger. The chorus differs in only a couple of ways. One difference is the amount of delay that is used. The delay times in a chorus are larger than in a flanger, usually somewhere between 20 ms. and 30 ms. (the flanger's delay usually ranges from 1 ms. to 10 ms.) This longer delay doesn't produce the characteristic sweeping sound of the flanger. The chorus also differs from the flanger in that there is generally no feedback used.
The only remaining point to discuss is the manner in which the delay time actually changes. In general, some periodic waveform, such as a sine wave, is used. This waveform changes slowly (say than 3 Hz and below.) and is referred to as a LFO (Low Frequency Oscillator). You can control the chorus sound by changing the waveform's frequency, its amplitude, and its shape. We make a simple change to our diagram of the chorus to denote this LFO dependence as in Figure 2.
Other variations on the chorus effect are also possible. For example, rather than using an LFO, you could use a randomly changing delay time, which might model musicians playing in unison a little better. Also, when playing in unison, there will be some loudness differences between the players, so we could also vary the amplitude of delayed signal. This amplitude parameter could then be controlled by another LFO.
http://www.harmony-central.com