CochSim - Cochlear Simulation
CochSim is an interactive Windows PC program for demonstrating how the cochlea analyses sounds. With Cochsim you can put various signals into the cochlea and see a dynamic simulation of how the basilar membrane and excitation pattern responds to the sound.
CochSim is a dynamic simulation of the time and frequency analysis performed by the ear. Sound signals such as sinewaves, pulse trains, sawtooth waves and vowels can be fed into an auditory filterbank and the output monitored in a moving animated display. The program shows the vibration of the oval window and the basilar membrane, the haircell activity against filter frequency and time, and an average excitation pattern across the cochlea. Haircell output is shown on a horizontal scrolling grey-level display. Operation proceeds at about 200 times slower than real time, with about 5ms of signal being processed each second. This 'slow motion' is deliberate to allow visual inspection of the processing while it is happening.
Download & Installation
The program is only available for Windows PCs from
To download the program, right click on the link above and choose "Save Target As". Save the file to your desktop or to a folder on your computer. Then run the file to install the program and to add an entry to your Start Programs menu. Once installed you can delete the downloaded file.
You can also download a Laboratory Handout sheet that provides a student worksheet for learning with this program.
The CochSim menu options are as follows:
- Input/Signal Type
- Specify which signal type to put into the simulation.
- Open an audio file to put through the simulation. Audio data must be 16-bit linear PCM at 44100 samples/sec.
- Starts the simulation from a clean start.
- Pauses the simulation.
- Stops the simulation and rewinds the input.
- Simulation/Frequency +
- Increases the repetition frequency of the input signal. The increase is by one semitone.
- Simulation/Frequency −
- Decreases the repetition frequency of the input signal. The decrease is by one semitone.
- Simulation/Amplitude +
- Increases the amplitude of the input signal. The increase is by one decibel.
- Simulation/Amplitude −
- Decreases the amplitude of the input signal. The decrease is by one decibel.
- Selects a grey scale "cochleogram" representation of haircell activity. This is the default. When not selected, activity is represented on a series of line graphs.
- Displays a configuration dialog which allows you to control the number of animation frames displayed per second, and the simulation rate (measured in "times real-time"). Computers with slow graphics may not be able to display 25fps, and so a lower rate may be selected. To slow down the rate at which the graphs scroll across the screen, choose a higher simulation rate.
- Left Arrow
- Decrease frequency
- Right Arrow
- Increase frequency
- Down Arrow
- Decrease amplitude
- Up Arrow
- Increase amplitude
- Space Bar
- Pause simulation
The ear periphery is modelled as a filter which emphasises frequencies between 1kHz and 5kHz, while attenuating frequencies below 1kHz and above 5kHz; see graph on right. The shape of this curve is roughly modelled on a moderate level equal-loudness curve, it is not designed to give accurate thresholds. The filter is a combination of a shaping filter above 1kHz and a high-pass filter below 1kHz, and was developed from the model designed by Martin Pflueger et al.
The filtering action of the basilar membrane is simulated as a bank of 512 gammatone filters which model the shape, bandwidth and centre frequencies from studies of the ear. The graph on the right gives an indication of the typical response of these filters. The filter implementation has borrowed extensively from Malcolm Slaney's auditory toolbox, which in turn borrowed from the work of Roy Patterson, Brian Glasberg and Brian Moore.
The output from the filterbank is half-wave rectified, low-pass filtered and logarithmically compressed to obtain the simulated haircell activity. Note that at present there is no explicit hair cell model. The low-pass filter has a corner frequency of about 2000Hz which seems to be adequate to remove temporal fluctuations caused by harmonics above 3000Hz. The excitation pattern is further low-pass filtered at 100Hz to remove fluctuations within a channel due to the repetition frequency.
- Martin Pflueger, Robert Hoeldrich, Willibald Riedler, "A nonlinear model of the peripheral auditory system", at http://iem.at/projekte/publications/iem_report/report02_98/.
- Malcolm Slaney, "Auditory Toolbox", at http://rvl4.ecn.purdue.edu/~malcolm/interval/1998-010/
Please send suggestions for improvements and reports of program faults to email@example.com.
CochSim is not public domain software, its intellectual property is owned by Mark Huckvale, University College London. However CochSim may be used and
copied without charge as long as the program remains unmodified and continues to carry this copyright notice. Please contact the author for other licensing arrangements. CochSim carries no warranty of any kind, you use it at your own risk.