Drum Pattern Generator — Free standalone HTML tool for Hapax

Drum Pattern Generator v7.1.0 — Free standalone HTML tool for Hapax

I built a standalone HTML drum pattern generator specifically designed for the Squarp Hapax. No server, no dependencies — just open the file in your browser.

What it does:

  • Generates drum patterns across 12 styles (hypnotic, minimal, groove, tribal, hardgroove, humanized, etc.)
  • 8 configurable lanes with per-lane MIDI note and channel
  • Variation engine: base + drop, fill, buildup, break (each exportable as separate .mid)
  • Web Audio preview — hear your pattern before exporting
  • Energy arcs for multi-bar evolution (build, peak, valley, cliff, wave)
  • Groove templates (TR-909, TR-808 presets)
  • Velocity curves per lane (flat, exponential, crescendo, etc.)
  • Poly rhythm support (3:4, 5:4)

Hapax-specific features:

  • 960 PPQ, SMF 0 format — direct import into Hapax drum tracks
  • MIDI notes 36-43 consecutive — maps to Hapax Lane 1-8 automatically
  • Track name uses dot-separated lane names (Hapax popup preview on hover)
  • Per-lane MIDI channel (1-16) for routing to different outputs
  • Short filenames that fit the Hapax screen

New in v7.1.0:

  • Velocity drag editing — click + drag on active cells to adjust velocity (1-127)
  • Save/Load with auto-restore on refresh (localStorage, validated)
  • Shorter pattern names for Hapax readability

How to use:

  1. Open drum_pattern_generator.html in your browser
  2. Select style + characteristics
  3. Click GENERATE
  4. Preview with Play
  5. Download .mid files (base + variations)
  6. Copy to Hapax SD card → HAPAX/MIDI/
  7. Import: create DRUM track → hold 2ND + track → Import → set MAP TO = 36

GitHub: https://github.com/pokidokiman/drum-pattern-generator (MIT license)

Feedback welcome! Especially interested in:

  • Which styles/patterns you’d like to see added
  • Any Hapax-specific features I’m missing
  • Bug reports
  • Algorithms etc. to beef up the styles (it’s really hard to find online resources)
  • I read 16 lanes are heading up our way. So that will be interesting.

Why I built this

I can’t code myself — this was fully vibe-coded with AI. I don’t have much time between work, kids, and all that. You probably know the drill.

I get maybe 20-30 minutes a week to fiddle with my gear. The generative engines on Hapax are great, but I prefer to focus on bass and leads when I’m jamming, and tweak the drums later. Problem is, I struggle to write decent drum patterns from scratch.

So I built this tool to generate Hapax-ready drum patterns that I can import, then tweak from there. It works for me. Maybe it works for you too.

Have fun with it.

8 Likes

Nice job!

One obvious issue - we can remove the trigs, but we can’t add them back.

One idea - the random generator of variations could remember something like last 5-10 variations, so we can listen a few and then export or two we like the most.

Also maybe add additional preview kits? I mean that perc sound should be illegal :smiley:

Thank you for the feedback, i made some adjustments :slight_smile:

Super fun, thank you! :star_struck: BPM outside of 120-155 would be really helpful.

Thanks! BPM range adjusted.