Rebuild config parsing and state ownership - #239
Open
sastraxi wants to merge 8 commits into
Open
Conversation
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 PR rebuilds the config path and the ownership of runtime state related to per-pedalboard and global hardware configuration. The old code had three faults:
How to review
Read the files in this order. The first three are new.
pistomp/config/schema_v1.pypistomp/config/adapt_v1.pypistomp/config/model.pypistomp/current.pyCurrentowns the bindings of one board.close()releases them.pistomp/controller_manager.pybind()builds the bindings and the context rows onto theCurrent.pistomp/hardware.pyreinit()applies one resolved config. It does not merge layers.pistomp/handler.pyparam.binding, then builds the board again.Changes
msgspec. One declaration gives both the Python types and the JSON schema.Hardware.reinit().Currentthe bindings of one board. The code that binds also closes.reinit()total. A control that the config does not name goes back to its base binding.idis a screen position, not a config key.id: 0in the schema.pistomp/config.pyand the string tokens that it used.docs/architecture.mdandGUIDE.md.Fixes
ParamEffectPRESS row and no CC-toggle row. When the learned row went away, the switch had no PRESS row. MIDI learn now builds the board again, so the default row comes back. This needs Broadcast MIDI unlearn to all clients mod-ui#9 to be observable.Footswitch.unbind_from_parameter()now resetstoggled.blendre-exported its submodules. This made an import cycle:pistomp.controller→pistomp.config→blend→pistomp.controller. The re-exports are gone.Files you can skip
These files have three lines or fewer of mechanical change, mostly
Token.VOLUME→ControlType.VOLUME:GUIDE.md,blend/input_controller.py,blend/snapshot.py,blend/types.py,emulator/controls.py,emulator/hardware_v2.py,modalapistomp.py,pistomp/analogmidicontrol.py,pistomp/encoder_controller.py,plugins/base.py,pyproject.toml,tests/integration/conftest.py,tests/v3/conftest.py,tests/v3/nav_helpers.py,tests/v3/test_audio_midi_panel.py,tests/v3/test_footswitch_chords.py,tests/v3/test_notes_panel.py,tests/v3/test_startup.py