Skip to content

5of12/PocketOperations

Repository files navigation

Pocket Operations

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

🌲 Built with gratitude 📘 Buy the orignal book, and/or Donate to Tree Trust! 🌳

If you've enjoyed this code/site, please consider buying Paul's Pocket Operations book or donating to the Tree Trust charity

Features

  • 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 .midi file
  • Edit steps, add instruments, and save custom patterns in local storage
  • Use the app with keyboard navigation, screen readers, and optional spoken feedback

Local development

npm install
npm run dev

Open the local Vite URL shown in the terminal.

Recording to OP-XY

Web MIDI support is required for device output. In practice that means using a recent Chromium-based browser.

  1. Open the app and enable audio.
  2. Click Enable MIDI.
  3. Select your OP-XY from MIDI Out.
  4. Set the channel, tempo, swing, and recording length.
  5. Click Record to Device.

The app sends tempo information for OP-XY and then plays the selected pattern for the chosen step length.

Exporting MIDI

Click Export MIDI to download one loop of the selected pattern as a .midi file using the current BPM.

Keyboard shortcuts

  • Space: play/pause
  • S: stop
  • T: tap tempo
  • ↑/↓: tempo +/- 1 BPM
  • Shift + ↑/↓: tempo +/- 5 BPM
  • E: toggle edit mode
  • R: revert edits

Production build

npm run build
npm run preview

GitHub Pages

The repo includes a GitHub Pages workflow at .github/workflows/deploy.yml.

  • Push to main to trigger a deploy
  • The workflow builds dist/ and publishes it with GitHub Pages Actions
  • Vite reads BASE_PATH during CI so asset URLs are generated for the repository path automatically

Acknowledgements and Tree Trust 🌲

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.

Notes

  • Saved custom patterns are stored in browser local storage.
  • The internal drum engine is synthesized, so no sample pack is required.

About

Pocket Operations WebAudio/WebMIDI port of Paul Wenzel's amazing book

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors