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_revH) and host-side tools (sample converter, simulator, 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 H) — KiCad board, connectors, power
- Tools overview — sample converter, simulator, SD tool, firmware loader, …
Explicit non-goals
- Device operation / music-making tutorials → handbook
- How to play a TŒRN → handbook
- Marketing / shop chrome →
website/(local/deploy-only; this Docusaurus app is repo-rootdevdocs/)
Where this site lives
Source: devdocs/ in the repo. Published at docs.toern.live.
How to edit and preview: This docs site.