Interface DrumKit.KeyMap

All Superinterfaces:
Serializable
All Known Implementing Classes:
KeyMapGM, KeyMapGSGM2, KeyMapXG, KeyMapXG_PopLatin
Enclosing class:
DrumKit

public static interface DrumKit.KeyMap extends Serializable
Defines a key map for a drumkit: associate a percussion name to a note pitch.

36=Kick, 37=Rimshot, 38=Snare, etc.

  • Method Details

    • getRange

      KeyRange getRange()
      The key getRange of this KeyMap.
      Returns:
    • getName

      String getName()
      The name of the DrumKitKeyMap.
      Returns:
    • isContaining

      boolean isContaining(DrumKit.KeyMap otherKeyMap)
      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.

      Parameters:
      otherKeyMap -
      Returns:
    • getKeyName

      String getKeyName(int pitch)
      The isntrument name, eg "Kick" for the given key.
      Parameters:
      pitch -
      Returns:
      Can be null if pitch is not used by this DrumKitKeyMap.
    • getKey

      int getKey(String noteName)
      The pitch corresponding to the note name.
      Parameters:
      noteName -
      Returns:
      -1 if noteName is not used by this DrumKitKeyMap.
    • getKeys

      List<Integer> getKeys(DrumKit.Subset... subsets)
      Get the notes of the given subset(s).

      Parameters:
      subsets -
      Returns:
      Can be an empty list.