Program change in Modep: button vs midi behavior

I’m seeing a difference in behavior when I do a program change between using the button and sending a midi program change.

When I press the button x times, the pedalboard that is at the x-1th position in the default bank is loaded where the default bank is the bank in the 0th position in the bank list.

But, when I send the same x using midi program change on channel 15, the apparent behavior is to load the xth pedalboard in the pedalboard directory (/var/modep/pedalboards/) as sorted by alphabetical order. (Note that I changed the file /var/modep/profile5.json such that midiChannelForPedalboardsNavigation is set to 15 as I read in this forum which does seem to work).

My preference is that the midi program change behavior would be like the button behavior. Is there a way to make it so that it behaves like that?

This is the location that makes the decision which pedalboard to load:

There’s a host.py somewhere under /usr/lib in your file system, you may modify it to print out some additional information to figure out what’s going on exactly.

It seems it does have some logic for preferring the first user bank and its order, otherwise, taking all the pedalboards alphabetically. From your description, it sounds like the latter option gets picked.

For seeing any additional output you add, restart the modep-mod-ui.service and check its journal log:

sudo systemctl restart modep-mod-ui

journalctl -u modep-mod-ui