Advice on writing a patch to program LED triggers via MIDI

I want to write a Max patch to assist in writing MIDI triggers for LED lights.
Say there is an array of LEDs, each assigned to a MIDI note. I’d like to be able to click on an image representing how the lights are arranged and then convert that into MIDI notes. Looking for suggestions on the best method of doing this.

For example imagine LEDs on a stage like this:
x x x x x
x x x x
x x x
x x
x
Numbered 1-15. The patch would let me click on each LED to turn it on or off and then I’d convert that data set into MIDI notes. Was thinking maybe using matrixctrl object, but there would be active cells that would not have an LED fixture. Any other suggestions?

You could use 15 toggles.

Yeah, thought of that. Was thinking there might be something more elegant, but that’s probably the most practical.

No - not very elegant :slight_smile:

But it would work and for my limited skills with Max that’s usually what I need to aim for!

Thinking further, you could always use presentation mode and decouple the background patch processes from the user interface.

So you could use a matrixctrl or toggles or anything else that would work for controlling the leds in your patch - their layout and the fact that there may be unneccessary cells etc doesn’t really matter. These will be invisible to the end user.

Make an interface that you’ll see in presentation mode using panels/pictures/dials/ubutton or whatever else you wish to represent the on/off “buttons” and have them arranged however you want.

Then just link the “visible” on/off interface to the “invisible” control aspects.