openpiano.midi
Class MidiInput

java.lang.Object
  extended by openpiano.midi.MidiInput
All Implemented Interfaces:
Receiver

public class MidiInput
extends Object
implements Receiver

The MidiInput class receives events from a selected MIDI in port

Version:
1.0, 07/30/08
Author:
Sascha Westermann

Constructor Summary
MidiInput(Controller controller, MidiDevice.Info midiDevice)
          Constructs a new Receiver from a MIDI in port
 
Method Summary
 void close()
          Closes the receiver
 void send(MidiMessage midiMessage, long timeStamp)
          Sends a MIDI command to the main controller
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MidiInput

public MidiInput(Controller controller,
                 MidiDevice.Info midiDevice)
Constructs a new Receiver from a MIDI in port

Parameters:
controller - the main controller of the application
midiDevice - the MIDI in port
Method Detail

close

public void close()
Closes the receiver

Specified by:
close in interface Receiver

send

public void send(MidiMessage midiMessage,
                 long timeStamp)
Sends a MIDI command to the main controller

Specified by:
send in interface Receiver
Parameters:
midiMessage - the MIDI command
timeStamp - the time stamp of the MIDI command