Class: JSound::Midi::Devices::Monitor

Inherits:
JSound::Midi::Device show all
Defined in:
lib/jsound/midi/devices/monitor.rb

Overview

A device that prints out all incoming MIDI message.

Instance Method Summary collapse

Methods inherited from JSound::Midi::Device

#<=, #>>, #close, #open, #open?, #output, #output=, #to_s, #type

Methods included from TypeFromClassName

included

Instance Method Details

#message(message) ⇒ Object



7
8
9
10
11
12
13
# File 'lib/jsound/midi/devices/monitor.rb', line 7

def message(message)
  source = message.source
  if source and source.respond_to? :description
    source = "#{source.description} => "
  end
  puts "#{source}#{message}"
end