desc:program/bank switch on load
slider1:1<1,16,1>MIDI channel
slider2:0<0,127,1>MSB
slider3:0<0,127,1>LSB
slider4:0<0,127,1>Program
slider5:0<0,1,1{no,yes}>Has Sent

@init
ext_noinit=1;
has_sent = 0;

@block
!slider5 || !has_sent ? (
  has_sent=slider5=1;
  sliderchange(slider5);
  while (
    midirecv(ts,msg1,msg23) ? midisend(ts,msg1,msg23);
  ); 
  chan = (slider1|0)-1;
  msb = slider2|0;
  lsb = slider3|0;
  midisend(0,$xB0 + chan,0 + msb*256);
  midisend(0,$xB0 + chan,32 + lsb*256);
  midisend(0,$xC0 + chan, slider4|0);
);

