MIDI Communications Windows Layer

Ruby Version License

Realtime MIDI IO with Ruby for Windows.

Access the Windows Multimedia (WinMM) MIDI API with Ruby.

This library is part of a suite of Ruby libraries for MIDI:

Function Library
MIDI Events representation MIDI Events
MIDI Data parsing MIDI Parser
MIDI communication with Instruments and Control Surfaces MIDI Communications
Low level MIDI interface to MacOS MIDI Communications MacOS Layer
Low level MIDI interface to Windows MIDI Communications Windows Layer (this library)
Low level MIDI interface to Linux TO DO (by now MIDI Communications uses alsa-rawmidi)
Low level MIDI interface to JRuby TO DO (by now MIDI Communications uses midi-jruby)

You will normally reach it through MIDI Communications, which depends on it and selects it on Windows. It implements that gem's physical layer contract; anything about how ports behave is documented there, in MIDICommunications::PhysicalLayer.

Features

  • Simplified API
  • Input and output on multiple devices concurrently
  • Generalized handling of different MIDI Message types (including SysEx)
  • Timestamped input events
  • Patch MIDI via software to other programs using a loopback endpoint
  • No compiled artifact: winmm.dll is part of Windows

Runnable examples of the API are in examples/.

Status

Early. Tested on Windows 11 without external MIDI devices. Everything works against loopback ports; running it against real hardware is still pending.

Requirements

Installation

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

gem "midi-communications-windows"

Otherwise

gem install midi-communications-windows

Documentation

rdoc

Author

License

MIDI Communications Windows Layer is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. See LICENSE.

What this means for you. Composing, performing and publishing music made with MIDI Communications Windows Layer carries no obligation: the music is yours. The GPL applies to software: if you distribute a program that includes or is built on MIDI Communications Windows Layer, that program must be released under the GPL too, with its source.

Commercial license. If you need MIDI Communications Windows Layer under terms its license does not cover — for instance, inside a closed product — yeste.studio offers a commercial license. Write to [email protected].

Versions. From 1.0.0, MIDI Communications Windows Layer follows Semantic Versioning: breaking changes only come with a new major version.

MIDI Communications Windows Layer Copyright (c) 2026 yeste.studio