← Back to Portfolio
Interactive Sandbox · Psychoacoustics · JavaScript Live

Selective
Hearing

A natural-selection sandbox you can play in the browser. Males sing, females choose by pitch, and noise masks the songs they depend on. Drop noise on the field and watch a population change what it sings, and what it can hear.

🌐 Runs in the browser ⚡ JavaScript 🧠 Bark-band masking 🧬 Evolving neural brains 📱 Phone friendly
RoleSolo: design, simulation, psychoacoustic model and interface
OriginBased on an earlier Unity 2022.2 project of mine
01 · Play
selective-hearing.sim

Pick Place noise, choose a noise type and click the field. Turn Sound on to hear the world from the orange ear. Drag the grips at the window's edges to resize it, or use Page / Wide / Full screen. On a phone, full screen gives the field the most room.

🎧 How the ear works here

  • Every call is a stack of harmonics sorted into 24 critical bands on the Bark scale.
  • Level falls with distance, and high bands lose extra energy to air absorption.
  • A listener hears a call only if a band clears the threshold in quiet and the masking from noise and other singers.
  • Masking spreads into neighbouring bands (Schroeder spreading), so low noise hides more than its own pitch.
  • When a call barely clears the mask, the listener is less sure where it came from.

🧬 What evolves

  • Each creature wires a small recurrent brain from connection genes. Select one to see its wiring.
  • Ten inherited traits, including call pitch, loudness, spectral tilt, preferred pitch and ear tuning.
  • Calling costs energy, so loud, high songs are honest signals.
  • Noise changes the pay-off: low noise pushes singers upward, while crickets leave the middle free but squeeze the top.
  • All values are simplified for play, not lab-grade acoustics.
02 · Where it came from

From a Unity prototype to something you can open with a link

Selective Hearing is based on a project I made in Unity 2022.2 a few years ago. That version lived inside the editor, which meant only people with Unity and the project could ever try it. This one is rebuilt for the web so the idea reaches anyone: no install, and it runs on a phone.

03 · Accessibility

A simulation about hearing should not depend on one sense or one input. Here is what the simulation does today, and what it does not.

Built in

  • Keyboard control. Tab to the field, arrow keys move the ear (Shift for larger steps), Enter uses the current tool, Delete removes noise.
  • Text description. A "What is happening" panel is written from the live numbers and announced politely to screen readers.
  • Reduced motion. If your system asks for it, the sim starts at 1x and skips the expanding call rings and mating flashes.
  • Numbers beside colour. Selecting a creature shows its pitch, tuning and traits as values, not only as hue.
  • Touch. The field works with touch, there is a full-screen mode, and the layout stacks on phones.

Still to do

  • Creature colours are pitch-coded and have not been tested for every kind of colour blindness.
  • The field itself is a canvas, so individual creatures are not separate items a screen reader can walk through.
  • No audio-only mode yet, though sound is available for calls and noise.
04 · Technology
JavaScript
Simulation, genetics, brains, interface
Canvas 2D
Field, spectrum, trend and brain views
Web Audio
Positional calls and noise from the ear
Bark-band masking
24 critical bands with spreading
Unity 2022.2
The original prototype

Perception as a design tool

If you need audio systems, tools or interactive visuals that are built on how people actually hear, I'd love to hear about your project.