Pocket Operations is a Svelte + Vite web app for sketching drum patterns in the browser, sending them to hardware over Web MIDI, and exporting the current groove as a .midi file.
This public version ships with the full built-in Pocket Operations pattern library
This site builds on the awesome original Pocket Operations Book by Paul Henzel
If you've enjoyed this code/site, please consider buying Paul's Pocket Operations book or donating to the Tree Trust charity
- Audition the full built-in Pocket Operations pattern library in the browser
- Connect an OP-XY, OP-1 Field, or other MIDI output device
- Record a pattern to the connected device at the current tempo
- Export the selected pattern as a
.midifile - Edit steps, add instruments, and save custom patterns in local storage
- Use the app with keyboard navigation, screen readers, and optional spoken feedback
npm install
npm run devOpen the local Vite URL shown in the terminal.
Web MIDI support is required for device output. In practice that means using a recent Chromium-based browser.
- Open the app and enable audio.
- Click
Enable MIDI. - Select your OP-XY from
MIDI Out. - Set the channel, tempo, swing, and recording length.
- Click
Record to Device.
The app sends tempo information for OP-XY and then plays the selected pattern for the chosen step length.
Click Export MIDI to download one loop of the selected pattern as a .midi file using the current BPM.
Space: play/pauseS: stopT: tap tempo↑/↓: tempo +/- 1 BPMShift + ↑/↓: tempo +/- 5 BPME: toggle edit modeR: revert edits
npm run build
npm run previewThe repo includes a GitHub Pages workflow at .github/workflows/deploy.yml.
- Push to
mainto trigger a deploy - The workflow builds
dist/and publishes it with GitHub Pages Actions - Vite reads
BASE_PATHduring CI so asset URLs are generated for the repository path automatically
Pocket Operations builds on the original pattern work by Paul Henzel. On March 9, 2026, Paul wrote:
"Feel free to put it up on Github Pages! If you want to link back to my site, there's a charity donation link there that I send people to. Thanks!"
With that in mind:
- 🎛️ Original author: Paul Henzel
- 🌳 Charity link: Donate to Tree Trust
- 💚 If this project helps your music-making, please consider sending a donation Tree Trust's way.
- Saved custom patterns are stored in browser local storage.
- The internal drum engine is synthesized, so no sample pack is required.