Re: Help with conditional presets #UnO2


chrisw_63
 
Edited

Hmm... it would seem that the compiler doesn't consider the commands inside the conditionals.  The easy solution is to move one or more of them outside the conditionals.  Since the PC command is common for all of them, just move that one out, after all the conditions.  Setting $miniprog to zero is great, but then you didn't use the variable in the last two PC commands, which may have left you thinking you can't move it out.  Always be consistent with the USE of your variables.  You did well naming it with what it's used for, so it helps with confusion later on when you need to change things if you stay consistent.

Since both of those zeroes represent $miniprog anyway, remove the PC command, and put one call to it just before the closing brace.  The compiler will see it and be happy.

PRESET Mini PC Up =
{
   IF $miniprog < 99
   {
    ...
   }
   ELSE IF..
   {
   ...
   }
   ELSE IF..
   {
   ...
   }
   SendMidi Minilogue ProgChange $miniprog
}

Join {uno@fcb1010.groups.io to automatically receive all group messages.