com.sun.media.sound
Class ModelInstrument
java.lang.Object
javax.sound.midi.SoundbankResource
javax.sound.midi.Instrument
com.sun.media.sound.ModelInstrument
- Direct Known Subclasses:
- DLSInstrument, ModelMappedInstrument, SF2Instrument, SimpleInstrument
public abstract class ModelInstrument
- extends javax.sound.midi.Instrument
The model instrument class.
The main methods to override are:
getPerformer, getDirector, getChannelMixer.
Performers are used to define what voices which will
playback when using the instrument.
ChannelMixer is used to add channel-wide processing
on voices output or to define non-voice oriented instruments.
Director is used to change how the synthesizer
chooses what performers to play on midi events.
- Author:
- Karl Helgason
Constructor Summary |
protected |
ModelInstrument(javax.sound.midi.Soundbank soundbank,
javax.sound.midi.Patch patch,
java.lang.String name,
java.lang.Class<?> dataClass)
|
Methods inherited from class javax.sound.midi.Instrument |
getPatch |
Methods inherited from class javax.sound.midi.SoundbankResource |
getData, getDataClass, getName, getSoundbank |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ModelInstrument
protected ModelInstrument(javax.sound.midi.Soundbank soundbank,
javax.sound.midi.Patch patch,
java.lang.String name,
java.lang.Class<?> dataClass)
getDirector
public ModelDirector getDirector(ModelPerformer[] performers,
javax.sound.midi.MidiChannel channel,
ModelDirectedPlayer player)
getPerformers
public ModelPerformer[] getPerformers()
getChannelMixer
public ModelChannelMixer getChannelMixer(javax.sound.midi.MidiChannel channel,
javax.sound.sampled.AudioFormat format)
getPatchAlias
public javax.sound.midi.Patch getPatchAlias()
getKeys
public java.lang.String[] getKeys()
getChannels
public boolean[] getChannels()