THE AUDITORY MODELING TOOLBOX

Applies to version: 1.2.0

View the code

Go to function

MAY2011_GAMMATONEINIT - Initialize gammatone filterbank structure

Usage

GFB = may2011_gammatoneinit(FS,FLOW,FUP,NFILTER,BEAR,BALIGN,BINFO)

Input parameters

FS sampling frequency in Hz
FLOW center frequency of lowest auditory filter (default, FLOW = 80)
FUP center frequency of highest auditory filter (default, FUP = 8e3)
NFILTER number of auditory filters which will be spaced linear on the ERB scale. If NFILTER is not a scalar but a vector, the first value is assumed to represent the number of auditory channels and the following values represents the indices of the filters which should be processed. This can be useful if a large number of channels is required as MATLAB might run out of memory for a longer exerpt if all filters are computed in one step. (default, NFILTER = round(freq2erb(FS/2))
BEAR Adjust gain coefficients of the auditory channels to incorporate middle ear effects. Note that this feature can only be used if the center frequencies of the auditory channels are above 20 hertz and below 12500 hertz. (default, BEAR = true)
BALIGN time-aligned gammatone output (non-causal output) (default, BALIGN = false)
BINFO info flag printing gammatone parameters on the screen (default, BINFO = false)

Output parameters

GFB gammatone parameter structure which can be passed as second input argument to the function gammatone

Description

may2011_gammatoneinit initializes a gammatone structure suitable for usage with may2011_gammatone.

Examples:

nSamples = 500;
% Initialize gammatone parameter structure
GFB = gammatoneInit(20e3);
% Filter impulse with gammatone filtering
bm = gammatone([1; zeros(nSamples-1,1)],GFB);
% Plot result
waveplot(1:nSamples,GFB.cf,bm);