Class InstrumentSettings

java.lang.Object
org.jjazz.midi.api.InstrumentSettings
All Implemented Interfaces:
Serializable

public class InstrumentSettings extends Object implements Serializable
The variables which impact the way an Instrument is rendered.
See Also:
  • Field Details

  • 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

      public InstrumentSettings(InstrumentSettings is)
  • Method Details

    • set

      public void set(InstrumentSettings is)
    • setContainer

      public void setContainer(InstrumentMix insMix)
    • getContainer

      public InstrumentMix getContainer()
    • getAllMidiMessages

      public MidiMessage[] getAllMidiMessages(int channel)
      Get all the MidiMessages for enabled parameters.
      Parameters:
      channel -
      Returns:
    • getVolumeMidiMessages

      public MidiMessage[] getVolumeMidiMessages(int channel)
      Get the Midi messages to be sent to initialize this parameter.

      If parameter is not enabled return an empty array.

      Parameters:
      channel -
      Returns:
    • getPanoramicMidiMessages

      public MidiMessage[] getPanoramicMidiMessages(int channel)
      Get the Midi messages to be sent to initialize this parameter.

      If parameter is not enabled return an empty array.

      Parameters:
      channel -
      Returns:
    • getReverbMidiMessages

      public MidiMessage[] getReverbMidiMessages(int channel)
      Get the Midi messages to be sent to initialize this parameter.

      If parameter is not enabled return an empty array.

      Parameters:
      channel -
      Returns:
    • getChorusMidiMessages

      public MidiMessage[] getChorusMidiMessages(int channel)
      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

      public void addPropertyChangeListener(PropertyChangeListener l)
    • removePropertyChangeListener

      public void removePropertyChangeListener(PropertyChangeListener l)
    • toString

      public String toString()
      Overrides:
      toString in class Object