Repository navigation
feat(firmware): add MIDI over USB-C with a separate MIDI test package - #10
Merged
Merged
Conversation
… send, settings byte, clock to delay time firmware/px_midi.h has no hardware and is tested on a PC (tests/midisim.c). px_dly_value_for_ms picks the delay TIME step nearest a time.
… pedal's changes out, MIDI page, settings in the store usb.c is unchanged. Nothing emptied its MIDI input ring, which also stalls the editor's and the installer's SysEx when it fills; px_midi_service now drains it every pass. FX held 0.8 s opens the MIDI page (channel, send, clock to delay); the settings are one byte in the preset store's header (0 = defaults, as every earlier save).
…t, docs and the hardware test plan OP_CHANNEL=midi-test builds firmware/openpocket-midi-test.bin and docs/firmware/midi-test/ with their own version and manifest; the release files and the default manifest are not touched. docs/MIDI.md (design, CC map, Bluetooth findings and future work), docs/MIDI-TEST.md (checklist for the captain), README and SOUNDS-AND-CONTROLS.
steponme82
added a commit
to steponme82/openpocket
that referenced
this pull request
Nov 6, 2026
…OME in the tuner) isod89#8. With PC7 low after the first byte the LED map lit every button on a BlackBox, and the map is the panel's order: bit 0 HOME, 1 FX, 2 AMP, 3 MOD, 4 DLY, 5 REV, 6 CAB, 7 none. firmware/px_lights.h decides the lights once per main-loop pass from the preset: AMP, MOD, DLY, REV and CAB lit while their block is on, FX while any block of the FX button's group is on (drive, SFX, synth, pitch, comp, gate, EQ: ui.h's UI_FXB, now shared with ui_fx_cycle), HOME blinking at 2 Hz while the tuner is open. On the wire a 0 lights, so the byte goes out inverted, and only when it changes (as the stock firmware). The normal firmware calls leds_init after audio_start (all off loaded, then PC7 low) and lights_update in the main loop; the update screen turns them off (px_usb.h PX_LIGHTS_OFF, from ota_show). Not in this change: a setting to switch the lights off. It belongs with the settings store isod89#10 adds. LED_BLINK (the test switch) is gone; LED_PROBE 1 still builds the LED map. tests/lightsim.c: every block alone lights its own button, all on lights the six and not HOME, HOME blinks at 2 Hz in the tuner only, bit 7 never lit, nothing written when nothing changes, lights_off, only PC5..PC8 touched. Its expected bits are the LED map's, written out again; 8 of 8 deliberate mistakes fail it. In run_tests.sh the step keeps the test's exit code (a pipe into tail would hide it). Not run on a pedal yet. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
steponme82
added a commit
to steponme82/openpocket
that referenced
this pull request
Nov 6, 2026
…OME in the tuner) isod89#8. With PC7 low after the first byte the LED map lit every button on a BlackBox, and the map is the panel's order: bit 0 HOME, 1 FX, 2 AMP, 3 MOD, 4 DLY, 5 REV, 6 CAB, 7 none. firmware/px_lights.h decides the lights once per main-loop pass from the preset: AMP, MOD, DLY, REV and CAB lit while their block is on, FX while any block of the FX button's group is on (drive, SFX, synth, pitch, comp, gate, EQ: ui.h's UI_FXB, now shared with ui_fx_cycle), HOME blinking at 2 Hz while the tuner is open. On the wire a 0 lights, so the byte goes out inverted, and only when it changes (as the stock firmware). The normal firmware calls leds_init after audio_start (all off loaded, then PC7 low) and lights_update in the main loop; the update screen turns them off (px_usb.h PX_LIGHTS_OFF, from ota_show). Not in this change: a setting to switch the lights off. It belongs with the settings store isod89#10 adds. LED_BLINK (the test switch) is gone; LED_PROBE 1 still builds the LED map. tests/lightsim.c: every block alone lights its own button, all on lights the six and not HOME, HOME blinks at 2 Hz in the tuner only, bit 7 never lit, nothing written when nothing changes, lights_off, only PC5..PC8 touched. Its expected bits are the LED map's, written out again; 8 of 8 deliberate mistakes fail it. In run_tests.sh the step keeps the test's exit code (a pipe into tail would hide it). Not run on a pedal yet. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
isod89
added a commit
that referenced
this pull request
Nov 8, 2026
…e web installer (VinSpee) Conflict: Makefile (.PHONY: package-test from #10 and flash). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LFaxqW3CpFrLCvqoteTUv9
isod89
added a commit
that referenced
this pull request
Nov 8, 2026
Conflicts: Makefile, docs/BUILDING.md, tests/run_tests.sh, tests/test_op.mjs, tools/op.mjs (the sim command beside flash and rescue), tests/edsim.c (v37's NAM slots beside the simulator's screen). edsim.c now also includes px_midi.h for ui.h's MIDI page (#10); test_sim.mjs takes the version from edsim.c instead of v36. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LFaxqW3CpFrLCvqoteTUv9
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.
This adds MIDI over USB-C. The pedal now receives Program Change and Control Change on a chosen channel, using the Control Change map documented in
docs/MIDI.md, and sends Program Change and Control Change when the preset or a knob changes. A MIDI clock sets the delay time. The channel and related settings are saved in the preset store, and a new MIDI page on the screen edits them. The update entry and the editor protocol keep working next to musical MIDI.The firmware is released as a separately labelled "MIDI TEST" package (version 37), selected with
?channel=midi-teston the installer page, so the default installer package is unchanged. TheMakefile,tools/op.mjsand CI build and upload it as its own artifact.docs/MIDI-TEST.mdis the hardware checklist, anddocs/MIDI.mdalso records why Bluetooth MIDI is deferred: the repository has no Bluetooth LE stack.The decoder, map, send logic, store and UI are covered by new host simulators (
tests/midisim.c,tests/midiio.c), and the full host test suite passes. It was proven on a real pedal over USB-C.