public class

SoftReceiver

extends Object
implements MidiDeviceReceiver
java.lang.Object
   ↳ com.sun.media.sound.SoftReceiver

Class Overview

Software synthesizer MIDI receiver class.

Summary

Fields
protected SoftMainMixer mainmixer
protected TreeMap<LongObject> midimessages
protected boolean open
Public Constructors
SoftReceiver(SoftSynthesizer synth)
Public Methods
void close()
Indicates that the application has finished using the receiver, and that limited resources it requires may be released or made available.
MidiDevice getMidiDevice()
Obtains the MidiDevice object associated with this Receiver.
void send(MidiMessage message, long timeStamp)
Sends a MIDI message and time-stamp to this receiver.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.sun.media.sound.MidiDeviceReceiver
From interface javax.sound.midi.Receiver

Fields

protected SoftMainMixer mainmixer

protected TreeMap<LongObject> midimessages

protected boolean open

Public Constructors

public SoftReceiver (SoftSynthesizer synth)

Public Methods

public void close ()

Indicates that the application has finished using the receiver, and that limited resources it requires may be released or made available.

If the creation of this Receiver resulted in implicitly opening the underlying device, the device is implicitly closed by this method. This is true unless the device is kept open by other Receiver or Transmitter instances that opened the device implicitly, and unless the device has been opened explicitly. If the device this Receiver is retrieved from is closed explicitly by calling MidiDevice.close, the Receiver is closed, too. For a detailed description of open/close behaviour see the class description of MidiDevice.

public MidiDevice getMidiDevice ()

Obtains the MidiDevice object associated with this Receiver.

public void send (MidiMessage message, long timeStamp)

Sends a MIDI message and time-stamp to this receiver. If time-stamping is not supported by this receiver, the time-stamp value should be -1.

Parameters
message the MIDI message to send
timeStamp the time-stamp for the message, in microseconds.