All Packages Class Hierarchy This Package Previous Next Index
Class com.nosuch.midi.Win32MidiInput
java.lang.Object
|
+----com.nosuch.midi.Win32MidiInput
- public class Win32MidiInput
- extends Object
- implements MidiInput, Runnable
Handle MIDI input.
-
Win32MidiInput()
- Constructor for using input device 0 (default)
-
Win32MidiInput(int)
- Constructor for using a particular input device.
-
Win32MidiInput(int, boolean, boolean)
- Constructor for using a particular input device.
-
close()
- Close the midi device.
-
gotByte(int)
- This is called by the MidiIinLoop() native method,
once for each received MIDI input byte.
-
open()
- Open the device.
-
reset()
- Reset the MIDI out device.
-
run()
-
-
setAction(MidiAction)
- Set the object that is invoked when MIDI messages are recognized.
-
setMerge(boolean)
- Determine whether MIDI input is automatically merged with output.
-
startRunning()
- Start the thread that grabs MIDI input.
-
stopRunning()
- Stop the input thread.
Win32MidiInput
public Win32MidiInput() throws MidiException
- Constructor for using input device 0 (default)
- Throws: MidiException
- If anything goes wrong.
Win32MidiInput
public Win32MidiInput(int id) throws MidiException
- Constructor for using a particular input device.
- Parameters:
- id - Device id.
- Throws: MidiException
- If anything goes wrong.
Win32MidiInput
public Win32MidiInput(int id,
boolean r,
boolean m) throws MidiException
- Constructor for using a particular input device.
- Parameters:
- id - Device id.
- r - If true, thread uses Windows realtime priority.
- m - If true, MIDI input is merged to MIDI output.
- Throws: MidiException
- If anything goes wrong.
setAction
public void setAction(MidiAction a)
- Set the object that is invoked when MIDI messages are recognized.
- Parameters:
- a - The MidiAction object to use.
open
public void open() throws MidiException
- Open the device.
- Throws: MidiException
- If anything goes wrong.
reset
public void reset()
- Reset the MIDI out device.
close
public synchronized void close() throws MidiException
- Close the midi device.
- Throws: MidiException
- If anything goes wrong.
startRunning
public void startRunning()
- Start the thread that grabs MIDI input.
run
public void run()
setMerge
public void setMerge(boolean b)
- Determine whether MIDI input is automatically merged with output.
- Parameters:
- b - True if MIDI input should be merged with output.
stopRunning
public void stopRunning()
- Stop the input thread.
gotByte
public void gotByte(int b)
- This is called by the MidiIinLoop() native method,
once for each received MIDI input byte.
- Parameters:
- b - The byte received.
All Packages Class Hierarchy This Package Previous Next Index