Skip to main content

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:

LayerRole
toern.inoGlobals, mode state, setup/loop, playback timers, most interaction glue
toern_*.inoFocused subsystems (UI draw, menu, MIDI, samples, …) compiled into one sketch
*.hShared 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​

  1. Architecture overview — mental model of the whole system
  2. File map — which file owns which concern
  3. Main loop — ISR vs loop work (timing-critical path)
  4. Modes — how encoders and screens switch behavior
  5. Hardware overview (rev H) — KiCad board, connectors, power
  6. 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-root devdocs/)

Where this site lives​

Source: devdocs/ in the repo. Published at docs.toern.live. How to edit and preview: This docs site.