javax.sound.midi

Interface Receiver

public interface Receiver

This interface describes the methods required by objects receiving MIDI messages.

Since: 1.3

Method Summary
voidclose()
Close this receiver, possibly freeing system resources.
voidsend(MidiMessage message, long timeStamp)
Send a MIDI message and timestamp.

Method Detail

close

public void close()
Close this receiver, possibly freeing system resources.

send

public void send(MidiMessage message, long timeStamp)
Send a MIDI message and timestamp. Some receivers don't support timestamps, in which case timeStamp should be -1.

Parameters: message the MIDI message to send timeStamp time timestamp for this message in microseconds (or -1)

Throws: IllegalStateException if the receiver is closed