SD & storage
The Micro SD card holds samples, patterns, and settings. Firmware never exposes USB mass storage; file transfer uses a serial protocol while the SD menu page is open.
Firmware pieces
| File | Role |
|---|---|
toern_fileoperations.ino | Pattern/project load & save, autosave integration |
toern_sample.ino | Sample file reads, preview, audio-safe yields |
toern_sd_serial.ino | USB serial file server (list / put / get / …) |
toern_helpers.ino | Browse list building, path helpers |
Host tools
- Browser: sdtool.tyng.app (Web Serial)
- CLI:
standalone-tools/sd-tool-standalone
Protocol details belong with those tools; the device side is sdSerialServerPoll() while Menu → ETC → SD is active.
Rules of thumb
- Don’t mount/unmount the card while powered if the firmware assumes a stable volume — users are told to insert/eject powered off.
- Autosave and settings backup should stay in
loop(), often deferred after UI. - During SD I/O with audio running, use the
sdIo*helpers so the codec keeps ticking.