javax.sound.midi
public interface MidiDevice
Since: 1.3
Nested Class Summary | |
---|---|
static class | MidiDevice.Info
A MIDI device descriptor object.
|
Method Summary | |
---|---|
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.
|
Returns: the Info object describing this device
Returns: -1 or the maximum number of Receivers we can get
Returns: -1 or the maximum number of Transmitters we can get
Returns: -1 or the number of microseconds since this was opened
Returns: a MIDI IN Receiver for this device
Throws: MidiUnavailableException if we can't get a Receiver
Returns: a MIDI OUT Transmitter for this device
Throws: MidiUnavailableException if we can't get a Transmitter
Returns: true if this is open, false otherwise
Throws: MidiUnavailableException if we're not able to open for some reason