flanger — A user controlled flanger.
asig -- input signal
adel -- delay in seconds
kfeedback -- feedback amount (in normal tasks this should not exceed 1, even if bigger values are allowed)
This unit is useful for generating choruses and flangers. The delay must be varied at a-rate, for example by connecting adel to an oscillator output. The feedback can vary at k-rate. This opcode is implemented to allow kr different than sr (else delay could not be lower than ksmps) enhancing realtime performance. This unit is very similar to wguide1, the only difference is flanger does not have the lowpass filter or the requirement that the delay be varied at a-rate.
Here is an example of the flanger opcode. It uses the file flanger.csd.
Example 310. Example of the flanger opcode.
See the sections Real-time Audio and Command Line Flags for more information on using command line flags.
<CsoundSynthesizer> <CsOptions> ; Select audio/midi flags here according to platform -odac ;;;realtime audio out ;-iadc ;;;uncomment -iadc if realtime audio input is needed too ; For Non-realtime ouput leave only the line below: ;-o flanger.wav -W ;;; for file output any platform </CsOptions> <CsInstruments> sr = 44100 ksmps = 32 nchnls = 2 0dbfs = 1 instr 1 kfeedback = p4 asnd vco2 .2, 50 adel linseg 0, p3*.5, 0.02, p3*.5, 0 ;max delay time =20ms aflg flanger asnd, adel, kfeedback, 1 asig clip aflg, 1, 1 outs asig+asnd, asig+asnd ;mix flanger with original endin </CsInstruments> <CsScore> i 1.1 0 10 .2 i 1.1 10 10 .8 ;lot of feedback e </CsScore> </CsoundSynthesizer>