Package org.jjazz.midi.api
Class InstrumentMix
java.lang.Object
org.jjazz.midi.api.InstrumentMix
- All Implemented Interfaces:
Serializable
An Instrument with its InstrumentSettings.
Manage the Mute/Solo status: Mute ON turns Solo OFF and inversely.
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCreate a copy of specified InstrumentMix.InstrumentMix(Instrument instrument, InstrumentSettings settings) -
Method Summary
Modifier and TypeMethodDescriptionvoidgetAllMidiMessages(int channel) Get all the midi messages to initialize this InstrumentMix: bank/program change, volume, reverb, chorus, pan.Get the instrument.getInstrumentMidiMessages(int channel) Get only the Midi messages to be sent to initialize the instrument (patch/bank changes).booleanbooleanisMute()booleanisSolo()voidfinal voidsetInstrument(Instrument instrument) Set the instrument.final voidsetInstrumentEnabled(boolean b) Enable or disable the instrument setting.final voidsetMute(boolean mute) final voidsetSolo(boolean solo) toString()
-
Field Details
-
PROP_INSTRUMENT
- See Also:
-
PROP_INSTRUMENT_ENABLED
- See Also:
-
PROP_MUTE
- See Also:
-
PROP_SOLO
- See Also:
-
-
Constructor Details
-
InstrumentMix
-
InstrumentMix
Create a copy of specified InstrumentMix.Instrument is directly reused. InstrumentSettings are deeply copied.
- Parameters:
im-
-
-
Method Details
-
getInstrument
Get the instrument.- Returns:
- Can't be null.
-
setInstrument
Set the instrument.- Parameters:
instrument- Can't be null.
-
getSettings
- Returns:
- the settings
-
setInstrumentEnabled
public final void setInstrumentEnabled(boolean b) Enable or disable the instrument setting. -
isInstrumentEnabled
public boolean isInstrumentEnabled() -
setMute
public final void setMute(boolean mute) - Parameters:
mute- If true also switch off the Solo status
-
getAllMidiMessages
Get all the midi messages to initialize this InstrumentMix: bank/program change, volume, reverb, chorus, pan.No message returned for disabled parameters.
- Parameters:
channel-- Returns:
-
getInstrumentMidiMessages
Get only the Midi messages to be sent to initialize the instrument (patch/bank changes).If instrument is not enabled return an empty array.
- Parameters:
channel-- Returns:
-
isSolo
public boolean isSolo()- Returns:
- the solo
-
setSolo
public final void setSolo(boolean solo) - Parameters:
solo- If true also switch off the Mute status
-
toString
-
addPropertyChangeListener
-
removePropertyChangeListener
-
isMute
public boolean isMute()- Returns:
- the mute
-