public class MidiManager
extends java.lang.Object
Constructor and Description |
---|
MidiManager()
Create a new MidiManager with defaults
|
MidiManager(MidiProperties props)
Construct with the specified properties and open it.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
todo
|
static javax.sound.midi.Instrument[] |
getInstrumentList()
Get the list of instruments
|
void |
open()
Open up the midi system
|
void |
play(int key,
long milliseconds)
Play.
|
void |
setInstrument(javax.sound.midi.Instrument instrument)
Set the instrument to use
|
void |
setInstrument(int index)
Set the current instrument
|
void |
setInstrument(java.lang.String instrumentName)
Set the current instrument
|
void |
turnOffInABit(int key,
javax.sound.midi.MidiChannel channel,
int timeStamp,
long milliseconds)
Turn off in a thread
|
public MidiManager()
public MidiManager(MidiProperties props)
props
- propertiespublic void close()
public void open()
public void setInstrument(int index)
index
- index into the instrumentspublic void setInstrument(java.lang.String instrumentName)
instrumentName
- name of the instrumentpublic void setInstrument(javax.sound.midi.Instrument instrument)
instrument
- the instrumentpublic static javax.sound.midi.Instrument[] getInstrumentList()
public void play(int key, long milliseconds)
key
- key to play inmilliseconds
- length of timepublic void turnOffInABit(int key, javax.sound.midi.MidiChannel channel, int timeStamp, long milliseconds)
key
- key to play inchannel
- channel to playtimeStamp
- timestampmilliseconds
- length of time