I have a keyboard with a bank of LED lights that I want to use for program change events (I use program changes to move between States in Cantabile.
The behavior I’m trying to get is the following -
On song load, illuminate lights 1 to n where n = $(SongPartCount). If $(SongPartCount) = 0 then no lights should go on. The first light will have a different color (say green) from the remaining lights (say blue) to indicate that it is selected.
On pressing another button, that button is then illuminated green and the previous light turned blue and the song state gets changed.
Has anyone written anything that can do the logic needed for the “song load” part. Or knows a VST that can handle this? Essentially the logic is
for n in 1 to 9
if n <= $(SongPartCount)
light[n].color = (n == 1 ? green : blue)
else
light[n].color = off