Too many if statements

Hi, how do I make this code shorter?
I plan on having 50 presets, so my current
way of doing this would get quite long

void midiSend() {
  if (subMenu == true) {
    if (subPage == 0) {
      preset = 1;
    }
    if (subPage == 1) {
      preset = 2;
    }
    if (subPage == 2) {
      preset = 3;
    }
    if (subPage == 3) {
      preset = 4;
    }
    if (subPage == 4) {
      preset = 5;
    }
    if (subPage == 5) {
      preset = 6;
    }
    MIDI.sendProgramChange (preset, channel); // preset, channel
  }
}

do all of the presets fit the pattern of "preset# = subpage# + 1"?
If so, perhaps
MIDI.sendProgramChange (subpage+1, channel); // preset, channel
would suffice?

Get rid of all ifs and replace with only:

preset = subpage + 1;
void midiSend() {
  if (subMenu && subPage < 6) {
    preset = subPage +1;
   
    MIDI.sendProgramChange (preset, channel); // preset, channel
  }
}

Last comment, at least until you reappear:
If you want more flexibility, since your page numbers seem to be a numeric sequence, you could use it as an array index; that would allow putting arbitrary preset numbers in for each subpage.
C

I haven't included code to make sure subPage is greater than -1, but since you didn't post all your code (which would show us your data-types), this may not be necessary.