@narayb I believe you’ve mentioned that all those press/long press values could also be set by my program occasionally. I am currently using this function to reset all LEDs to default when reloading my program like so this, so sending something to the GRID works and resets the press values.
// LEDs are numbered 9 to 12
for (int control = 9; control <= 12; control++) {
ShortMessage message = new ShortMessage();
// channel, CC number, value (0 = off)
message.setMessage(ShortMessage.CONTROL_CHANGE, 0, control, 0);
midiReceiver.send(message, -1);
}
However, when adapting this to also control the longpress values, it fails to get updated. This is with the press/longpress logic you’ve provided here. Can the longpress values not be set from the outside?
// LED values s are numbered 9 to 16
float value =127;
for (int control = 9; control <= 16; control++) {
ShortMessage message = new ShortMessage();
// channel, CC number, value (0 = off)
message.setMessage(ShortMessage.CONTROL_CHANGE, 0, control, value);
midiReceiver.send(message, -1);
}
This is Processing code, and only here to illustrate that sending a value to the short press button values works out (9 - 12 on my GRID), but doing the same for the long press button values (13 - 16 on my GRID) does not, using your (short) press / longpress logic.