The vibe code below works to switch midi channel n from button/knob n press (for all encoders in layer), but I get errors when I want to have the led of the active midi channel always on, and the rest off.
Could anybody give a hand? Thanks
for i=0,15 do e=ele[i]
if e then
e.bc=function(s)
if (s:button_value() or 0)>0 then G=i end
return 1
end
e.ec=function(s,v)
midi_send(G,176,B+i,(v or s:encoder_value() or 0))
end
end
end```