Coo blimey, the first bit of fun is going to be reading the .mid file, you can find hints and tips here:
All the things we're doing is essentially just passing MIDI around from one place to another, be it a serial port or a socket to another socket or serial port.
MIDI itself is a pretty straight forward thing to decode, just watch for a thing called "running status" (good article here) and also the two types of "note off" (a note on with zero velocity and a proper MIDI note off command).
That said, if you’re only triggering percussion and not "holding" a solenoid then you needn’t worry about note off messages either :)
I wish I could offer more help as it sounds like a fun project, but right now I’m up to my ears in development of our product, which we’re launching in a few weeks.
Let me know how you get on
# apt-get install alsa-utils # apt-get install libasound2-dev
I provide this documentation "as is" without warranty or guarantees of any kind. I don't provide any support on application os hardware described on these pages.
Please note that all of the software I illutstrates is Open Source so you have to check any license provided by the software authors before using it in any commercial or non-commercial product, by yourself.
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.