Save This Page
Home » openjdk-7 » com.sun.media » sound » [javadoc | source]
com.sun.media.sound
abstract public class: ModelInstrument [javadoc | source]
java.lang.Object
   javax.sound.midi.SoundbankResource
      javax.sound.midi.Instrument
         com.sun.media.sound.ModelInstrument

Direct Known Subclasses:
    SF2Instrument, SimpleInstrument, ModelMappedInstrument, DLSInstrument

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.

Constructor:
 protected ModelInstrument(Soundbank soundbank,
    Patch patch,
    String name,
    Class<?> dataClass) 
Method from com.sun.media.sound.ModelInstrument Summary:
getChannelMixer,   getChannels,   getDirector,   getKeys,   getPatchAlias,   getPerformers
Methods from javax.sound.midi.Instrument:
getPatch
Methods from javax.sound.midi.SoundbankResource:
getData,   getDataClass,   getName,   getSoundbank
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from com.sun.media.sound.ModelInstrument Detail:
 public ModelChannelMixer getChannelMixer(MidiChannel channel,
    AudioFormat format) 
 public boolean[] getChannels() 
 public ModelDirector getDirector(ModelPerformer[] performers,
    MidiChannel channel,
    ModelDirectedPlayer player) 
 public String[] getKeys() 
 public Patch getPatchAlias() 
 public ModelPerformer[] getPerformers()