Package org.jjazz.midi.api
Interface DrumKit.KeyMap
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
KeyMapGM
,KeyMapGSGM2
,KeyMapXG
,KeyMapXG_PopLatin
- Enclosing class:
- DrumKit
Defines a key map for a drumkit: associate a percussion name to a note pitch.
36=Kick, 37=Rimshot, 38=Snare, etc.
-
Method Summary
Modifier and TypeMethodDescriptionint
The pitch corresponding to the note name.getKeyName
(int pitch) The isntrument name, eg "Kick" for the given key.getKeys
(DrumKit.Subset... subsets) Get the notes of the given subset(s).getName()
The name of the DrumKitKeyMap.getRange()
The key getRange of this KeyMap.boolean
isContaining
(DrumKit.KeyMap otherKeyMap) True if this KeyMap contains otherKeyMap.
-
Method Details
-
getRange
KeyRange getRange()The key getRange of this KeyMap.- Returns:
-
getName
String getName()The name of the DrumKitKeyMap.- Returns:
-
isContaining
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
The isntrument name, eg "Kick" for the given key.- Parameters:
pitch
-- Returns:
- Can be null if pitch is not used by this DrumKitKeyMap.
-
getKey
The pitch corresponding to the note name.- Parameters:
noteName
-- Returns:
- -1 if noteName is not used by this DrumKitKeyMap.
-
getKeys
Get the notes of the given subset(s).- Parameters:
subsets
-- Returns:
- Can be an empty list.
-