subsequence.constants.instruments.gm_drums

General MIDI Level 1 drum note map.

Standard MIDI percussion assignments for channel 10 (0-indexed channel 9). These note numbers are supported by virtually all GM-compatible instruments, drum machines, and DAWs.

Two ways to use this module:

  1. As a drum_note_map - pass GM_DRUM_MAP to the drum_note_map parameter of @composition.pattern() and use human-readable names like "kick", "snare", or the numbered "kick_1" in your pattern builder calls:

    import subsequence.constants.instruments.gm_drums
    
    @composition.pattern(channel=9, length=4, drum_note_map=subsequence.constants.instruments.gm_drums.GM_DRUM_MAP)
    def drums (p):
        p.hit_steps("kick", [0, 4, 8, 12], velocity=127)
    
  2. As constants - reference note numbers directly:

    import subsequence.constants.instruments.gm_drums
    
    @composition.pattern(channel=9, length=4)
    def drums (p):
        p.hit_steps(subsequence.constants.instruments.gm_drums.KICK, [0, 4, 8, 12], velocity=127)
    

This map is the canonical GM percussion key map plus the unnumbered “primary” aliases ("kick" / "snare" / "crash" / "ride" → the _1 variant), so a pattern can use either "kick" or "kick_1". The pure, one-name-per-note spec map is always available upstream as pymididefs.drums.GM_DRUM_MAP.

Canonical source: pymididefs.