Class KeyMapXG

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

public class KeyMapXG extends Object implements DrumKit.KeyMap
The Yamaha XG standard Drum Map.

See Also:
  • Field Details

  • Method Details

    • getInstance

      public static KeyMapXG getInstance()
    • getName

      public String getName()
      Description copied from interface: DrumKit.KeyMap
      The name of the DrumKitKeyMap.
      Specified by:
      getName in interface DrumKit.KeyMap
      Returns:
    • 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:
    • getRange

      public KeyRange getRange()
      Description copied from interface: DrumKit.KeyMap
      The key getRange of this KeyMap.
      Specified by:
      getRange in interface DrumKit.KeyMap
      Returns:
    • 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.
    • toString

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

      public int getKey(String name)
      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.