Michael’s link to the hobbytronics website is mildly interesting until at the end it includes another link to Sparkfun’s rather good technical description of what MIDI is and how it works.
Briefly, MIDI is a serial protocol allowing messages to be sent from a digital device to a controller rather in the same way as CNC works with G-code. I think Sparkfun’s description is enough to allow an amateur to implement a MIDI controlled wotsit, not that I recommend that route except as a programming challenge or to do something special.
This table gives a flavour by listing MIDI status messages:
A basic tune can be played merely by sending sequences of “Note On” and “Note Off” messages, and these alone might be enough to work a Topsy with a basic controller that ignores everything it doesn’t need that arrives in the MIDI message stream. Thus a MIDI file containing complex sounds would still play, but without and bells or whistles! A quick read suggests playing two or more notes together, as in a chord, is done by setting channel numbers, so a DIY Topsy controller should probably support these too. Commercial MIDI works in the same way – anything the controller doesn’t understand is ignored, so don’t expect inexpensive controllers to do everything.
I guess Duncan needs a MIDI keyboard program on his PC, or – even better – a MIDI keyboard. This allows tunes to be played by the musician. Duncan also needs a MIDI decoder, that translates MIDI messages into a bank of ON/OFF switches. My first thought was DIY Arduino, but the MTP-7 device identified by Duncan looks good to me. All the hard programming is done, the electronics built, and, unlike an Arduino, which has low-power outputs, the MTP-7 can switch 35V at up to 500mA. A midi keyboard could be plugged straight into it, no need for a computer, though playing via a MIDI program on a PC would allow tunes to be recorded and edited. Only 32 outputs though – is that enough? If not the MTP-8 has 64 and the MTP-9 128 outputs.
Dave