A while back, I posted about a script I wrote in Ruby to convert standard midifiles to Csound scores (http://www.csounds.com/node/87). Some people seem to have found it useful, so you might like to know that I've made a bit of an update.
The original scheme (using a 'map' text file to control the conversion) works as before, but there are a couple of added options:
In the previous version, amplitude was always in p4 and pitch in p5, but I keep coming across instruments that use the reverse convention, so this can now be selected, either globally or per instrument.
I've also come across instruments -- particularly the old DX7 simulation by Jeff Harrington and others (http://www.parnasse.com/dx72csnd.shtml) -- that use 'ihold' to maintain the decay after the score says the note has ended. Just translating all the MIDI notes into a single instrument's score events doesn't work well here; multiple sub-instruments are needed to keep things straight. So an option to specify the number of sub-instruments to be used has also been added.
I have a web page with downloadable archives (zip or tgz) here:
It requires a little 'midifile.rb' ruby library that is included in the above, but there is also http://www.goodeveca.net/midifile_rb where a complete package for that, including docs and examples, resides. You might be interested in some of the examples anyway. There are things like a midifile lister, format converters, a 'quantizer', and one to replace sustain pedal events with suitably lengthened notes.