Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

25 lines (15 sloc) 0.492 kb
dir = File.dirname(File.expand_path(__FILE__))
$LOAD_PATH.unshift dir + '/../lib'
require 'midi-winmm'
# this program selects the first midi input and sends an inspection of the first 10 messages
# messages it receives to standard out
num_messages = 10
# MIDIWinMM::Input.all.to_s will list your midi inputs
MIDIWinMM::Input.first.open do |input|
$>.puts "send some MIDI to your input now..."
num_messages.times do
m = input.gets
$>.puts(m)
end
end
$>.puts "finished"
Jump to Line
Something went wrong with that request. Please try again.