feat: enable controller setting on MIDI#13045
Conversation
|
How exactly can we test? |
|
It can be tested by adding settings definition and querying them from the engine like for the S4 MK3 |
|
So they do go to the xml? (to create the settings GUI) |
|
Yes, that's right. The setting definition still goes in XML. The thing that was dropped is conditional mapping definition in XML |
|
Haha, easy one : ) |
|
I added the S4 Mk3 snip to a VirMIDI mapping and there seems to be an issue with the checkbox labal and rich text: Seems this is not based on main? |
|
Btw I think we should add a 'button' style for the label strings, so that the mapping only contains Any other style templates that would simplify the xml strings? |
|
I.e. I consider this ready to go if rebased onto main for easy testing. |
Swiftb0y
left a comment
There was a problem hiding this comment.
Code LGTM ;)
Didn't do any testing. I may find some time to test this out with some of my mappings.
:hwbtn: |
4fd2de6 to
c47c7d2
Compare
|
Merge? |
|
Sorry, I only checked the GUI so far, not the actual settings (I expect that to work, though someone should check it). |
|
I will check this on Monday. I need to set up a MIDI device first. |
JoergAtGithub
left a comment
There was a problem hiding this comment.
I just tested this with a MIDI device. The settings functionality itself works as expected, but not the Restore Defaults button. It unloads the whole mapping instead of resetting the setting values.
|
Could you share a video of the behaviour? It sound like the expected behaviour if there is no exact mapping match |
MidiRestoreDefaultsAufzeichnung.2024-04-15.233537.mp4Here the mapping files: |
|
This looks like expected behaviour when the device doesn't match 100% the mapping definition. Could you confirm the mapping combobox reset to The custom settings of the current mapping are staged for reset, but when you re-select it in the combobox, you undo the reset (as per intended). If you want to reset the setting, you should:
Then reselecting the mapping will use the default values. I guess we could change this behaviour but that's out of scope for this PR. If you think the flow should be different, could you create an issue detailing specifically behaviours for different usecase? I'd be happy to address them in a separate PR. |
Yes, can confirm it's exactly the behavior you described for a device that doesn't match 100% the mapping definition. But matching can't be true for a MIDI device due to: mixxx/src/controllers/midi/midicontroller.cpp Lines 73 to 78 in 435da25 Therefor this PR is correct and the controller ettings code will work as soon as MidiController::matchMapping get implemented. The behavior without MidiController::matchMapping implemented is safe and just a UI glitch. |
|
Thank you! |



The original plan was to also support settings when parsing the XML mapping definition, thus why a follow up PR was dedicated for this feature.
As the latter is likely not happening, this PR exposes the settings in the JS engine only.
I don't have a MIDI controller available for testing yet, can anyone give it a go please?