Package org.jjazz.midi.api.synths
Enum Class Family
- All Implemented Interfaces:
Serializable
,Comparable<Family>
,Constable
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.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescription -
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
couldBeDrums
(String patchName) Try to guess if patchName represents a drums/percussio patch.int
The GM1 ProgramChange of the first instrument which belongs to this family.A 5 chars max. string.static Family
guessFamily
(String patchName) Try to guess the family from patchName.toString()
static Family
Returns the enum constant of this class with the specified name.static Family[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class java.lang.Enum
compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, valueOf
-
Enum Constant Details
-
Piano
-
Chromatic_Percussion
-
Organ
-
Guitar
-
Bass
-
Strings
-
Ensemble
-
Brass
-
Reed
-
Pipe
-
Synth_Lead
-
Synth_Pad
-
Synth_Effects
-
Ethnic
-
Percussive
-
Sound_Effects
-
-
Method Details
-
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
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 nameNullPointerException
- if the argument is null
-
getShortName
A 5 chars max. string.- Returns:
-
toString
-
getFirstProgramChange
public int getFirstProgramChange()The GM1 ProgramChange of the first instrument which belongs to this family.- Returns:
-
guessFamily
Try to guess the family from patchName.E.g. if patchName contains "piano", family is Piano.
- Parameters:
patchName
-- Returns:
-
couldBeDrums
Try to guess if patchName represents a drums/percussio patch.- Parameters:
patchName
-- Returns:
-