Implements the classical standard analog filter types: low-pass and high-pass.
They are implemented with the four classical kinds of filters: Butterworth, Chebyshev Type I, Chebyshev Type II, and Elliptical. The number of poles may be any even number from 2 to 80.
<CsoundSynthesizer><CsOptions>; Select audio/midi flags here according to platform-odac ;;;RT audio out;-iadc ;;;uncomment -iadc if RT audio input is needed too; For Non-realtime ouput leave only the line below:; -o clfilt_lowpass.wav -W ;;; for file output any platform</CsOptions><CsInstruments>sr=44100ksmps=32nchnls=20dbfs=1instr1; white noisesig:a=rand(0.5)outs(sig,sig)endininstr2; filtered noise sig:a=rand(0.9); Lowpass filter signal asig with a ; 10-pole Butterworth at 500 Hz.a1=clfilt(sig,500,0,10)outs(a1,a1)endin</CsInstruments><CsScore>i102i222e</CsScore></CsoundSynthesizer>
Here is an example of the clfilt opcode as a low-pass filter. It uses the file clfilt_lowpass.csd.
<CsoundSynthesizer><CsOptions>; Select audio/midi flags here according to platform-odac ;;;RT audio out;-iadc ;;;uncomment -iadc if RT audio input is needed too; For Non-realtime ouput leave only the line below:; -o clfilt_lowpass.wav -W ;;; for file output any platform</CsOptions><CsInstruments>sr=44100ksmps=32nchnls=20dbfs=1instr1; white noiseasigrand0.5outsasig,asigendininstr2; filtered noise asigrand0.9; Lowpass filter signal asig with a ; 10-pole Butterworth at 500 Hz.a1clfiltasig,500,0,10outsa1,a1endin</CsInstruments><CsScore>i102i222e</CsScore></CsoundSynthesizer>
Here is an example of the clfilt opcode as a high-pass filter. It uses the file clfilt_highpass-modern.csd.
<CsoundSynthesizer><CsOptions>; Select audio/midi flags here according to platform-odac ;;;RT audio out;-iadc ;;;uncomment -iadc if RT audio input is needed too; For Non-realtime ouput leave only the line below:; -o clfilt_highpass.wav -W ;;; for file output any platform</CsOptions><CsInstruments>sr=44100ksmps=32nchnls=20dbfs=1instr1; white noisesig:a=rand(0.6)outs(sig,sig)endininstr2;filtered noisesig:a=rand(0.7); Highpass filter signal asig with a 6-pole Chebyshev; Type I at 2000 Hz with 3 dB of passband ripple.a1=clfilt(sig,2000,1,6,1,3)outs(a1,a1)endin</CsInstruments><CsScore>i102i222e</CsScore></CsoundSynthesizer>
Here is an example of the clfilt opcode as a high-pass filter. It uses the file clfilt_highpass.csd.
<CsoundSynthesizer><CsOptions>; Select audio/midi flags here according to platform-odac ;;;RT audio out;-iadc ;;;uncomment -iadc if RT audio input is needed too; For Non-realtime ouput leave only the line below:; -o clfilt_highpass.wav -W ;;; for file output any platform</CsOptions><CsInstruments>sr=44100ksmps=32nchnls=20dbfs=1instr1; white noiseasigrand0.6outsasig,asigendininstr2;filtered noiseasigrand0.7; Highpass filter signal asig with a 6-pole Chebyshev; Type I at 2000 Hz with 3 dB of passband ripple.a1clfiltasig,2000,1,6,1,3outsa1,a1endin</CsInstruments><CsScore>i102i222e</CsScore></CsoundSynthesizer>