Program change next previous

Considering I knew nothing about scripting few weeks ago (other than copy and paste LOL), I managed to write a script to change to the correct BANK and program change number. Not sure if this is the cleanest way to write this, but it works. Is there a way to do it withouth the CC and PC declarations? Anyways, its not a big deal…

AL4PC : Widget
zloop : MidiInBlock
CC : ControlChangeMessage
PC : ProgramChangeMessage

On WidgetValueChanged(newValue : double) from AL4PC
CC = MakeControlChangeMessage(0, 2)
SendNow(zloop, CC)
PC = MakeProgramChangeMessage(0) 
SendNow(zloop, PC)

What I’d like to do is create two buttons for the next and previous presets, so +1 and -1 of the existing PC position. I’m not sure if there is a “next” and “previous” PC command, or is it a “get existing PC and +/-1” type of deal or how to approach it? I know that once the above button is pressed which sends me to the correct bank, only a program change message is needed and it will move up/down in that bank. My thought was to create multiple buttons that get me into the correct banks (categories) and then use and prev/next to move through.

BTW, this is for Analog Lab 4 in case someone is familiar with how to change “concert” presets. VST3 does not accept PC messages, but VST does.

Hm, I use a dedicated rackspace setting for AnalogLab together with a KeyLab MkII just for browsing sounds. Therefore I merged the MIDI and the DAW inputs in the wiring view and can use the Arturia Keylab Navigator (which I also could map to widgets) - but that’s a different story…

In your case: set up Analog Lab to Generic 9 knobs (+9 faders) Mode and use the CCs for the up/down arrows

In the screenshot these are CC 28/29 and map these to your widgets for +/-


1 Like

Sorry, used Analog Lab V, but for Analog Lab 4 it should be quite similar:

Yesterday when I tried the PREV/NEXT didn’t work because it was moving through the regular presets and I needed it to move within the concerts presets. However, if I press the button I created that gets me in the concert, once in the concert, the PREV/NEXT moves through the concert list only. So that works nicely now! Thanks!

1 Like

Actually, i have to manually click inside the concert list once, then it stays within that list. Otherwise it’s unreliable.