Bonsai: Wiring the World
into Sound and Image

Peckham Digital, Festival of Creative Computing 2026

NeuroGEARS · bonsai-rx.org

What is Bonsai?

A language, an ecosystem, an editor

  • Open source, reactive programming language
  • Ecosystem of packages for hardware integration, graphics, and more
  • Visual editor for designing workflows

What is Bonsai?

Born in neuroscience research

Problem 1

Reliance on closed-source, proprietary or paid software.

Problem 2

Doing interesting things with hardware in real-time is difficult.

Problem 1

Own your own tools

  • Researchers, artists and makers should be free to modify, inspect, repair and understand their tools

Problem 2

Unified model for handling async data

Camera USB video · 30 fps · BGR frames Microphone 44.1 kHz · audio buffers MIDI controller note & CC messages, on demand Projector / shaders GPU · 60 Hz refresh Machine learning tensors · variable latency Bonsai One model: streams of data + interactions + transformations

The Bonsai model

Source

Produces a stream of data.
Camera frames, microphone buffers, key presses

Transform

One-to-one transformations.
Recolour an image, filter an audio buffer

Combinator

Combines or gates streams, usually two or more.
Sample on a key press, sync two streams

Sink

Does something with the data, passes it on unchanged.
Write to disk, send over the network

Under the hood

Parallel by default

  • Built on Reactive Extensions (Rx) from Microsoft
  • Every stream is asynchronous and runs in parallel
  • No threads, locks or callbacks to manage: drop in a camera, a microphone, a keyboard, and it just runs

Thinking in Bonsai

Parallel data flows and combinations

A Bonsai workflow where camera and microphone streams branch, are transformed, and combine so that loudness sets an image threshold

Sound sets the threshold: camera and microphone streams, combined.

The Bonsai editor

Let's look at it live