1
MATLAB Project – Modelling an Auditory System
This project aims to familiarise with MATLAB by working on a real-world model, specifically
an auditory system that simulates the components associated with hearing. Note that this
project is an individual task.
An auditory system mimics the behaviour of a biological cochlea found in humans and other
mammals. The system converts a 1D discrete-time audio signal to a 2D time-frequency signal
called an auditory spectrogram. From this spectrogram, audio information can be extracted,
as shown in Table 1. Its application includes hearing aids, speech and musical information
retrieval, audio multimedia systems, and brain modelling.
| Index | Audio Information | Responsible For |
| 1 | Intensity | Sound loudness. |
| 2 | Direction | Location of the origins of a sound. |
| 3 | Pitch | Difference between musical notes and also male and female voices. |
| 4 | Timbre | Sound colour and shape indicate a sound source, e.g. specific person speaking, specific music instrument playing, etc. |
AssignmentTutorOnline
Table 1: Information extractable from an auditory spectrogram.
To convert a one-dimensional (1D) sound signal into a two-dimensional (2D) time-frequency
representation, a cochlear filterbank is used. A cochlear filterbank comprises multiple
gammatone filters either in parallel or cascaded form. The bandwidth of each gammatone
filter increases with increasing frequency so that a high centre frequency filter has a higher
bandwidth than a filter with low centre frequency, as shown in Figure 1(a).
A gammatone filter generally behaves like a bandpass filter but has differences associated to
the behaviour of the cochlea mechanics. Each gammatone filter is tuned to a specific centre
frequency. It only responds to a specific frequency that corresponds to the mechanics of one
specific location on the cochlea. So, when the input signal resonates close to the centre
frequency of the filter, the filter will output a resonating signal at its centre frequency. Hence,
to model an entire cochlea, a gammatone filterbank is used. A filterbank will have a number
of gammatone filters whose centre frequencies are tuned from low to high for the entire
spectrum of a sound signal.
2
Figure 1: Increasing bandwidth with increasing centre frequency in the gain response of gammatone filters. (a) x-axis is
linearly scaled where intervals between frequencies are the same; (b) x-axis is logarithmically-scaled where intervals between
frequencies are nonlinear.
Ideally, the varying filters tuned differently will react to the different frequencies in the input
signal and will output multiple signals. These signals are then half-wave rectified, where all
negative values are set to 0 and only positive values are maintained. They can be visualised
as a 2D image known as an auditory spectrogram, as shown in Figure 2.
An alternative method of showing a spectrogram is by calculating the short-time Fourier
transform (STFT) of a sound signal.
Figure 2: Block diagram of auditory system
3
MATLAB Model Tasks
Implement an auditory system in MATLAB using the following steps:
1. Modify the sample code in gammatonegram.tgz according to your specifications from
Table 2 based on your right-most digit in your student number. After your changes are
introduced, ensure the following:
– The heights of the two spectrograms generated by default are the same as the
number of channels in your settings.
– The lowest centre frequency in your gain response display should be within ±8 Hz
of your lowest centre frequency setting.
| Right-most index of your student number |
Gammatone filter with lowest centre frequency |
Number of channels, |