A cochleagram is a picture of sound over time, like a spectrogram — but drawn by a model of the inner ear rather than by a Fourier transform. Six hundred filters, sixty to the octave, tuned to the bandwidths human hearing actually uses.
An FFT-based spectrogram picks one trade-off between time and frequency and applies it everywhere: a long window separates low harmonics and smears every attack, a short one does the reverse. The ear resolves frequency finely at the bottom and time finely at the top, so both are visible in one picture.
Things worth trying
- Speed changes how much time is on screen. Moving fast, you can see voiced speech as a series of separate pulses rather than a texture.
- Pause, then drag across the picture: a pair of lines appears with the time between them. Hovering anywhere reads out the frequency of that row.
- Play Selection appears once you have paused the microphone. It plays the sound the frozen picture was drawn from — the whole width of it, or just what lies between your two lines. Hearing a moment you have just measured is the quickest way to learn to read the display.
- Save Selection writes that same sound to a WAV file — at the level it was recorded rather than the level you are listening to it at, so the file is a measurement rather than a mix. It asks you for a name; what happens next is your browser's business and not this page's, and on a tablet that usually means a strip at the foot of the window with a Save button of its own — which has to be pressed, and then dismissed, or nothing is written. The places offered there and the places offered by Play file… are two different lists: the route back to a saved file is Choose File, then Browse, then wherever your browser puts its downloads.
- Waveform puts the sound itself in a strip above the picture, column for column, so you can see which part of the waveform made which mark.
- Spectrum stands the newest column on its side, to the right of the picture: loudness against frequency, at this instant, on the same rows. Drag the edge it shares with the picture to give it more room.
- ERB is how sharp the filters are. 1.0 matches human hearing; lower is sharper than the ear and easier to read.
- Close-up gives the last fraction of a second its own strip down the right-hand side, at much finer resolution, flowing into the main picture. Drag the line down its left-hand side to change how much room it gets.
- De-skew straightens a click. Sound takes time to travel down the cochlea, so a click really does reach the low filters later — de-skew compensates, at the cost of lag: about 190 ms at the default ERB, and more the sharper you make the filters.
The Mac app
The same engine, natively. It has one thing the browser version does not: an experimental Coherence display that colours the picture by the timing relationship between neighbouring filters rather than by loudness — red for transient, green for tone, blue for noise. It is an experiment rather than a finished feature, which is why it has not been carried across.
Source
The source is on GitHub under the MIT licence — take it and use it. Alongside the app is the Python prototype the real-time engine is checked against, which is the readable account of how the filterbank is designed and where the numbers come from.