So I'll need to reserve Rx and Tx for midi, 7 inputs for the 12 rotary encoders, 3 outputs for the digital pots, 3 outputs for the LED displays (maybe I should combine the pots and LED displays on the same shift register?), I guess I really want about 20 button inputs as well (guess I could use an analog in with an R-2R ladder, or another parallel in serial out shift register). I think a master LCD display is something I'm going to have to consider too. So, quickly running out of pins, but at least I'm not doing a whole lot of processing. Guess I should consider I/O expanders too, especially if I want to try and stick to through hole packages.
to do it right you need 12 inputs for the encoders, + the tie in for second group of 12 pins over the shift register, (3 pins min, Parallel load, clock and serial in) however you can string this input string as long as you like, by using bitread and bitset/bitclear commands for fixed pins, loading in this way can happen stupidly fast, so tie on any buttons you want, just do it after the encoders so that you only need to shift in 12 bits on an interrupt (be tidy)
For your outputs do the same make the string as long as you like, you can clock things out very quickly, but equally take up at minimum 3 pins, (at 18 now, 2-13 + A0-A5, and you may want to share clocks as otherwise tying the output latch pin to clock will have your relays rattling along as the new setting gets shifted in.)
so now how to get around the button dilemma, now you realistically could just read endlessly and add a small debounce loop like the encoder, or create a latch on the input, with my device as it can be very busy crunching other things for a few hundred milliseconds at a time i came up with the little 2 transistor latch in the image below, the switch on the left is your button, and the switch on the top is an output turning on or off a 20K pullup to 5V, with the result of the latch being the point called L, when the switch pulls the transistor low, it latches its output low, until its reset by removing the lift-up and re-applying it.
as long as all your dealing with is logic inputs and outputs shift registers can be used, if you want to measure analog values, i2c port expanders might be the go, just know that i2c is much much slower than direct bit reads and writes.