Skip to main content

groovebin

A drum groove programmed for one kit plays the wrong sounds on another, a folder of thousands of patterns can only be browsed by file name, and a bassline has to be written against the drums by hand. groovebin does these jobs on the MIDI files themselves, in Python, with no DAW or plug-in installed or running.

It reads and writes Standard MIDI Files and keeps every event in them. It translates notes between instrument maps, so a groove made for one kit plays on another: General MIDI drums, Addictive Drums 2, Logic's Drum Kit Designer and its brush kits, and EZbass's keyswitches. It transforms notes by selection (velocity curves, humanize, swing, note lengths) and lays one part's feel on another. It moves a part within a key, too: stray notes onto the scale, every note a step along it, or the whole part into another key or mode. It reads a file's tempo changes, ramps included, and its key signatures, gives each note's time in seconds, and writes new tempo changes and key signatures into a copy. It indexes a folder of patterns so they can be searched by section, meter, tempo and feel, or ranked by how close their rhythm is to a groove you give it, and it strings real bars together into new phrases.

For bass, it reads the chords a bassline implies and can write their roots out as a MIDI part for another line to follow, reports how a line sits with the kick and with the chords, and writes a new line over a drum part, by rules or by picking real bars from a bass library and moving them onto your chords. On the 1,256 grooves EZbass installs, the root it reads from each bassline matches the bass note of EZbass's own chord labels on 89.7% of beats; that is one vendor's library, and other styles may read differently. It calls a chord major or minor only where the bass plays the third.

Status: alpha. Commands, the library API and the index format may change before 1.0.

Install

pip install groovebin
groovebin --version

Needs Python 3.12 or newer.

Commands

groovebin remap IN.mid --from drum-kit-designer --to addictive-drums-2 -o OUT.mid
groovebin notes IN.mid --map gm
groovebin tempo IN.mid --ramp 17-25:100-132 -o OUT.mid
groovebin transform IN.mid -o OUT.mid --preset humanize --seed 7
groovebin transform IN.mid -o OUT.mid --track 2 --map ezbass --preset change-key="E minor"
groovebin index ~/Grooves --map addictive-drums-2
groovebin search --role verse --meter 4/4 --tempo 90-110
groovebin generate --meter 4/4 --bars 16 --fills --role verse -o verse.mid
groovebin search --like 3f2a9c --beat
groovebin anchors groove.mid --map addictive-drums-2
groovebin feel programmed.mid --from played.mid --map gm -o felt.mid
groovebin roots bassline.mid --map ezbass -o roots.mid
groovebin bass --drums verse.mid --drum-map gm --chords "| Am | F G |" -o bass.mid

Usage: docs/usage.md. Python API: docs/api.md. Changes: CHANGELOG.md.

Develop

From a checkout:

bin/run setup
bin/run pytest
bin/run lint        # ruff + the pw-foundation structural gate (300 soft / 500 hard lines)

See CONTRIBUTING.md.

groovebin ships note-number tables only: no sounds, patterns or MIDI content from any vendor.

Metadata

Release files for groovebin 0.7.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for groovebin 0.7.0
File Size Uploaded Provenance
groovebin-0.7.0.tar.gz 107.3 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for groovebin 0.7.0
File Interpreter ABI Platform
groovebin-0.7.0-py3-none-any.whl Python 3 none any Details

Total release size: 232.7 kB

Release files / groovebin-0.7.0.tar.gz

Download URL groovebin-0.7.0.tar.gz
Size 107.3 kB
Tags Source
SHA-256 checksum
How to use checksums
a5f3968108fa681031a3a0921e0c4f6174d781799298167f7734fa6bbf6e74d9
BLAKE2b-256 checksum
How to use checksums
21d877a473d2eb9889c33a0725da70193b8a815d0fb7908a4ab799caae1fd6ea
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 23, 2026.

Transparency log

Release files / groovebin-0.7.0-py3-none-any.whl

Download URL groovebin-0.7.0-py3-none-any.whl
Size 125.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
03b9d3e67e5c0135dad42bf9b25c319e762496a23e795c469b025c8c973522e0
BLAKE2b-256 checksum
How to use checksums
fc068c1b97ab6218ad7ef72bb3832e77d83d3944167b34651764b201c44f17df
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 23, 2026.

Transparency log

Security for groovebin 0.7.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for groovebin-0.7.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 23, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page