sffilters


NAME

sffilters − applies a number of filters to a soundfile.

SYNOPSIS

sffilters [-t n][-f n][-w n][-N n][-o output][-b][-info] inputSoundfile

DESCRIPTION

sffilters applies a variety of filters to a soundfile.

OPTIONS

-t

0 Butterworth low-pass, specify cutoff frequency.

1 Butterworth high-pass, specify cutoff frequency.
2 Butterworth band-pass, specify center frequency and bandwidth.
3 Butterworth band-reject, specify center frequency and bandwidth.
4 2nd order recursive filter, specify center and bandwidth.
5 2nd order FIR filter, specify center and bandwidth.
6 N-order FIR filter (lowpass), specify number of taps (N) and cutoff frequency.
7 two-pole IIR filter, specify center and bandwith.

-f c

Cutoff frequency or center frequency, depending on type of filter chosen.

-w b

Bandwidth for bandpass and band-reject filters.

-N n

Number of taps for the N-order FIR filter.

-o outputSoundfile

Write the output to the outputSoundfile .

-b

Boost sound to maximum after filtering. -info Print the filter equations to the screen.

EQUATIONS

Filters 0-3

Butterworth filters: y[n] = a0 * x[n] + a1 * x[n-1] + a2 * x[n-2] - b1 * y[n-1] - b2 * y[n-2]

Filter 4

2nd order Infinite Impulse Response (IIR) filter: y[n] = a0 * x[n] - b1 * y[n-1] - b2 * y[n-2]

Filter 5

2nd order Finite Impulse Response (FIR) filter: y[n] = a0 * x[n] + a1 * x[n-1] + a2 * x[n-2]

Filter 6

N-order FIR filter (lowpass): y[n] = a0 * x[n] + a1 * x[n-1] + a2 * x[n-2] + ... + aN * x[n-N]

Filter 7

Two-pole IIR filter: y[n] = G * (x[n] - R * x[n-2]) + b1 * y[n-1] + b2 * y[n-2]

USAGE

sffilters -t 0 -f 1000 -o output.wav input.aiff

Apply a Butterworth lowpass filter (-t 0) with a cutoff frequency of 1000 Hertz (-f 1000) to the file input.aiff and place the output in the file output.wav (-o output.wav).

sffilters -t 6 -N 15 -f 800 -o output.aiff input.wav

Apply an N-order FIR filter (-t 6) with 15 taps (-N 15) and a cutoff frequency of 800 Hertz (-f 800) to the input file input.wav and place the output in the file output.aiff .

BUGS

This program will only work with WAVE, AIFF, AIFC, and the old NeXT/Sun "snd" format soundfiles, that are 16-bit PCM encoded, with 1 or 2 channels.

AUTHOR

Arun Chandra <arunc@evergreen.edu>

sffilters is free software.