-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for high-resolution Midi CCs #27
Conversation
First of all: I've added a UI checkbox, a field on |
This adds: - a `deviceCapability` for highResolution to the newer devices. - front-end UI for displaying that in edit fields - a brief explanation of what this is, within the editor.
dd65e99
to
3c3a7de
Compare
Changed the MIDI code. Now, when it sees a CC change, it checks not only if that's a CC we're interested in... but also if it's a CC 32 above a high-resolution CC we're interested in. If it is, it sets an MSB/LSB pairing. Otherwise, it just sets an LSB, and we calculate the final value from that. Interesting thought: the "send me your current state" sysex command also ought to respect hi-res. Another thing to do. I think the next step is to just write some test firmware that is always in high-resolution mode, config be damned, just to see what happens when we receive that data. |
Device "capabilites" are now either boolean - ie, not enabled or definitely enabled - or a semver string. If the latter, this indicates the firmware version from which the feature is available.
620a025
to
1fa58a3
Compare
This is what powers the instruction top right to upgrade. Because of the way things work, we can - and should - do this _per-device_. So: - each device config contains the latest semver for that device's firmware, and the URL to get it - that's what gets tested against the number transmitted over sysex. Neat.
This is feeling good: the features above summarise it all quite well. Now all that is left is "the big one": writing/reading this configuration option to/from hardware, which involves some memory map changes, and working on the serialisation code. |
Hi-res config is spread across three bytes each for USB and TRS; it's basically a 16-bit bitmask split across three 7-bit values.
This fixes an issue where, moving from high to low res, bars need recalculating. Now they don't.
Mainly snags - formatting I don't like - or copy changes, as detected by viewing the whole PR.
Basically, making the function resemble its name. I think this is an improvement, even if it's more verbose.
eaf0b92
to
a66a0e6
Compare
- MIDI stores are all now in src/lib/state/midi.svelte.ts - config is all now in src/lib/state/configuration.svelte.ts
- uses `onclick` like rest of Svelte 5 - uses children/slot rather than `label` prop.
e14ddcd
to
197c149
Compare
See #25