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
-
Constructor Summary
ConstructorDescriptionUse default values.InstrumentSettings
(int vol, int t, int pan, int rev, int cho, int velShift) -
Method Summary
Modifier and TypeMethodDescriptionvoid
getAllMidiMessages
(int channel) Get all the MidiMessages for enabled parameters.int
getChorusMidiMessages
(int channel) Get the Midi messages to be sent to initialize this parameter.int
getPanoramicMidiMessages
(int channel) Get the Midi messages to be sent to initialize this parameter.int
getReverbMidiMessages
(int channel) Get the Midi messages to be sent to initialize this parameter.int
int
int
getVolumeMidiMessages
(int channel) Get the Midi messages to be sent to initialize this parameter.boolean
boolean
boolean
boolean
void
void
final void
setChorus
(int v) final void
setChorusEnabled
(boolean b) Enable or disable the chorus setting.void
setContainer
(InstrumentMix insMix) final void
setPanoramic
(int v) final void
setPanoramicEnabled
(boolean b) Enable or disable the panoramic setting.final void
setReverb
(int v) final void
setReverbEnabled
(boolean b) Enable or disable the reverb setting.final void
setTransposition
(int t) Set the transposition value in semi-tons.final void
setVelocityShift
(int v) Set the Midi velocity shift value.final void
setVolume
(int v) final void
setVolumeEnabled
(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
-