Class KeyMapGM

java.lang.Object
org.jjazz.midi.api.keymap.KeyMapGM
All Implemented Interfaces:
Serializable, DrumKit.KeyMap

public class KeyMapGM extends Object implements DrumKit.KeyMap
The General Midi KeyMap.
See Also:
  • Field Details

  • Method Details

    • getInstance

      public static KeyMapGM getInstance()
    • getRange

      public KeyRange getRange()
      Description copied from interface: DrumKit.KeyMap
      The key getRange of this KeyMap.
      Specified by:
      getRange in interface DrumKit.KeyMap
      Returns:
    • getName

      public String getName()
      Description copied from interface: DrumKit.KeyMap
      The name of the DrumKitKeyMap.
      Specified by:
      getName in interface DrumKit.KeyMap
      Returns:
    • toString

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

      public String getKeyName(int pitch)
      Description copied from interface: DrumKit.KeyMap
      The isntrument name, eg "Kick" for the given key.
      Specified by:
      getKeyName in interface DrumKit.KeyMap
      Returns:
      Can be null if pitch is not used by this DrumKitKeyMap.
    • getKey

      public int getKey(String noteName)
      Description copied from interface: DrumKit.KeyMap
      The pitch corresponding to the note name.
      Specified by:
      getKey in interface DrumKit.KeyMap
      Returns:
      -1 if noteName is not used by this DrumKitKeyMap.
    • getKeys

      public List<Integer> getKeys(DrumKit.Subset... subsets)
      Description copied from interface: DrumKit.KeyMap
      Get the notes of the given subset(s).

      Specified by:
      getKeys in interface DrumKit.KeyMap
      Returns:
      Can be an empty list.
    • isContaining

      public boolean isContaining(DrumKit.KeyMap otherKeyMap)
      Description copied from interface: DrumKit.KeyMap
      True if this KeyMap contains otherKeyMap.

      E.g. the GM2 KeyMap contains the GM keymap (but not the other way around): a GM-keymap-based rhythm can be played on a GM2-keymap-based drums instrument. Should return true if this keymap==otherKeyMap.

      Specified by:
      isContaining in interface DrumKit.KeyMap
      Returns: