Realtime MIDI IO for Ruby
Latest commit d4c4c29 Jan 2, 2015 @arirusso version bump
Failed to load latest commit information.
bin use full command module Sep 1, 2014
examples update comments Dec 26, 2014
lib version bump Jan 2, 2015
test minitest 5 Jan 2, 2015
Gemfile use minitest 5 Jan 2, 2015
LICENSE dates Aug 31, 2014 readme tweaks Aug 31, 2014
Rakefile better test file names Jun 8, 2013


Platform independent realtime MIDI input and output for Ruby.

Also see MicroMIDI which builds a full MIDI messaging DSL on top of this library.


  • Supports Linux, JRuby, OSX, Windows and Cygwin
  • No compilation required
  • Both input and output to and from multiple devices concurrently
  • Generalized handling of different MIDI and SysEx Message types
  • (OSX Only) Use IAC to internally route MIDI to other programs


Using Ruby 1.9.2 or JRuby 1.6.1 (or newer) is strongly recommended. JRuby should be run in 1.9 mode where applicable

UniMIDI uses one of the following libraries, depending on which platform you're using it on. The necessary library should install automatically with the unimidi gem.



If you're using Bundler, add this line to your application's Gemfile:

gem "unimidi"


gem install unimidi


Blog Posts

In addition, some examples are included with the library


UniMIDI includes a set of tests which assume that an output is connected to an input. You will be asked to select which input and output as the test is run.

The tests can be run using

rake test

See below for additional notes on testing with JRuby



Platform Specific Notes

  • You must be in 1.9 mode. This is normally accomplished by passing --1.9 to JRuby at the command line. For testing in 1.9 mode, use jruby --1.9 -S rake test
  • javax.sound has some documented issues with SysEx messages in some versions OSX Snow Leopard which do affect this library.
  • libasound and libasound-dev packages are required


Ari Russo


Apache 2.0, See the file LICENSE

Copyright (c) 2010-2014 Ari Russo