Please I need help Building a hauptwerk MIDI decoder with arduino

Hello guys,
I am in the process of building a digital organ using the amazing hauptwerk software. Typically an organ has stops that the organist pulls out or pushes in to alter the sound of the instrument. Most of this stops are made from a push-pull solenoid or they might just be the type that illuminates when engaged like what I am building.

Currently I have all the stops connected to keyers from a old casio keyboard and I use the keyboard to send out messages to haupwerk. However hauptwerk also needs to be able to send some messages back to the organ so only certain stops stay engaged.

This is where I need a MIDI decoder to interprete the mesages from hauptwerk regarding the stops to be engaged/disengaged and engage or disengage those stops on my organ. In the case of my build some stops will be illuminated while others will be off.

Please any help will be high appreciated.

When you've decoded a MIDI message from Hauptwerk, how do you then (dis)engage a stop? If it is with a MIDI message, can't you just arrange that Hauptwerk sends the required message and then, at most, Arduino just relays the message?
If you do need to do some decoding, have a look at Nick Gammon's MIDI_decoder sketch in this thread:
http://arduino.cc/forum/index.php/topic,100382.0.html
It decodes pretty well any MIDI message, but you could strip it down to decode only those you're interested in.

Pete

Thanks,
Haupwerk automatically disengages the sound of the stop, all I need is to be able to let the organist know that the sound has been dissengaged or engaged by Hauptwerk