MIDI to relay help... (glockenspiel pde)

I have inspected the code. Actually I'm a novice learner about this. I just want to know whether the code receives the signal of the midi for all of the 8 notes which are able to get it stirs a specific solenoid. In case you are going to use 27 solenoids, what would happen? How about adding all of the solenoids into the code? Please, if any advice for my question. I'm a bit confuse about this.