Repository navigation
v0.8.2: config files on the drive (#52) - #57
Merged
Merged
Conversation
…he drive Config files (.cnfg, ini, first line names the format) live in WAKES/CNFG/ on the drive and are read at every ON, before PRST. config/ in the repo is the built-in default every image carries; the build fails on a bad default. wakes-sp1-fresh writes both files to the drive as templates. - logs.cnfg: enabled + five categories (performance, controls, midi, usb, storage). Line by line: a bad line keeps its default and the log names it; the same key twice -> the first wins. - engines.cnfg (replaces engines.csv + engines-instructions.md): slot = engine, slots 1-24, and the file is the whole stack. The default stack is the 16 original Plaits engines; VA-VCF, phase-distortion, wave-terrain, string-machine and chiptune move out (17-24 empty for users). Engine names are hyphenated, and matching uses letters and digits only, ignoring case, so old PRST spellings still load. On the device it is all or nothing: missing, unreadable or any problem -> the built-in stack, every problem logged. The stack is in RAM (two copies, one atomic flip); ROTC and the start go to the first filled slot of the stack in use. - The log: sp1_logbuf now runs on sp1_logring, a ring with a file cursor and a STANDBY gap. With logging on, the card stays on and mounted through ON; the store thread appends category-filtered lines every 5 s and syncs. One file per session, WAKES/LOGS/NNNN.LOGS (session mod 10000; the number keeps counting in WAKES/LOGS/SESSION), the last 5 kept, 8 MB cap. A soft reset continues the same session. At shutdown the PRST save goes first, then the last flush, inside the same 4 s; the 30 s backstop never waits (rule 5a). - RAM log 96 -> 16 KB in storage builds (~80 KB freed); the fallback keeps 96. - docs/SAFETY.md rule 9: nothing configurable reaches the power path. - New host suite cnfgtest; uitest 21 and prsttest cover the stack, ROTC and the old names. Untested on hardware. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…a shutdown Two findings from Adara's hardware test (2026-10-15, 0006/0007.LOGS): - An ON with logs.cnfg `enabled = off` skipped the RAM log only up to the moment it read the file. Its later lines stayed queued and were written into the next ON's log (0007.LOGS opened with them). sp1_logring now has a `discard` state: skip drops the whole ON, the STANDBY pause drops the rest, and sp1_logbuf_file_keep() ends it when logging is on. A cnfgtest case reproduces the log. - One 8 ms reading 82 counts off on F4 (parked at 0, untouched) stopped a 3 s shutdown. 4382 logged fader snapshots show no sign of a worn F4: at the bottom of travel it is the quietest of the four. A fader now has to stay >= 80 counts from the mark on 2 valid scans in a row (SP1_TOUCH_SCANS), the buttons' own debounce. Real moves suppress 8 ms later; a lone spike is ignored. This only gates the animation; the 30 s backstop is untouched. Also: logs.cnfg says ~12 hours per 8 MB file (measured ~190 B/s), not 18. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…written config/audio.ini and config/midi.ini become config/audio.cnfg and config/midi.cnfg (first line `; Format: ini`, text rewritten for editing on the drive). They stay the built-in defaults; the build still fails on a bad default. Wakes reads WAKES/CNFG/audio.cnfg and midi.cnfg at every ON and main applies them before the MIDI reset and audio start. - Runtime settings: struct sp1_audio_cfg / sp1_midi_cfg (sp1_cnfg.h), one generated initializer each (SP1_AUDIO_CFG_DEFAULTS, SP1_MIDI_CFG_DEFAULTS). Every former SP1_MIDI_* / SP1_AUDIO_USB_* use reads the live copy (sp1_midi_set_config, sp1_audio_set_config). - The CC rule (Adara): a user line takes a default's CC (a note in the log); two user lines on one CC -> the first keeps it, the later gets none (a problem); the sustain line counts; reserved CCs and 33-63 are refused. `velocity = none` removes a binding. - Adara's ADD: a .cnfg missing from WAKES/CNFG is written with its built-in text by every image, after PRST loads. An existing file is never touched; deleting one resets it at the next ON. Fresh relies on the same path. - CNFG_READ_MAX 16 -> 64 KB (engines.cnfg was already ~16 KB). - Tests: cnfgtest sections for both readers and the CC rule; miditest switches the script at runtime. Image 513 268 B (+44 KB: the readers and the four files' text), 0 warnings. Untested on hardware. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
#52: the config files on the drive (WAKES/CNFG/: logs, engines, audio, midi, read at every ON, written with their defaults when missing), the log on the drive (WAKES/LOGS/NNNN.LOGS, last 5 sessions), the 16-engine default stack with hyphenated engine names, ROTC to the first filled slot, and the two fixes from the 2026-10-15 hardware test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Defaults (Adara): midi.cnfg ships channel omni, legato auto, portamento t9, velocity and aftertouch none, with her rewritten text; logs.cnfg ships with only `performance` on; audio.cnfg text revised. config/README.md says these are the built-in defaults, not a device's settings. Logging: every ON starts a new session and file, including STANDBY then ON while plugged in. Before the new file opens, the previous session's file gets what it still owed (lines from before the last STANDBY: closing lines, a 30 s backstop's tail, a crash kept across a soft reset) via sp1_logring_take_before_standby. Log files are named NNNN.logs. Reader: `velocity/aftertouch = none` now reads as depth 0, as gen_midi.py writes it (no audible change; the template read-back differed). Host tests: hostbuild.sh forces channel 1 / portamento 0 / velocity level for miditest's exact maths; miditest_pickup §S checks the shipped defaults as they are (incl. legato auto, untested before); cnfgtest no longer assumes all log categories on, and checks the before-STANDBY take. All 11 suites pass. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #52.
What's in it
WAKES/CNFG/holdsengines.cnfg,midi.cnfg,audio.cnfgandlogs.cnfg(ini format, commented). Wakes reads them at every ON. A missing file is written with the built-in defaults, so deleting one resets it. A line Wakes can't read keeps its default and is named in the log.config/in the repo holds the built-in defaults, and the build checks them (config/README.md).engines.cnfg: 24 slots, 16 by default (the original Plaits engines). Five engines moved out of the default stack: VA-VCF, phase distortion, wave terrain, string machine and chiptune. Empty slots are skipped. ROTC returns to the first filled slot. The file is all or nothing: any problem means the built-in stack. Engines outside the stack still load from a preset.WAKES/LOGS/NNNN.logs, one file per ON, and the last 5 are kept.logs.cnfg(onlyperformanceis on by default).docs/MIDI.mdare updated.Checks
check_imagepasses.🤖 Generated with Claude Code