heronarts / LX

Core library for 3D LED lighting engines
https://chromatik.co/
Other
41 stars 25 forks source link

MidiFighterTwister generic midi mappings is broken by relative encoders #105

Open jkbelcher opened 8 months ago

jkbelcher commented 8 months ago

When the MidiFighterTwister is used as a generic midi surface with user-created midi mappings, the encoders are still sending relative position changes which are midi values (61, 62, 63, 65, 66, or 67). The generic midi mappings are not aware of the relative encoder setting and are interpreting these as absolute midi values. Turning a mapped knob sets the target parameter to a normalized value of (usually) 63/127 or 65/127.

jkbelcher commented 8 months ago

Also: an encoder click mapped to a BooleanParameter uses absolute values which effectively treats the target as a Momentary (encoder down -> parameter on. encoder up -> parameter off) even if it is Toggle mode.

mcslee commented 8 months ago

Yeah... it's vaguely on my list, but not very high, to auto-detect these MIDI controllers that use relative MIDI values. I'm not 100% sure what best practice is on this other than just "noticing" during the mapping phase that the knob isn't sending any other values besides the relative increment/decrement values.

The clicks that use CC with value 0/127 rather than MIDI notes are kind of annoying to deal with without special-casing.

Is your use case that you want to mix-and-match control surface and manual mapping behavior on an MFT? Or just don't want to have to deal with re-configuring the MFT via its utility to work in a more sensible way for generic mapping? (e.g. absolute CC values on the encoders and MIDI notes for the pushes).

jkbelcher commented 8 months ago

Not my use case. This was passed along to me by @bbulkow. I think someone wanted to use the MFT for generic mapping without applying different settings than we've pushed to it.

jkbelcher commented 8 months ago

Given that LXMidiMapping.Note has Mode and DiscreteMode parameters, it seems comparable for LXMidiMapping.ControlChange to have an Absolute/Relative parameter. Thinking an enum since it looks like there are multiple types of relative encoders out there.

Agree the CC 0/127 seems like a special case. Although doesn't seem to be a problem to accommodate it in this first version of a CC Relative mode.

mcslee commented 8 months ago

Okay gotcha - yeah I'll eventually get to these options, but for the time being my best recommendation is "put the MFT config back onto a more basic template."