THE AUDITORY MODELING TOOLBOX

Applies to version: 1.4.0

View the code

Go to function

GAMMACHIRP - Gammachirp filter coefficients

Usage:

[b,a] = gammachirp(fc,fs,n,betamul);
[b,a] = gammachirp(fc,fs,n);
[b,a] = gammachirp(fc,fs);

Input parameters:

fc center frequency in Hz.
fs sampling rate in Hz.

Output parameters:

b nominator coefficients.
a denominator coefficients.

Description:

gammachirp takes the following key-value pairs:

'order',n filter order (order of Gamma function t^(OrderG-1) )
'beta',b bandwidth of the filter (exp(-2*pi*CoefERBw*ERB(f)))
'c',c c-coefficient exp(j*2*pi*Frs + CoefC*ln(t))
'phase',phase initial phase (0 ~ 2*pi)

gammachirp takes the following flags:

'carrier' Carrier (cos,`sin`,`complex`,`envelope`: 3 letters)
'norm' Normalization of peak spectrum level (no, peak)

gammachirp(fc,fs,n,betamul) computes the filter coefficients of a digital gammachirp filter with center frequency fc, order n, sampling rate fs and bandwith determined by betamul. The bandwidth beta of each filter is determined as betamul times audfiltbw of the center frequency of corresponding filter.

By default, the returned filter coefficients comes from the all-pole approximation described in Lyon (1997). The filters are normalized to have a 0 dB attenuation at the center frequency (another way of stating this is that their impulse responses will have unit area).

gammachirp(fc,fs) will do as above for a 4th order filter.

If fc is a vector, each entry of fc is considered as one center frequency, and the corresponding coefficients are returned as row vectors in the output.

The impulse response of the gammachirp filter is given by:

\begin{equation*} g(t) = at^{n-1}cos(2\pi\cdot fc\cdot t)e^{-2\pi \beta \cdot t} \end{equation*}

To create the filter coefficients of a 1-erb spaced filter bank using gammachirp filters use the following construction:

[b,a] = gammachirp(erbspacebw(flow,fhigh),fs,'complex');

To apply the (complex valued) filters to an input signal, use filterbankz:

outsig = 2*real(ufilterbankz(b,a,insig));

References:

T. Irino and R. D. Pattersion. A time-domain, level-dependent auditory filter: The gammachirp. J. Acoust. Soc. Am., 101(412), 1997. [ http ]