Ruby-RtMidi
Ruby wrapper for RtMidi, a cross-platform C++ library for realtime MIDI input and output.
Features:
- List MIDI I/O ports
- Send 3-byte MIDI messages to output ports
- Listen for 3-byte messages on input ports
In other words, it can handle channel messages (notes, control change, pitch bend, pressure, program), but there is no support for SySex messages yet.
Supported Platforms:
Requirements
To install, you need gcc and g++ on your PATH. Here's the recommended approach for your system:
OS X Setup
- Install XCode via the Apple AppStore.
- Open Preferences and install the "Command Line Tools" from the Downloads tab.
See this stackoverflow discussion for help.
Windows Setup
- Install MinGW (see "Looking for the latest version?" link)
- During installation, on the "Select Components" screen, install the following:
- C Compiler
- C++ Compiler
- MSYS Basic System
- MinGW Developer ToolKit
- Use the the MinGW Shell (MSYS) to install
Linux Setup (Ubuntu)
sudo apt-get install g++
sudo apt-get install jackd
sudo apt-get install libjack-dev
Installation
Assuming you have Ruby installed, and are ready to compile C++ code with gcc, this part is easy:
gem install rtmidi
Usage
See the following examples: