javax.sound.midi
Class Instrument

java.lang.Object
  extended by javax.sound.midi.SoundbankResource
      extended by javax.sound.midi.Instrument

public abstract class Instrument
extends SoundbankResource

The abstract base class for all MIDI instruments.

Since:
1.3

Constructor Summary
protected Instrument(Soundbank soundbank, Patch patch, String name, Class<?> dataClass)
          Create a new Instrument.
 
Method Summary
 Patch getPatch()
          Get the patch for this instrument.
 
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
 

Constructor Detail

Instrument

protected Instrument(Soundbank soundbank,
                     Patch patch,
                     String name,
                     Class<?> dataClass)
Create a new Instrument.

Parameters:
soundbank - the Soundbank containing the instrument.
patch - the patch for this instrument
name - the name of this instrument
dataClass - the class used to represent sample data for this instrument
Method Detail

getPatch

public Patch getPatch()
Get the patch for this instrument.

Returns:
the patch for this instrument