public abstract class ModelInstrument
extends javax.sound.midi.Instrument
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.
Modifier | Constructor and Description |
---|---|
protected |
ModelInstrument(javax.sound.midi.Soundbank soundbank,
javax.sound.midi.Patch patch,
java.lang.String name,
java.lang.Class<?> dataClass) |
Modifier and Type | Method and Description |
---|---|
ModelChannelMixer |
getChannelMixer(javax.sound.midi.MidiChannel channel,
javax.sound.sampled.AudioFormat format) |
boolean[] |
getChannels() |
ModelDirector |
getDirector(ModelPerformer[] performers,
javax.sound.midi.MidiChannel channel,
ModelDirectedPlayer player) |
java.lang.String[] |
getKeys() |
javax.sound.midi.Patch |
getPatchAlias() |
ModelPerformer[] |
getPerformers() |
protected ModelInstrument(javax.sound.midi.Soundbank soundbank, javax.sound.midi.Patch patch, java.lang.String name, java.lang.Class<?> dataClass)
public ModelDirector getDirector(ModelPerformer[] performers, javax.sound.midi.MidiChannel channel, ModelDirectedPlayer player)
public ModelPerformer[] getPerformers()
public ModelChannelMixer getChannelMixer(javax.sound.midi.MidiChannel channel, javax.sound.sampled.AudioFormat format)
public javax.sound.midi.Patch getPatchAlias()
public java.lang.String[] getKeys()
public boolean[] getChannels()