Skip to main content

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

FileRole
toern_fileoperations.inoPattern/project load & save, autosave integration
toern_sample.inoSample file reads, preview, audio-safe yields
toern_sd_serial.inoUSB serial file server (list / put / get / …)
toern_helpers.inoBrowse 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.