Hi and welcome to the Bome community!
Well for a newbie, I’m not sure how ‘easy’ it is but I came up with the below method.
I create a bitmap of 64 two state buttons and keep track of them in two global variables ‘g0’ and ‘g1’.
Then as I push a button, I look at the bitmap and toggle it’s state. The trick here is to iterate through the bitmap every time a button is pushed to update all 64 LED states.
On project open I set all LED’s to the default ‘off state’. In this case, I’m using bright blue.
This post shows you the color map for the APC MINI MKII.
The timer ‘Matrix Timer’ looks at each bit and determines the on color and off color along with its brightness or flash state. This is done in translator 1.1. (Preset 1 translator 1)
Here are the rules of that translator. You can change the value of qq for the color and oo for the brightness (or blink)
gc=gc-1
pp=gc
// which global variable
if pp>31 then uu=g1
if pp<=31 then uu=g0
// iterate through bitmap to determine button state
tt=uu>>pp
tt=tt&1
// for colors see
// https://forum.bome.com/t/new-akai-pro-apc-mini-mk2-initial-led-mapping-summary/4752
// note off color 41 is blue
qq=41
// note on color 72=red
if tt==1 then qq=72
// intensity or blink
// bright
oo=6
// blink
if tt==1 then oo=7
oo=144|oo
For manipulating the LED state with buttons, I use translator 1.0 which basically sets or clear the bit and the runs the timer again iteration through all 64 LEDs.
Here are the rules. You probably would only need to change theses if you want different button behavior.
// only notes 0-63 which is the LED matrix
if pp>63 then exit rules, skip Outgoing Action
//which global variables
if pp<32 then uu=g0
else uu=g1
// manipulate bit
tt=uu>>pp
tt=tt&1
if tt==0 then Goto "set"
else Goto "clear"
// failsafe
exit rules, skip Outgoing Action
Label "set"
rr=1<<pp
uu=uu|rr
Goto "done"
Label "clear"
rr=1<<pp
rr=rr^-1
uu=uu&rr
Label "done"
// put back into global variable
if pp<32 then g0=uu
else g1=uu
// set iteration timer
gc=64
Note also at project initiation, the timer is set to run, so when you start up the project all buttons should be blue.
Global variables in this project are defined in the rules of translator 0.2. I like to keep track of global variable in one place.
For sending MIDI to the application, I’ve set the following MIDI through route. There is not translation here.
Here are how my aliases are set up.
You can learn more about aliases from this tutorial.
Midi input and output port selection is done at the preset level.
For more information about device selection, see this tutorial.
Attached is you project file. You should only need to change rules of translator 1.1 if you want different colors.
Also I did not set up LED control for bottom or side buttons.
APC-MINI-Toggle-Matrix-2024-10-21.bmtp (3.4 KB)
Steve Caldwell
Bome Customer Care
Also available for paid consulting services: bome@sniz.biz