Use Non-Frames Version Previous Page Next Page
Signal Modifiers: Standard Filters

butterhp, butterlp, butterbp, butterbr

  ar      butterhp   asig, kfreq[, iskip]
  ar      butterlp   asig, kfreq[, iskip]
  ar      butterbp   asig, kfreq, kband[, iskip]
  ar      butterbr   asig, kfreq, kband[, iskip]

Description

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.

Performance

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. In the case of butterbp and butterbr, the center kfreq is the intervalic, not mathematical, center.

kband – Bandwidth of the bandpass and bandreject filters.

iskip – Skip initialization if present and non zero

Example

  asig    rand      10000            ; White noise signal
  alpf    butterlp  asig, 1000       ; cutting frequencies above1K
  ahpf    butterhp  asig, 500        ; passing frequencies above 500Hz
  abpf    butterbp  asig, 1000, 1500 ; passing 2 octaves: 500 to 2000 Hz
  abrf    butterbr  asig, 100, 150   ; cutting 2 octaves: 50 to 200 Hz

Author

Paris Smaragdis
MIT, Cambridge
1995


Use Non-Frames Version Previous Page Next Page
Signal Modifiers: Standard Filters