Package org.jjazz.midi.api
Class InstrumentSettings
java.lang.Object
org.jjazz.midi.api.InstrumentSettings
- All Implemented Interfaces:
Serializable
The variables which impact the way an Instrument is rendered.
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionUse default values.InstrumentSettings(int vol, int t, int pan, int rev, int cho, int velShift) -
Method Summary
Modifier and TypeMethodDescriptionvoidgetAllMidiMessages(int channel) Get all the MidiMessages for enabled parameters.intgetChorusMidiMessages(int channel) Get the Midi messages to be sent to initialize this parameter.intgetPanoramicMidiMessages(int channel) Get the Midi messages to be sent to initialize this parameter.intgetReverbMidiMessages(int channel) Get the Midi messages to be sent to initialize this parameter.intintintgetVolumeMidiMessages(int channel) Get the Midi messages to be sent to initialize this parameter.booleanbooleanbooleanbooleanvoidvoidfinal voidsetChorus(int v) final voidsetChorusEnabled(boolean b) Enable or disable the chorus setting.voidsetContainer(InstrumentMix insMix) final voidsetPanoramic(int v) final voidsetPanoramicEnabled(boolean b) Enable or disable the panoramic setting.final voidsetReverb(int v) final voidsetReverbEnabled(boolean b) Enable or disable the reverb setting.final voidsetTransposition(int t) Set the transposition value in semi-tons.final voidsetVelocityShift(int v) Set the Midi velocity shift value.final voidsetVolume(int v) final voidsetVolumeEnabled(boolean b) Enable or disable the volume setting.toString()
-
Field Details
-
PROPERTY_TRANSPOSITION
- See Also:
-
PROPERTY_VELOCITY_SHIFT
- See Also:
-
PROPERTY_VOLUME
- See Also:
-
PROPERTY_PANORAMIC
- See Also:
-
PROPERTY_REVERB
- See Also:
-
PROPERTY_CHORUS
- See Also:
-
PROPERTY_VOLUME_ENABLED
- See Also:
-
PROPERTY_PANORAMIC_ENABLED
- See Also:
-
PROPERTY_REVERB_ENABLED
- See Also:
-
PROPERTY_CHORUS_ENABLED
- See Also:
-
-
Constructor Details
-
InstrumentSettings
public InstrumentSettings()Use default values.Pan, reverb and chorus are enabled by default. see MidiConst file.
-
InstrumentSettings
public InstrumentSettings(int vol, int t, int pan, int rev, int cho, int velShift) - Parameters:
vol- Volume (0-127)t- Transposition (-24 to +24)pan- Panoramic (0-127)rev- Reverb effect send (0-127)cho- Chorus effect send (0-127)velShift- Velocity shift (-40 to +40)
-
InstrumentSettings
-
-
Method Details
-
set
-
setContainer
-
getContainer
-
getAllMidiMessages
Get all the MidiMessages for enabled parameters.- Parameters:
channel-- Returns:
-
getVolumeMidiMessages
Get the Midi messages to be sent to initialize this parameter.If parameter is not enabled return an empty array.
- Parameters:
channel-- Returns:
-
getPanoramicMidiMessages
Get the Midi messages to be sent to initialize this parameter.If parameter is not enabled return an empty array.
- Parameters:
channel-- Returns:
-
getReverbMidiMessages
Get the Midi messages to be sent to initialize this parameter.If parameter is not enabled return an empty array.
- Parameters:
channel-- Returns:
-
getChorusMidiMessages
Get the Midi messages to be sent to initialize this parameter.If parameter is not enabled return an empty array.
- Parameters:
channel-- Returns:
-
getVolume
public int getVolume() -
setVolume
public final void setVolume(int v) -
getPanoramic
public int getPanoramic() -
setPanoramic
public final void setPanoramic(int v) -
getReverb
public int getReverb() -
setReverb
public final void setReverb(int v) -
getChorus
public int getChorus() -
setChorus
public final void setChorus(int v) -
getVelocityShift
public int getVelocityShift() -
setVelocityShift
public final void setVelocityShift(int v) Set the Midi velocity shift value.Default is 0.
- Parameters:
v- [-64;+64]
-
getTransposition
public int getTransposition() -
setTransposition
public final void setTransposition(int t) Set the transposition value in semi-tons.- Parameters:
t- [-36; +36]
-
isVolumeEnabled
public boolean isVolumeEnabled() -
setVolumeEnabled
public final void setVolumeEnabled(boolean b) Enable or disable the volume setting. -
isPanoramicEnabled
public boolean isPanoramicEnabled() -
setPanoramicEnabled
public final void setPanoramicEnabled(boolean b) Enable or disable the panoramic setting. -
isReverbEnabled
public boolean isReverbEnabled() -
setReverbEnabled
public final void setReverbEnabled(boolean b) Enable or disable the reverb setting. -
isChorusEnabled
public boolean isChorusEnabled() -
setChorusEnabled
public final void setChorusEnabled(boolean b) Enable or disable the chorus setting. -
addPropertyChangeListener
-
removePropertyChangeListener
-
toString
-