net.charlesames.music.midi
Enum GeneralMidiPercussionSound

java.lang.Object
  extended by java.lang.Enum<GeneralMidiPercussionSound>
      extended by net.charlesames.music.midi.GeneralMidiPercussionSound
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<GeneralMidiPercussionSound>

public enum GeneralMidiPercussionSound
extends java.lang.Enum<GeneralMidiPercussionSound>

General MIDI percussion sound definitions. Each sound is uniquely associated with a key number, where key number 60 is middle C.

Author:
Charles Ames

Enum Constant Summary
AGOGO_HIGH
           
AGOGO_LOW
           
BASS_DRUM1
           
BASS_DRUM2
           
BONGO_HIGH
           
BONGO_LOW
           
CABASA
           
CLAVES
           
CONGA_HIGH_MUTE
           
CONGA_HIGH_OPEN
           
CONGA_LOW
           
COWBELL
           
CUICA_MUTE
           
CUICA_OPEN
           
CYMBAL_CHINESE
           
CYMBAL_CRASH1
           
CYMBAL_CRASH2
           
CYMBAL_RIDE_BELL
           
CYMBAL_RIDE1
           
CYMBAL_RIDE2
           
CYMBAL_SPLASH
           
GUIRO_LONG
           
GUIRO_SHORT
           
HAND_CLAP
           
HI_HAT_CLOSED
           
HI_HAT_OPEN
           
HI_HAT_PEDAL
           
MARACAS
           
SNARE_DRUM1
           
SNARE_DRUM2
           
STICK_SIDE
           
TAMBORINE
           
TIMBALE_HIGH
           
TIMBALE_LOW
           
TOM_HIGH1
           
TOM_HIGH2
           
TOM_LOW1
           
TOM_LOW2
           
TOM_MID1
           
TOM_MID2
           
TRIANGLE_MUTE
           
TRIANGLE_OPEN
           
VIBRA_SLAP
           
WHISTLE_LONG
           
WHISTLE_SHORT
           
WOODBLOCK_HIGH
           
WOODBLOCK_LOW
           
 
Method Summary
 java.lang.String getDescription()
          Get the sound description.
 int getKeyNumber()
          Get the key number.
static GeneralMidiPercussionSound valueFromDescription(java.lang.String description)
          Get the GeneralMidiPercussionSound instance associated with the indicated description.
static GeneralMidiPercussionSound valueOf(int keyNumber)
          Get the GeneralMidiPercussionSound instance associated with the indicated key number.
static GeneralMidiPercussionSound valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static GeneralMidiPercussionSound[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
static java.util.SortedMap<java.lang.String,GeneralMidiPercussionSound> valuesByDescription()
          Get the collection of indications.
static java.util.SortedMap<java.lang.String,GeneralMidiPercussionSound> valuesByName()
          Get the collection of indications.
 
Methods inherited from class java.lang.Enum
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

BASS_DRUM2

public static final GeneralMidiPercussionSound BASS_DRUM2

BASS_DRUM1

public static final GeneralMidiPercussionSound BASS_DRUM1

STICK_SIDE

public static final GeneralMidiPercussionSound STICK_SIDE

SNARE_DRUM1

public static final GeneralMidiPercussionSound SNARE_DRUM1

HAND_CLAP

public static final GeneralMidiPercussionSound HAND_CLAP

SNARE_DRUM2

public static final GeneralMidiPercussionSound SNARE_DRUM2

TOM_LOW2

public static final GeneralMidiPercussionSound TOM_LOW2

HI_HAT_CLOSED

public static final GeneralMidiPercussionSound HI_HAT_CLOSED

TOM_LOW1

public static final GeneralMidiPercussionSound TOM_LOW1

HI_HAT_PEDAL

public static final GeneralMidiPercussionSound HI_HAT_PEDAL

TOM_MID2

public static final GeneralMidiPercussionSound TOM_MID2

HI_HAT_OPEN

public static final GeneralMidiPercussionSound HI_HAT_OPEN

TOM_MID1

public static final GeneralMidiPercussionSound TOM_MID1

TOM_HIGH2

public static final GeneralMidiPercussionSound TOM_HIGH2

CYMBAL_CRASH1

public static final GeneralMidiPercussionSound CYMBAL_CRASH1

TOM_HIGH1

public static final GeneralMidiPercussionSound TOM_HIGH1

CYMBAL_RIDE1

public static final GeneralMidiPercussionSound CYMBAL_RIDE1

CYMBAL_CHINESE

public static final GeneralMidiPercussionSound CYMBAL_CHINESE

CYMBAL_RIDE_BELL

public static final GeneralMidiPercussionSound CYMBAL_RIDE_BELL

TAMBORINE

public static final GeneralMidiPercussionSound TAMBORINE

CYMBAL_SPLASH

public static final GeneralMidiPercussionSound CYMBAL_SPLASH

COWBELL

public static final GeneralMidiPercussionSound COWBELL

CYMBAL_CRASH2

public static final GeneralMidiPercussionSound CYMBAL_CRASH2

VIBRA_SLAP

public static final GeneralMidiPercussionSound VIBRA_SLAP

CYMBAL_RIDE2

public static final GeneralMidiPercussionSound CYMBAL_RIDE2

BONGO_HIGH

public static final GeneralMidiPercussionSound BONGO_HIGH

BONGO_LOW

public static final GeneralMidiPercussionSound BONGO_LOW

CONGA_HIGH_MUTE

public static final GeneralMidiPercussionSound CONGA_HIGH_MUTE

CONGA_HIGH_OPEN

public static final GeneralMidiPercussionSound CONGA_HIGH_OPEN

CONGA_LOW

public static final GeneralMidiPercussionSound CONGA_LOW

TIMBALE_HIGH

public static final GeneralMidiPercussionSound TIMBALE_HIGH

TIMBALE_LOW

public static final GeneralMidiPercussionSound TIMBALE_LOW

AGOGO_HIGH

public static final GeneralMidiPercussionSound AGOGO_HIGH

AGOGO_LOW

public static final GeneralMidiPercussionSound AGOGO_LOW

CABASA

public static final GeneralMidiPercussionSound CABASA

MARACAS

public static final GeneralMidiPercussionSound MARACAS

WHISTLE_SHORT

public static final GeneralMidiPercussionSound WHISTLE_SHORT

WHISTLE_LONG

public static final GeneralMidiPercussionSound WHISTLE_LONG

GUIRO_SHORT

public static final GeneralMidiPercussionSound GUIRO_SHORT

GUIRO_LONG

public static final GeneralMidiPercussionSound GUIRO_LONG

CLAVES

public static final GeneralMidiPercussionSound CLAVES

WOODBLOCK_HIGH

public static final GeneralMidiPercussionSound WOODBLOCK_HIGH

WOODBLOCK_LOW

public static final GeneralMidiPercussionSound WOODBLOCK_LOW

CUICA_MUTE

public static final GeneralMidiPercussionSound CUICA_MUTE

CUICA_OPEN

public static final GeneralMidiPercussionSound CUICA_OPEN

TRIANGLE_MUTE

public static final GeneralMidiPercussionSound TRIANGLE_MUTE

TRIANGLE_OPEN

public static final GeneralMidiPercussionSound TRIANGLE_OPEN
Method Detail

values

public static GeneralMidiPercussionSound[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (GeneralMidiPercussionSound c : GeneralMidiPercussionSound.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static GeneralMidiPercussionSound valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

valuesByName

public static java.util.SortedMap<java.lang.String,GeneralMidiPercussionSound> valuesByName()
Get the collection of indications.

Returns:
A collection of GeneralMidiPercussionSound instances, indexed by name.

valuesByDescription

public static java.util.SortedMap<java.lang.String,GeneralMidiPercussionSound> valuesByDescription()
Get the collection of indications.

Returns:
A collection of GeneralMidiPercussionSound instances, indexed by name.

getDescription

public java.lang.String getDescription()
Get the sound description.

Returns:
The sound description.

getKeyNumber

public int getKeyNumber()
Get the key number.

Returns:
The key number.

valueOf

public static GeneralMidiPercussionSound valueOf(int keyNumber)
Get the GeneralMidiPercussionSound instance associated with the indicated key number.

Parameters:
keyNumber - The indicated key number. Ranges from 35 to 81.
Returns:
The GeneralMidiPercussionSound instance associated with the indicated key number.

valueFromDescription

public static GeneralMidiPercussionSound valueFromDescription(java.lang.String description)
Get the GeneralMidiPercussionSound instance associated with the indicated description.

Parameters:
description - The indicated description.
Returns:
The GeneralMidiPercussionSound instance associated with the indicated description.