Function: gammatonefir
GAMMATONEFIR  Gammatone filter coefficients
  Usage: b = gammatonefir(fc,fs,n,betamul);
         b = gammatonefir(fc,fs,n);
         b = gammatonefir(fc,fs);

  Input parameters:
     fc    :  center frequency in Hz.
     fs    :  sampling rate in Hz.
     n     :  max. filter length.
     beta  :  bandwidth of the filter.

  Output parameters:
     b     :  FIR filters as an cell-array of structs.

  GAMMATONEFIR(fc,fs,n,betamul) computes the filter coefficients of a
  digital FIR gammatone filter with length at most n, center 
  frequency fc, 4th order rising slope, 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. The actual length of the inpulse response
  depends on fc (the filter is longer for low center frequencies),
  fs and betamul but it is never bigger than n.

  GAMMATONEFIR(fc,fs,n) will do the same but choose a filter bandwidth
  according to Glasberg and Moore (1990).  betamul is choosen to be 1.0183.

  GAMMATONEFIR(fc,fs) will do as above and choose a sufficiently long
  filter to accurately represent the lowest subband channel.

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

  The inpulse response of the gammatone filter is given by

      g(t) = a*t^(4-1)*cos(2*pi*fc*t)*exp(-2*pi*beta*t)

  The gammatone filters as implemented by this function generate
  complex valued output, because the filters are modulated by the
  exponential function. Using real on the output will give the
  coefficients of the corresponding cosine modulated filters.

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

    g = gammatonefir(erbspacebw(flow,fhigh),fs);


 
  References:
    A. Aertsen and P. Johannesma. Spectro-temporal receptive fields of
    auditory neurons in the grassfrog. I. Characterization of tonal and
    natural stimuli. Biol. Cybern, 38:223--234, 1980.
    
    B. R. Glasberg and B. Moore. Derivation of auditory filter shapes from
    notched-noise data. Hearing Research, 47(1-2):103, 1990.
    

Url: http://ltfat.github.io/doc/auditory/gammatonefir.html

See also: erbspace, audspace, audfiltbw, demo_auditoryfilterbank.

Package: ltfat