Class: JSound::Midi::Devices::InputDevice
- Inherits:
-
JDevice
- Object
- JSound::Midi::Device
- JDevice
- JSound::Midi::Devices::InputDevice
- Defined in:
- lib/jsound/midi/devices/input_device.rb
Overview
A device that receives messages from a system MIDI input port, and passes the messages to any connected device.
Available inputs are contained in the INPUTS list in the JSound::Midi module.
Defined Under Namespace
Classes: Bridge
Instance Attribute Summary
Attributes inherited from JDevice
Instance Method Summary collapse
-
#initialize(java_device) ⇒ InputDevice
constructor
Wrap a javax.sound.midi.MidiDevice receiver to provide MIDI output.
- #output=(device) ⇒ Object
Methods inherited from JDevice
#[], #close, from_java, #inspect, #method_missing, #open, open_devices, #respond_to?, #to_s
Methods inherited from JSound::Midi::Device
#<=, #>>, #close, #message, #open, #open?, #output, #to_s, #type
Methods included from TypeFromClassName
Constructor Details
#initialize(java_device) ⇒ InputDevice
Typically you won’t instantiate these directly. Instead, find an input via the INPUTS list in the JSound::Midi module.
Wrap a javax.sound.midi.MidiDevice receiver to provide MIDI output.
16 17 18 19 20 |
# File 'lib/jsound/midi/devices/input_device.rb', line 16 def initialize(java_device) super(java_device, :input) @bridge = Bridge.new(self) java_device.transmitter.receiver = @bridge end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class JSound::Midi::Devices::JDevice
Instance Method Details
#output=(device) ⇒ Object
22 23 24 25 |
# File 'lib/jsound/midi/devices/input_device.rb', line 22 def output=(device) super @bridge.output= device end |