Enum Class Family

java.lang.Object
java.lang.Enum<Family>
org.jjazz.midi.api.synths.Family
All Implemented Interfaces:
Serializable, Comparable<Family>, Constable

public enum Family extends Enum<Family>
A family of similar instruments.

Based on the GM1 Standard: the values respect the order of the GM1 instruments, each family has 8 instruments in the GM1 bank.

  • Enum Constant Details

    • Piano

      public static final Family Piano
    • Chromatic_Percussion

      public static final Family Chromatic_Percussion
    • Organ

      public static final Family Organ
    • Guitar

      public static final Family Guitar
    • Bass

      public static final Family Bass
    • Strings

      public static final Family Strings
    • Ensemble

      public static final Family Ensemble
    • Brass

      public static final Family Brass
    • Reed

      public static final Family Reed
    • Pipe

      public static final Family Pipe
    • Synth_Lead

      public static final Family Synth_Lead
    • Synth_Pad

      public static final Family Synth_Pad
    • Synth_Effects

      public static final Family Synth_Effects
    • Ethnic

      public static final Family Ethnic
    • Percussive

      public static final Family Percussive
    • Sound_Effects

      public static final Family Sound_Effects
  • Method Details

    • values

      public static Family[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static Family valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getShortName

      public String getShortName()
      A 5 chars max. string.
      Returns:
    • toString

      public String toString()
      Overrides:
      toString in class Enum<Family>
    • getFirstProgramChange

      public int getFirstProgramChange()
      The GM1 ProgramChange of the first instrument which belongs to this family.
      Returns:
    • guessFamily

      public static Family guessFamily(String patchName)
      Try to guess the family from patchName.

      E.g. if patchName contains "piano", family is Piano.

      Parameters:
      patchName -
      Returns:
    • couldBeDrums

      public static boolean couldBeDrums(String patchName)
      Try to guess if patchName represents a drums/percussio patch.
      Parameters:
      patchName -
      Returns: