Thanks for your response - sorry to say that I don't fully understand the "Code Tags" mentioned.
The circuit is simple - a locking Footswitch is connected between pin2 & GND an LED between 12 & GND operation of the footswitch cycles the LED and sends a MIDI Control Change to a digital audio mixer where it mutes the effects (reverb) return to turn it off between songs. The sketch has to sense the state of the footswitch and send one Control Change message for each state.
If I could just get the LED to turn on when the switch is closed and then off when it is opened then my problem would be solved as it would be easy to insert the code to send the Control Change.
Its important that the Arduino doen't end up sending a stream of Control Change messages - just one to turn it on ands one to turn it off.
The problem at the moment is that the LED just stays on all the time.
I am an absolute beginner at this so apologies again if I formatted the question incorrectly.