Setting and saving LED colors - APC Key25 MK2

Nice!

This helped me to get this far in the 2nd part of my project hitting another head scratcher.

Need some quick assistance once again.

In my code I am able to touch a pad change the color on the fly with knob 4(for now) and the pad color will stay that way till i tap it again changing the color back to the over all set color.

Working halfway how I want.

What I want to accomplish is change the led and have it somehow save the color of that pressed pad.

Not sure if every pad needs it own variable or not.

And my counter clockwise is stuck at 127 after i tell it to ga-1 after its condition has been met

Not sure it that’s a bug or my code.

Thank you

PAD_LED_BUTTON_TEST_KNOB4.bmtp (2.1 KB)

Hi, I moved this into a new topic.

See that attached project file.

You will indeed, need to have different global variables for all LED’s if you want to control their colors separately.

In this case, I’m just setting LED #1.

I use the global variable ‘ga’ to hold the color value of LED 1. You change the color with the turn of knob 4. It sets the value of ga and and also sends a MIDI message to change the LED.

I control the shift state with global variable ‘gb’. A value of 1 is shifted and a value of 0 is unshifted.

When holding shift while pressing up, you toggle the state of global variable ‘gc’. Then you either enable or disable the preset ‘backlight’ using perform. When backlight is ‘enabled’ it sends the note color. When it is disabled it turns the color off.

If you want to control multiple LED’s, you would need to use a timer to iterate over the whole matrix setting each LED to the desired color by looking at the global variable for that LED. My doing this is beyond the scope of free support but I’m available for paid support if you email or direct message me.

There are examples of timers setting multiple colors for the APC-MINI that you could search for on this forum. In most cases, we use an off state color and an on state color and just use those two colors. We don’t set them individually with global variables, yet bitmap the APC-MINI with two global variables allowing us to control 2-color status for all 64 LEDs with only 2 32 bit global variables. That way we can just use translator rules to determine each LED’s on or off color instead of using global variables for each LED.

I hope this makes sense.

PAD_LED_BUTTON_TEST_KNOB4-sjc.bmtp (3.5 KB)

Steve Caldwell
Bome Customer Care


Also available for paid consulting services: bome@sniz.biz