src/java.desktop/share/classes/javax/sound/midi/MidiSystem.java

Print this page




  48 import com.sun.media.sound.MidiDeviceReceiverEnvelope;
  49 import com.sun.media.sound.MidiDeviceTransmitterEnvelope;
  50 import com.sun.media.sound.ReferenceCountingDevice;
  51 
  52 /**
  53  * The {@code MidiSystem} class provides access to the installed MIDI system
  54  * resources, including devices such as synthesizers, sequencers, and MIDI input
  55  * and output ports. A typical simple MIDI application might begin by invoking
  56  * one or more {@code MidiSystem} methods to learn what devices are installed
  57  * and to obtain the ones needed in that application.
  58  * <p>
  59  * The class also has methods for reading files, streams, and  URLs that contain
  60  * standard MIDI file data or soundbanks. You can query the {@code MidiSystem}
  61  * for the format of a specified MIDI file.
  62  * <p>
  63  * You cannot instantiate a {@code MidiSystem}; all the methods are static.
  64  * <p>
  65  * Properties can be used to specify default MIDI devices. Both system
  66  * properties and a properties file are considered. The "sound.properties"
  67  * properties file is read from an implementation-specific location (typically
  68  * it is the {@code lib} directory in the Java installation directory). If a
  69  * property exists both as a system property and in the properties file, the
  70  * system property takes precedence. If none is specified, a suitable default is
  71  * chosen among the available devices. The syntax of the properties file is
  72  * specified in {@link Properties#load(InputStream) Properties.load}. The
  73  * following table lists the available property keys and which methods consider
  74  * them:
  75  *
  76  * <table border=0>
  77  *  <caption>MIDI System Property Keys</caption>
  78  *  <tr>
  79  *   <th>Property Key</th>
  80  *   <th>Interface</th>
  81  *   <th>Affected Method</th>
  82  *  </tr>
  83  *  <tr>
  84  *   <td>{@code javax.sound.midi.Receiver}</td>
  85  *   <td>{@link Receiver}</td>
  86  *   <td>{@link #getReceiver}</td>
  87  *  </tr>
  88  *  <tr>




  48 import com.sun.media.sound.MidiDeviceReceiverEnvelope;
  49 import com.sun.media.sound.MidiDeviceTransmitterEnvelope;
  50 import com.sun.media.sound.ReferenceCountingDevice;
  51 
  52 /**
  53  * The {@code MidiSystem} class provides access to the installed MIDI system
  54  * resources, including devices such as synthesizers, sequencers, and MIDI input
  55  * and output ports. A typical simple MIDI application might begin by invoking
  56  * one or more {@code MidiSystem} methods to learn what devices are installed
  57  * and to obtain the ones needed in that application.
  58  * <p>
  59  * The class also has methods for reading files, streams, and  URLs that contain
  60  * standard MIDI file data or soundbanks. You can query the {@code MidiSystem}
  61  * for the format of a specified MIDI file.
  62  * <p>
  63  * You cannot instantiate a {@code MidiSystem}; all the methods are static.
  64  * <p>
  65  * Properties can be used to specify default MIDI devices. Both system
  66  * properties and a properties file are considered. The "sound.properties"
  67  * properties file is read from an implementation-specific location (typically
  68  * it is the {@code conf} directory in the Java installation directory). If a
  69  * property exists both as a system property and in the properties file, the
  70  * system property takes precedence. If none is specified, a suitable default is
  71  * chosen among the available devices. The syntax of the properties file is
  72  * specified in {@link Properties#load(InputStream) Properties.load}. The
  73  * following table lists the available property keys and which methods consider
  74  * them:
  75  *
  76  * <table border=0>
  77  *  <caption>MIDI System Property Keys</caption>
  78  *  <tr>
  79  *   <th>Property Key</th>
  80  *   <th>Interface</th>
  81  *   <th>Affected Method</th>
  82  *  </tr>
  83  *  <tr>
  84  *   <td>{@code javax.sound.midi.Receiver}</td>
  85  *   <td>{@link Receiver}</td>
  86  *   <td>{@link #getReceiver}</td>
  87  *  </tr>
  88  *  <tr>