-
Notifications
You must be signed in to change notification settings - Fork 81
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 MIDI Button actions and dec/inc trigger modes #767
base: main
Are you sure you want to change the base?
Conversation
Build for testing: |
Thanks for submitting this. Is there a specific reason that the inc/dec only looks for specific values? I don't know how MIDI emulates an encoder, but am guessing having different values enables a "listening" system to distinguish between further rotations compared to a single on-off? So, a sequence of (say) 64-63-62 would show decreasing - that kind of thing? But we don't seem to be checking the raw value at all against previous values, even though it is logged? Is this why the reset/write(0) has been added? I wonder if we ought to be registering the changes of value - as written, I'm struggling to see the difference between just registering off<64<on - am I missing something? If we do add in code to do something with the raw values, should the full range be acted upon? If not, the range should perhaps be configurable, unless there is a MIDI standard way for encoding inc/dec (I haven't looked tbh). I like to ensure we're not becoming too specific to a particular controller, but a feature like this could support the same from other devices. At some point I'll see if there is any guidance for MIDI encoders (and see what my MiniLab does)... Thanks, |
Let's start with the basics - What do we want to achieve here that is not already possible? |
Arturia encoders can be set to Absolute, Relative 1, Relative 2, Relative 3 modes. From the Minilab mkII's manual:
The encoders of AKAI Mpk Mini 3 can also be set to Relative mode, which is the same as the Arturia Relative 1 mode. The encoder doesn't send other values besides those, so a reset state (0) is necessary to prevent it from staying in INC or DEC state. And that's why the raw value was checked instead of the LOW/HIGH. It can be extended to support all 3 relative modes. |
873faa2
to
2609c55
Compare
Build for testing: |
Ok, so my view would be that we define a relatively simple behaviour in MiniDexed and then rely on the ability of a MIDI controller to be configured with a mode that supports it. I think the simplest is to follow the MIDI "standard" for on and off and relate that to being CW/CCW for an encoder - so in that world rather than OFF < 64 <= ON we would have CCW < 64 < CW so anything less than 64 decrements and 64 or above will increment (edit 64 and above is "ON" for standard buttons). I'm nervous of hard-coding in specific controller mode values - especially the 13-15/17-19 mode which are all "OFF" in normal MIDI controller terms... If we were to allow some configurability, then again I'd say keep it simple and let the user override an encoders "static" value - i.e. the centre value. That would be 64 by default which would cover both modes 1 and 2 and could be changed to 16 if mode 3 is configured. This is all assuming we don't do anything with the specific values themselves - e.g. to measure "further away from the centre" as being "it was turned faster" and could (say) inc by 2 or 10 or something - but that is probably a bit OTT for what we need. Kevin |
Agree @diyelectromusic, that'd be a clever way to do it. What worries me most is that all features made for specific hardware may ultimately break with future changes in MiniDexed as I don't have a way to retest them. |
2609c55
to
3953a3a
Compare
Ok. Customization can be done later if needed. |
Build for testing: |
...now the question... will it work? :) |
3953a3a
to
1675c70
Compare
Now, yes. |
Build for testing: |
Let's not change the defaults in |
I think yes, because empty trigger is mapped to BtnTriggerNone in CUIButton::triggerTypeFromString(). |
No description provided.