See these pages:-
http://www.arduino.cc/playground/Learning/4051
http://www.thebox.myzen.co.uk/Hardware/MIDI_Footsteps.html
I have no idea what half of this code means
Time to start learning then. Extending what other people do is a good way to learn but you need to put in a bit of effort.
Basically you need to make the arrays bigger to take account of the greater number of inputs. Then you need to read those in by:-
- Setting the multiplexer select lines to the value of the input you want to read.
- Reading the value switched in.