midilib (http://midilib.rubyforge.org) is a pure Ruby MIDI library 
useful for reading and writing standard MIDI files and manipulating 
MIDI event data. Classes include MIDI::Sequence, MIDI::Track, 
MIDI::Event, and MIDI::IO::MIDIFile and its subclasses 
MIDI::IO::SeqReader and MIDI::IO::SeqWriter.

==== Changes for 0.8.4:

* Realtime status bytes now set @is_realtime to true and return true 
when
   realtime? is called.

* All system common events now set @is_system to true and return true 
when
   system? is called, not just system exclusive events.

* Added examples/from_scratch.rb, which shows how to create a sequence
   manually.

* New MIDI::Sequence methods that turn note length names like "32nd", 
"dotted
   quarter", and "16th triplet" into delta times. See the docs below and
   MIDI::Sequence::length_to_delta, MIDI::Sequence::note_to_length, and
   MIDI::Sequence::note_to_delta.

Jim
-- 
Jim Menard, jimm / io.com, http://www.io.com/~jimm
"...it uses Smalltalk, rather than modern-day kludges such as Java, 
which
resembles a modern object-orientated environment in the way that a pub 
ashtray
resembles a cigar store."
     -- Andrew Orlowski, "Forgotten language enables nonstop gadgets", 
The Reg