public class MidiReader extends Object implements Runnable, Closeable
MidiReader listens to all events of the Launchpad and sends the
information to all registered LaunchpadHandlers.| Constructor and Description |
|---|
MidiReader(RandomAccessFile device)
Create a
MidiReader with the RandomAccessFile to the
midi-device. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
addHandler(LaunchpadHandler handler)
Add a
LaunchpadHandler to the MidiReader to be informed
of any events from the Launchpad. |
void |
close() |
boolean |
removeHandler(LaunchpadHandler handler)
Remove a
LaunchpadHandler to not be informed any more of any
events from the Launchpad. |
void |
run()
Run the
MidiReader-Thread to read events of the Launchpad. |
public MidiReader(RandomAccessFile device)
MidiReader with the RandomAccessFile to the
midi-device.device - RandomAccessFile to the midi-device of the Launchpad.public boolean addHandler(LaunchpadHandler handler)
LaunchpadHandler to the MidiReader to be informed
of any events from the Launchpad.handler - The LaunchpadHandler to be added.LaunchpadHandler was not already available.public boolean removeHandler(LaunchpadHandler handler)
LaunchpadHandler to not be informed any more of any
events from the Launchpad.handler - The LaunchpadHandler to be removed.LaunchpadHandler was present.public void run()
MidiReader-Thread to read events of the Launchpad.public void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionCopyright © 2016. All Rights Reserved.