ar butterhp asig, kfreq[, iskip] ar butterlp asig, kfreq[, iskip] ar butterbp asig, kfreq, kband[, iskip] ar butterbr asig, kfreq, kband[, iskip]
Implementations of second-order high-pass, low-pass, band-pass and band-reject Butterworth filters. Note: these opcodes can also be written butlp, buthp, butbp, butbr.
These filters are Butterworth second-order IIR filters. They are slightly slower than the original filters in Csound, but they offer an almost flat passband and very good precision and stopband attenuation.
asig - Input signal to be filtered.
kfreq - Cutoff or center frequency for each of the filters.
kband - Bandwidth of the bandpass and bandreject filters.
iskip - Skip initialization if present and non zero
asig rand 10000 ; White noise signal alpf butterlp asig, 1000 ; cutting frequencies above1K ahpf butterhp asig, 500 ; passing frequencies above 500Hz abpf butterbp asig, 2000, 100 ; passing only 1950 to 2050 Hz abrf butterbr asig, 4500, 200 ; cutting only 4400 to 4600 Hz
Paris Smaragdis
MIT, Cambridge
1995