Analog read from 4051 mux act strange

or, at least, I can't tell if they are because the midi massage isn't being sent).

Well I can't see where in the code it is supposed to be sent.

The code is way over complex for what you are trying to do. I can't see why you need:-

lastAnalogValue[i+j][readnum] = analogRead(i)/8;

and the like, yes record the last value sent but why in a two dimensional array, that is simply not necessary. You also need to sent the MIDI message if the value you read this time is significantly different from what you read last time.

Why not write some simple code that will output the values read to the serial port so you can look at them on the serial monitor. Only go into MIDI when you have that working.

It would also help if you posted your schematic.

You should be using an array to set your multiplexer address, not the mess you are doing.
http://www.thebox.myzen.co.uk/Tutorial/Arrays.html