AUDSPECGRAM - Auditory spectrogram.

  • audspecgram(insig,fs,op1,op2, ... );
  • C = audspecgram(insig,fs, ... );


AUDSPECGRAM(insig,fs) plots an auditory spectrogram of the signal insig, which has been sampled at a sampling rate of fs Hz. The output is low-pass modulation filtered before presentation.

The frequency axis is diplayed on a erb-scale, but labelled in Hz. Using the mouse to get plot coordinates will reveal the real value in erb's. Use ERBTOFREQ to convert to Hz.

C=AUDSPECGRAM(insig,fs, ... ) returns the image to be displayed as a matrix. Use this in conjunction with IMWRITE etc. Do NOT use this as a method to compute an auditory representation. Use some of the model preprocessing functions for this.

Be carefull with long signals, as the routine may lock up the interpreter.

Additional arguments can be supplied like this: AUDSPECGRAM(insig,fs,'dynrange',30). The arguments must be character strings possibly followed by an argument:

'adapt' Model adaptation. This is the default. This options also sets the output to be displayed on a linear scale.
'noadapt' Do not model adaptation. This option also sets a Db scale to display the output.
'rectify' Use half extract the envelope of the auditory filters. This is the default.
'hilbert' Use the Hilbert transform to extract the envelope of the auditory filters.
'classic' Display a classic spectrogram. This option is equal to 'hilbert', 'noadapt', 'nomf'
'mlp',f Modulation low low-pass filter to 50 Hz.
'nomf' No modulation filtering of any kind.
'image' Use 'imagesc' to display the spectrogram. This is the default.
'clim',[clow,chigh] Use a colormap ranging from clow to chigh. These values are passed to IMAGESC. See the help on IMAGESC.
'dynrange',r Limit the displayed dynamic range to r. This option is especially usefull when displaying on a log/Db scale.
'fullrange' Use the full dynamic range.
'ytick' A vector containing the frequency in Hz of the yticks.
'thr',r Keep only the largest fraction r of the coefficients, and set the rest to zero.
'frange',[flow,fhigh] Choose a frequency scale ranging from flow to fhigh, values are eneterd in Hz. Default is to display from 0 to 8000 Hz.
'xres',xres Approximate number of pixels along x
'yres',yres Approximate number of pixels along y only one of 'xres' and 'yres' is specified, the default aspect ratio will be used.
'displayratio',r Set the default aspect ratio.
'contour' Do a contour plot to display the spectrogram.
'surf' Do a surf plot to display the spectrogram.
'mesh' Do a mesh plot to display the spectrogram.