|
|||||||||
| Home >> All >> javax >> sound >> [ midi overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
javax.sound.midi
Class MidiSystem

java.lang.Objectjavax.sound.midi.MidiSystem
- public class MidiSystem
- extends java.lang.Object
MidiSystem provides access to the computer system's MIDI resources, as well as utility routines for reading MIDI files and more.
- Since:
- 1.3
| Constructor Summary | |
private |
MidiSystem()
|
| Method Summary | |
static MidiDevice |
getMidiDevice(MidiDevice.Info info)
Get the specified MIDI device. |
static MidiDevice.Info[] |
getMidiDeviceInfo()
Get an array of all available MIDI devices. |
static MidiFileFormat |
getMidiFileFormat(java.io.File file)
Read a MidiFileFormat object from the given file. |
static MidiFileFormat |
getMidiFileFormat(java.io.InputStream stream)
Read a MidiFileFormat object from the given stream. |
static MidiFileFormat |
getMidiFileFormat(java.net.URL url)
Read a MidiFileFormat object from the given url. |
static int[] |
getMidiFileTypes()
Return an array of supported MIDI file types on this system. |
static int[] |
getMidiFileTypes(Sequence sequence)
Return an array of supported MIDI file types on this system for the given sequnce. |
static Receiver |
getReceiver()
Get the default Receiver instance. |
static Sequence |
getSequence(java.io.File file)
Read a Sequence object from the given file. |
static Sequence |
getSequence(java.io.InputStream stream)
Read a Sequence object from the given stream. |
static Sequence |
getSequence(java.net.URL url)
Read a Sequence object from the given url. |
static Sequencer |
getSequencer()
Get the default Sequencer instance. |
static Soundbank |
getSoundbank(java.io.File file)
Read a Soundbank object from the given file. |
static Soundbank |
getSoundbank(java.io.InputStream stream)
Read a Soundbank object from the given stream. |
static Soundbank |
getSoundbank(java.net.URL url)
Read a Soundbank object from the given url. |
static Synthesizer |
getSynthesizer()
Get the default Synthesizer instance. |
static Transmitter |
getTransmitter()
Get the default Transmitter instance. |
static boolean |
isFileTypeSupported(int fileType)
Return true if the system supports writing files of type fileType. |
static boolean |
isFileTypeSupported(int fileType,
Sequence sequence)
Return true if the system supports writing files of type fileType for the given sequence. |
static int |
write(Sequence in,
int fileType,
java.io.File out)
Write a sequence to a file using a specific MIDI file format. |
static int |
write(Sequence in,
int fileType,
java.io.OutputStream out)
Write a sequence to an output stream using a specific MIDI file format. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
MidiSystem
private MidiSystem()
| Method Detail |
getMidiDeviceInfo
public static MidiDevice.Info[] getMidiDeviceInfo()
- Get an array of all available MIDI devices.
getMidiDevice
public static MidiDevice getMidiDevice(MidiDevice.Info info) throws MidiUnavailableException
- Get the specified MIDI device.
getReceiver
public static Receiver getReceiver() throws MidiUnavailableException
- Get the default Receiver instance. This just picks the first one
it finds for now.
getTransmitter
public static Transmitter getTransmitter() throws MidiUnavailableException
- Get the default Transmitter instance. This just picks the first one
it finds for now.
getSynthesizer
public static Synthesizer getSynthesizer() throws MidiUnavailableException
- Get the default Synthesizer instance. This just picks the first one
it finds for now.
getSequencer
public static Sequencer getSequencer() throws MidiUnavailableException
- Get the default Sequencer instance. This just picks the first one
it finds for now.
getSoundbank
public static Soundbank getSoundbank(java.io.InputStream stream) throws InvalidMidiDataException, java.io.IOException
- Read a Soundbank object from the given stream.
getSoundbank
public static Soundbank getSoundbank(java.net.URL url) throws InvalidMidiDataException, java.io.IOException
- Read a Soundbank object from the given url.
getSoundbank
public static Soundbank getSoundbank(java.io.File file) throws InvalidMidiDataException, java.io.IOException
- Read a Soundbank object from the given file.
getMidiFileFormat
public static MidiFileFormat getMidiFileFormat(java.io.InputStream stream) throws InvalidMidiDataException, java.io.IOException
- Read a MidiFileFormat object from the given stream.
getMidiFileFormat
public static MidiFileFormat getMidiFileFormat(java.net.URL url) throws InvalidMidiDataException, java.io.IOException
- Read a MidiFileFormat object from the given url.
getMidiFileFormat
public static MidiFileFormat getMidiFileFormat(java.io.File file) throws InvalidMidiDataException, java.io.IOException
- Read a MidiFileFormat object from the given file.
getSequence
public static Sequence getSequence(java.io.InputStream stream) throws InvalidMidiDataException, java.io.IOException
- Read a Sequence object from the given stream.
getSequence
public static Sequence getSequence(java.net.URL url) throws InvalidMidiDataException, java.io.IOException
- Read a Sequence object from the given url.
getSequence
public static Sequence getSequence(java.io.File file) throws InvalidMidiDataException, java.io.IOException
- Read a Sequence object from the given file.
getMidiFileTypes
public static int[] getMidiFileTypes()
- Return an array of supported MIDI file types on this system.
isFileTypeSupported
public static boolean isFileTypeSupported(int fileType)
- Return true if the system supports writing files of type fileType.
getMidiFileTypes
public static int[] getMidiFileTypes(Sequence sequence)
- Return an array of supported MIDI file types on this system
for the given sequnce.
isFileTypeSupported
public static boolean isFileTypeSupported(int fileType,
Sequence sequence)
- Return true if the system supports writing files of type fileType
for the given sequence.
write
public static int write(Sequence in, int fileType, java.io.OutputStream out) throws java.io.IOException
- Write a sequence to an output stream using a specific MIDI file format.
write
public static int write(Sequence in, int fileType, java.io.File out) throws java.io.IOException
- Write a sequence to a file using a specific MIDI file format.
|
|||||||||
| Home >> All >> javax >> sound >> [ midi overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
javax.sound.midi.MidiSystem