JSampler
v0.8a

org.jsampler
Class MidiInstrument

java.lang.Object
  extended by org.jsampler.MidiInstrument

public class MidiInstrument
extends java.lang.Object

Represents a MIDI instrument.


Constructor Summary
MidiInstrument()
          Creates a new instance of MidiInstrument
MidiInstrument(MidiInstrumentInfo info)
          Creates a new instance of MidiInstrument.
 
Method Summary
 void addMidiInstrumentListener(MidiInstrumentListener l)
          Registers the specified listener for receiving event messages.
 boolean equals(java.lang.Object obj)
          Determines whether the specified object is of type MidiInstrument and has equal map ID, MIDI bank and MIDI program.
 MidiInstrumentInfo getInfo()
          Gets the information about this instrument.
 java.lang.String getName()
          Gets the name of this MIDI instrument.
 void removeMidiInstrumentListener(MidiInstrumentListener l)
          Removes the specified listener.
 void setInfo(MidiInstrumentInfo info)
          Sets the information about this MIDI instrument.
 void setName(java.lang.String name)
          Sets the name of this MIDI instrument.
 java.lang.String toString()
          Returns the program number and name of this instrument.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MidiInstrument

public MidiInstrument()
Creates a new instance of MidiInstrument


MidiInstrument

public MidiInstrument(MidiInstrumentInfo info)
Creates a new instance of MidiInstrument.

Parameters:
info - Provides mapping information about this instrument.
Method Detail

addMidiInstrumentListener

public void addMidiInstrumentListener(MidiInstrumentListener l)
Registers the specified listener for receiving event messages.

Parameters:
l - The MidiInstrumentListener to register.

removeMidiInstrumentListener

public void removeMidiInstrumentListener(MidiInstrumentListener l)
Removes the specified listener.

Parameters:
l - The MidiInstrumentListener to remove.

getName

public java.lang.String getName()
Gets the name of this MIDI instrument.

Returns:
The name of this MIDI instrument.

setName

public void setName(java.lang.String name)
Sets the name of this MIDI instrument.

Parameters:
name - The new name of this MIDI instrument.

getInfo

public MidiInstrumentInfo getInfo()
Gets the information about this instrument.

Returns:
The information about this instrument.

setInfo

public void setInfo(MidiInstrumentInfo info)
Sets the information about this MIDI instrument.

Parameters:
info - The new information about this MIDI instrument.

equals

public boolean equals(java.lang.Object obj)
Determines whether the specified object is of type MidiInstrument and has equal map ID, MIDI bank and MIDI program.

Overrides:
equals in class java.lang.Object
Parameters:
obj - The reference object with which to compare.
Returns:
true if the specified object is of type MidiInstrument and has equal map ID, MIDI bank and MIDI program.

toString

public java.lang.String toString()
Returns the program number and name of this instrument.

Overrides:
toString in class java.lang.Object
Returns:
The program number and name of this instrument.

JSampler
v0.8a

Copyright © 2007 Grigor Iliev. All rights reserved.