From c07c989770e8543e21245fd1431877670d3432ca Mon Sep 17 00:00:00 2001 From: japalie Date: Tue, 8 Aug 2023 16:33:01 +0200 Subject: [PATCH] Update Launchpad-Mini-mk3.js Added Color by Index funtion and index list for SetColor function. May it will help you :) --- Launchpad-Mini-mk3.js | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/Launchpad-Mini-mk3.js b/Launchpad-Mini-mk3.js index 2ba3a0f..e2e804f 100644 --- a/Launchpad-Mini-mk3.js +++ b/Launchpad-Mini-mk3.js @@ -136,6 +136,22 @@ function setColorByNote(note, color, pulsing) script.log("Set Button with Note "+note+" to color "); //TODO } + +function setPadColor(id, color, pulsing) +{ + var note = buttonNotes[id[0]][id[1]]; + setColorByNote(note, color, pulsing); +} + + +function setColorByIndex(x, y, color, pulsing) +{ + var note = buttonNotes[y][x]; + setColorByNote(note, color, pulsing); +} + + + // ---- Module Common Functions ---- function init() @@ -329,4 +345,4 @@ function ccEvent(channel, note, value) function sysExEvent(data) { script.log("Sysex Message received, "+data.length+" bytes :"); -} \ No newline at end of file +}