bpf
IIR, band-pass filtering; Apply a band-pass filter to the audio signal
Syntax
y = bpf ( x,fcut1,fcut2,order[=8],type[=1],dBpass[=.5],dBstop[=-40] )
y = x.bpf ( fcut1,fcut2,order[=8],type[=1],dBpass[=.5],dBstop[=-40] )
Inputs
| Argument | Type | Description | Unit |
|---|---|---|---|
x | audio | audio signal | Hz |
fcut1 | scalar | cut-off frequency1 | Hz |
fcut2 | scalar | cut-off frequency2 | dB |
order | scalar | order of the IIR filter | dB |
type | scalar | IIR filter type (1: Butterworth, 2: Chebyshev, 3: Elliptic) | - |
dBpass | scalar | Passband ripple allowed | - |
dBstop | scalar | Stopband attenuation | - |
Outputs / Return Value
y:yis a bandpass-filterd version ofx.
Notes
- The output is not normalized; i.e., the rms of
xis adjusted according to the filter gain. fcut1andfcut2should be less than the Nyquist frequency.- IIR filter coefficients are designed by the specification requested in the argument list, but not guranteed. The user is responsible for making sure the output follows the spec.
Examples
bpf(x, 2000, 4000)
See Also
Review Status
- Legacy parameter naming does not exactly match current engine metadata and should be reviewed manually.