next up previous
Next: Acknowledgements Up: HUTear Matlab Toolbox version Previous: Structure of the profile


Additional functions

Scaling of the input signal

Most of the nonlinear elements of an auditory model, e.g., at the level of mechanical-to-neural transduction and neural adaptation are level-dependent. Therefore, it is necessary to fix the amplitude range and its relation to the sound pressure level of a real acoustic signal. Here, we adopt use a convention that the root-mean-square, RMS, value 1 in the digital signal corresponds to the sound pressure level of 0 dB. The function Pascalize can be used to scale a steady-state signal such that it corresponds to a sound pressure level of A dB. For example,
>> ssig=Pascalize(sig,60);
scales a signal sig such that its sound pressure level is 60 dB.

Design of gammatone filters

If the gammatone filterbank is defined in the field, see above, the function Gammatone designs a set of filter and use them to do the cochlear filtering. It is usually more efficient to design the filterbank in advance, store the filter coefficient in a file and use model.cochlea.fb.file field to specify the filterbank.

Make_GTbank is an interactive function which can be used to design various types of gammatone filterbanks. This is called by

>> [f,b]=Make_GTbank;

The function asks first user to specify the type of the filterbank. There are three alternatives: (1) conventional gammatone implementation is the one introduced by Malcolm Slaney [8]. The second and third alternatives are a (2) fourth-order and a (3) sixth-order complex-valued gammatone filterbank for which HUTear has an efficient implementation which uses cgtbank.mex** function. Derivation of these filters can be found Here.

Next, the user is asked to give sampling rate in Hertz. After that, the function gives three alternatives: (1) specify all center frequencies in Hertz, (2) specify all center frequencies in ERB (1-42), and (3) give the number of channels and the lowest center frequency.

After that, the user is asked if he/she wants to store the coefficients directly to a file or to just take the coefficient matrices to Matlab's workspace. AudMod assumes that the coefficients are row vectors in matrices which named f and b as above.

Design of an outer and middle ear filter

As shown above, the model for outer and middle ear is usually a linear filter. The coefficients of the filter are in a mat-file which is set by the model.outmid.file field. This filter may be designed using the Make_OEM function.

For example,

>> [a,b]=Make_OEM(44100,255,'ELC','FIR');
>> save filename.mat a b
designs a 255th order FIR approximation at 44100 Hz sampling rate which is matched with the Equal Loudness Curves at the loudness level of 0 phon. The coefficients are stored here in a mat-file (filename.mat). It is important that the coefficient vectors are named a and b. Otherwise, AudMod is not able to identify the filter coefficients.

It is possible to design also IIR filters using the same function, see help Make_OEM. In addition, if WarpTB is available, it is also possible to design and use frequency-warped FIR and IIR filters.

There is an interactive graphical user interface for Make_OEM in the toolbox. It is called by

>> OEMtool
It can be used to compare different implementation technique as a function of model order and finally to store the coefficients to a named file.

next up previous
Next: Acknowledgements Up: HUTear Matlab Toolbox version Previous: Structure of the profile
Aki Harma