javax.sound.midi
public interface MidiDevice
Modifier and Type | Interface and Description |
---|---|
static class |
MidiDevice.Info
A MIDI device descriptor object.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Close this MIDI device, and release any system resources we're using.
|
MidiDevice.Info |
getDeviceInfo()
Get the Info object describing this device.
|
int |
getMaxReceivers()
The maximum number of MIDI IN connections we can get as Receivers,
or -1 if there is no maximum.
|
int |
getMaxTransmitters()
The maximum number of MIDI OUT connections we can get as Transmitters,
or -1 if there is no maximum.
|
long |
getMicrosecondPosition()
If this device supports time-stamps, then it will return the number
of microseconds since this device has been open, and -1 otherwise.
|
Receiver |
getReceiver()
Get a MIDI IN Receiver for this device.
|
Transmitter |
getTransmitter()
Get a MIDI OUT Transmitter for this device.
|
boolean |
isOpen()
Returns true if this MIDI device is open and false otherwise.
|
void |
open()
Open this MIDI device and allocate any system resource we need.
|
MidiDevice.Info getDeviceInfo()
void open() throws MidiUnavailableException
MidiUnavailableException
- if we're not able to open for some reasonvoid close()
boolean isOpen()
long getMicrosecondPosition()
int getMaxReceivers()
int getMaxTransmitters()
Receiver getReceiver() throws MidiUnavailableException
MidiUnavailableException
- if we can't get a ReceiverTransmitter getTransmitter() throws MidiUnavailableException
MidiUnavailableException
- if we can't get a Transmitter