heronarts / LX

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

WIP: MIDI Fighter 64 driver #69

Open raldi opened 2 years ago

raldi commented 2 years ago

The MF64 driver is intended to support two operations:

  1. Push a set of colors to the device's illuminated buttons
  2. Allow another piece of code to subscribe to button-push notifications.

The first one's working well. I'm not sure how best to implement the second one. Currently I'm just calling LX.log() instead.

jkbelcher commented 2 years ago

Hi @raldi, it's nice to see another midi controller getting spun up. I'm curious what you're using this for? We have an early model lying around and I could see it as a lighting effects controller from the dj booth.

Midi buttons of course can be mapped at runtime from the UI... the downside of custom mappings is they are one-directional, ie the lights don't change on the controller when a button is mapped. Maybe a nice implementation for a generic midi controller like this in LX would be for the surface to detect new midi mappings and then listen to the mapped parameter and sync the button's light accordingly. It would be great to have one color for parameter=off and one for parameter=on so the user can see which buttons have been mapped. The surface would still be open for generic mapping but the behavior would be two-directional. We could use that one other midi surfaces as well.

If the color syncing was handled, then linking to a button from code would be as simple as adding a mapping to the midi engine.

raldi commented 2 years ago

We just want to have patterns be able to color the buttons and then do whatever they want when they're pressed.

mcslee commented 2 years ago

Review comments aside - I do think there's a sensible use case for making a generic MidiFighter64 control surface implementation in which the big grid of buttons is a quick pattern selector on channels. e.g. each column is a channel and the light-up buttons are the patterns on that channel, and you quickly pop them to switch patterns. Same as what the APC40mk2 grid does, basically. Same could go for clip mode, use the side-button to toggle modes and have option to control either of those things fully generically in a control-surface style.