TŒRN code docs
These pages explain how the firmware is organized and how the major pieces cooperate: sequencer data, UI modes, the Teensy Audio graph, MIDI/clock, and SD I/O — plus hardware design docs for the current PCB (toern_revG) and host-side tools (sample converter, MIDI convert, SD tool, …).
If you want to use the device (first beat, controls, sequencing), open the operator handbook instead.
What you are looking at
TŒRN runs on a Teensy 4.1 as an Arduino multi-file sketch:
| Layer | Role |
|---|---|
toern.ino | Globals, mode state, setup/loop, playback timers, most interaction glue |
toern_*.ino | Focused subsystems (UI draw, menu, MIDI, samples, …) compiled into one sketch |
*.h | Shared tables (notes, colors, fonts) and the audio object graph (audioinit.h) |
src/ | Forked/custom audio code (resampler, DMA freeverb) |
Arduino concatenates all .ino files in the sketch folder; headers and src/ are normal includes/compile units.
Start here
- Architecture overview — mental model of the whole system
- File map — which file owns which concern
- Main loop — ISR vs loop work (timing-critical path)
- Modes — how encoders and screens switch behavior
- Hardware overview (rev G) — KiCad board, connectors, power
- Tools overview — sample converter, MIDI, SD tool, firmware loader, …
Explicit non-goals
- Device operation / music-making tutorials → handbook
- Step-by-step “build the kit” / faceplate tour → handbook hardware page (these docs are design/pinout oriented)
- Marketing / shop chrome → the rest of
website/(this Docusaurus app is onlywebsite/devdocs)
Where this site lives
Source: website/devdocs/ in the repo. Published at /docs/ on toern.live.
How to edit, preview, and how Netlify builds it: This docs site.