Class MidiAddress

java.lang.Object
org.jjazz.midi.api.MidiAddress

public class MidiAddress extends Object
The data to select an Instrument via Midi.

This is an immutable class.

  • Constructor Details

    • MidiAddress

      public MidiAddress(int progChange, int bankMSB, int bankLSB, MidiAddress.BankSelectMethod bsMethod)
      Create a MidiAddress.
      Parameters:
      progChange - [0-127]
      bankMSB - [0-127] or -1 if undefined
      bankLSB - [0-127] or -1 if undefined
      bsMethod - null if undefined
  • Method Details

    • getBankSelectMethod

      public MidiAddress.BankSelectMethod getBankSelectMethod()
      Returns:
      Null if undefined.
    • getBankMSB

      public int getBankMSB()
      The BankSelect MSB byte (Midi CC control #0).
      Returns:
      the bankMSB [0;127] or -1 if bankMSB is undefined.
    • getBankLSB

      public int getBankLSB()
      The BankSelect LSB byte (Midi CC control #32).
      Returns:
      the bankLSB [0;-127] or -1 if bankLSB is undefined.
    • getProgramChange

      public int getProgramChange()
      Returns:
      the progChange [0-127]
    • isFullyDefined

      public boolean isFullyDefined()
      Return true if bankMSB, bankLSB and bankSelectMethod are defined consistently.

      Returns:
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object