drumscript 0.1.4__tar.gz → 0.1.6__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {drumscript-0.1.4 → drumscript-0.1.6}/DrumScript.egg-info/PKG-INFO +126 -28
- {drumscript-0.1.4 → drumscript-0.1.6}/DrumScript.egg-info/SOURCES.txt +3 -0
- {drumscript-0.1.4 → drumscript-0.1.6}/DrumScript.egg-info/requires.txt +1 -1
- {drumscript-0.1.4 → drumscript-0.1.6}/PKG-INFO +126 -28
- {drumscript-0.1.4 → drumscript-0.1.6}/README.md +124 -26
- {drumscript-0.1.4 → drumscript-0.1.6}/drumscript/__init__.py +99 -22
- drumscript-0.1.6/drumscript/datasets/base.py +17 -0
- drumscript-0.1.6/drumscript/datasets/idmt.py +243 -0
- {drumscript-0.1.4 → drumscript-0.1.6}/drumscript/main.py +18 -8
- drumscript-0.1.6/drumscript/utils/__init__.py +0 -0
- {drumscript-0.1.4 → drumscript-0.1.6}/pyproject.toml +2 -2
- {drumscript-0.1.4 → drumscript-0.1.6}/DrumScript.egg-info/dependency_links.txt +0 -0
- {drumscript-0.1.4 → drumscript-0.1.6}/DrumScript.egg-info/entry_points.txt +0 -0
- {drumscript-0.1.4 → drumscript-0.1.6}/DrumScript.egg-info/top_level.txt +0 -0
- {drumscript-0.1.4 → drumscript-0.1.6}/LICENSE +0 -0
- {drumscript-0.1.4 → drumscript-0.1.6}/MANIFEST.in +0 -0
- {drumscript-0.1.4 → drumscript-0.1.6}/drumscript/audio_processor/__init__.py +0 -0
- {drumscript-0.1.4 → drumscript-0.1.6}/drumscript/audio_processor/audio_loader.py +0 -0
- {drumscript-0.1.4 → drumscript-0.1.6}/drumscript/audio_processor/feature_extractor.py +0 -0
- {drumscript-0.1.4 → drumscript-0.1.6}/drumscript/audio_processor/onset_detector.py +0 -0
- {drumscript-0.1.4 → drumscript-0.1.6}/drumscript/audio_processor/stem_splitter.py +0 -0
- {drumscript-0.1.4 → drumscript-0.1.6}/drumscript/audio_processor/tempo_detector.py +0 -0
- {drumscript-0.1.4 → drumscript-0.1.6}/drumscript/audio_processor/tempogram.py +0 -0
- {drumscript-0.1.4/drumscript/drum_classifier → drumscript-0.1.6/drumscript/datasets}/__init__.py +0 -0
- {drumscript-0.1.4/drumscript/notation_generator → drumscript-0.1.6/drumscript/drum_classifier}/__init__.py +0 -0
- {drumscript-0.1.4 → drumscript-0.1.6}/drumscript/drum_classifier/classify.py +0 -0
- {drumscript-0.1.4/drumscript/utils → drumscript-0.1.6/drumscript/notation_generator}/__init__.py +0 -0
- {drumscript-0.1.4 → drumscript-0.1.6}/drumscript/notation_generator/constants.py +0 -0
- {drumscript-0.1.4 → drumscript-0.1.6}/drumscript/notation_generator/helpers.py +0 -0
- {drumscript-0.1.4 → drumscript-0.1.6}/drumscript/notation_generator/midi_exporter.py +0 -0
- {drumscript-0.1.4 → drumscript-0.1.6}/drumscript/notation_generator/pdf_exporter.py +0 -0
- {drumscript-0.1.4 → drumscript-0.1.6}/drumscript/notation_generator/score_builder.py +0 -0
- {drumscript-0.1.4 → drumscript-0.1.6}/drumscript/notation_generator/xml_exporter.py +0 -0
- {drumscript-0.1.4 → drumscript-0.1.6}/drumscript/utils/ffmpeg_installer.py +0 -0
- {drumscript-0.1.4 → drumscript-0.1.6}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: drumscript
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.6
|
|
4
4
|
Summary: A Python package to convert drum audio to sheet music.
|
|
5
5
|
Author-email: drumscript-admin <hello.drumscript@gmail.com>
|
|
6
6
|
License-Expression: Apache-2.0
|
|
@@ -50,10 +50,10 @@ Provides-Extra: dev
|
|
|
50
50
|
Requires-Dist: ipykernel; extra == "dev"
|
|
51
51
|
Requires-Dist: myst-parser; extra == "dev"
|
|
52
52
|
Requires-Dist: myst-nb>=1.3.0; extra == "dev"
|
|
53
|
+
Requires-Dist: mir-eval>=0.8.2; extra == "dev"
|
|
53
54
|
Requires-Dist: pytest; extra == "dev"
|
|
54
55
|
Requires-Dist: pytest-cov>=7.1.0; extra == "dev"
|
|
55
56
|
Requires-Dist: shibuya>=2025.10.21; extra == "dev"
|
|
56
|
-
Requires-Dist: fastapi>=0.128.8; extra == "dev"
|
|
57
57
|
Requires-Dist: ipywidgets>=8.1.8; extra == "dev"
|
|
58
58
|
Requires-Dist: requests>=2.32.5; extra == "dev"
|
|
59
59
|
Requires-Dist: ruff>=0.15.11; extra == "dev"
|
|
@@ -62,14 +62,48 @@ Dynamic: license-file
|
|
|
62
62
|
# **`DrumScript`**
|
|
63
63
|
|
|
64
64
|
<!--date_created: sun-15-june-2025-->
|
|
65
|
-
<!--date_edited:
|
|
65
|
+
<!--date_edited: thurs-18-june-2026--->
|
|
66
66
|
|
|
67
|
-
**
|
|
67
|
+
**Workflow Status**
|
|
68
|
+
|
|
69
|
+
[](https://github.com/DrumScript/DrumScript/actions/workflows/tests.yml)
|
|
70
|
+
|
|
71
|
+
**Demo Notebooks**
|
|
72
|
+
|
|
73
|
+
[](https://colab.research.google.com/github/DrumScript/DrumScript/blob/main/docs/guide/interactive/drumscript_interactive_notebook.ipynb)
|
|
68
74
|
|
|
69
|
-
|
|
75
|
+
**DrumScript** is an open-source Python library and CLI tool for drum audio analysis and transcription. Give it a recording — a full mix or an isolated drum stem — and it will generate PDF sheet music, MIDI files, and MusicXML output. The `DrumScript` model is a **deterministic classifier**, and doesn't use AI/machine learning. Built for drummers and by drummers, it is - and always will be - an open-source community tool.
|
|
70
76
|
|
|
71
77
|
> **Python >=3.9**
|
|
72
78
|
|
|
79
|
+
> **[Documentation](https://drumscript.github.io/DrumScript/)**
|
|
80
|
+
|
|
81
|
+
**Public Alpha (v0.1.4+) — June to August 2026**
|
|
82
|
+
|
|
83
|
+
- We're looking for early adopters and feedback
|
|
84
|
+
- [Feedback on the classification model](https://github.com/DrumScript/DrumScript/issues), and help shape v1.0.0.
|
|
85
|
+
- In particular we are interested in hearing from everyone:: drummers (coding not required!), sound engineers and academics in Music Information Retrieval with an interest in deterministic drum/percussion classifications.
|
|
86
|
+
- For beta release, we are planning to (amongst other things) improve the classification model, fix any user-suggested bugs, implement user-suggested feature requests and **most importantly** build a **WebGPU/ONNX/WASM UI** that will be free to use for all.
|
|
87
|
+
|
|
88
|
+
> See the **[Roadmap](https://drumscript.github.io/DrumScript/guide/roadmap.html)** for what's planned.
|
|
89
|
+
|
|
90
|
+
**What it looks like**
|
|
91
|
+
|
|
92
|
+
<!-- TODO: Replace with a GIF showing terminal output-->
|
|
93
|
+
<!-- For now, this shows the PDF transcription output -->
|
|
94
|
+
|
|
95
|
+
*Input: audio recording → Output: drum notation (PDF).
|
|
96
|
+
|
|
97
|
+
**Example 1: Simple groove**
|
|
98
|
+
|
|
99
|
+

|
|
100
|
+
|
|
101
|
+
**Example 2: A well-known Sabbath song**
|
|
102
|
+
|
|
103
|
+

|
|
104
|
+

|
|
105
|
+

|
|
106
|
+
|
|
73
107
|
---
|
|
74
108
|
|
|
75
109
|
- **[Features](#features)**
|
|
@@ -78,14 +112,7 @@ Dynamic: license-file
|
|
|
78
112
|
- **[CLI Usage](#cli-usage)**
|
|
79
113
|
- **[Contributing](#contributing)**
|
|
80
114
|
- **[FAQs](#faqs)**
|
|
81
|
-
|
|
82
|
-
**Workflow Status**
|
|
83
|
-
|
|
84
|
-
[](https://github.com/DrumScript/DrumScript/actions/workflows/tests.yml)
|
|
85
|
-
|
|
86
|
-
**Demo Notebooks**
|
|
87
|
-
|
|
88
|
-
[](https://colab.research.google.com/drive/1eDVXc3d6ezmorxINOjzldRPSC3emTl2I)
|
|
115
|
+
- **[Similar projects](#similar-projects)**
|
|
89
116
|
|
|
90
117
|
---
|
|
91
118
|
|
|
@@ -115,9 +142,11 @@ DrumScript/
|
|
|
115
142
|
│ ├── audio_processor/ # Audio loading, DSP, stem splitting
|
|
116
143
|
│ ├── drum_classifier/ # Rule-based classification engine
|
|
117
144
|
│ ├── notation_generator/ # Score building, PDF/MIDI/XML export
|
|
145
|
+
│ ├── datasets/ # Benchmark dataset adapters (IDMT, etc.)
|
|
118
146
|
│ └── utils/ # Helpers (ffmpeg installer, research scripts)
|
|
147
|
+
├── benchmarks/ # Evaluation runners (see benchmarks/README.md)
|
|
119
148
|
├── docs/ # Sphinx documentation
|
|
120
|
-
├── tests/ # pytest test suite
|
|
149
|
+
├── tests/ # pytest test suite (131 unit + 8 integration)
|
|
121
150
|
├── .github/workflows/ # CI/CD (tests, build, publish, docs)
|
|
122
151
|
├── pyproject.toml # Package metadata and dependencies
|
|
123
152
|
└── uv.lock # Pinned dependency versions
|
|
@@ -128,13 +157,13 @@ DrumScript/
|
|
|
128
157
|
|
|
129
158
|
**For users:**
|
|
130
159
|
|
|
131
|
-
```
|
|
160
|
+
```zsh
|
|
132
161
|
pip install drumscript
|
|
133
162
|
```
|
|
134
163
|
|
|
135
164
|
**For developers:**
|
|
136
165
|
|
|
137
|
-
```
|
|
166
|
+
```zsh
|
|
138
167
|
git clone https://github.com/DrumScript/DrumScript.git
|
|
139
168
|
cd DrumScript
|
|
140
169
|
uv sync # this will create a .venv
|
|
@@ -157,10 +186,20 @@ DrumScript manages all dependencies via [`pyproject.toml`](pyproject.toml) using
|
|
|
157
186
|
- Ubuntu/Debian: `sudo apt-get install libportaudio2`
|
|
158
187
|
- Windows: Usually bundled with the `sounddevice` wheel.
|
|
159
188
|
|
|
189
|
+
- **git-lfs** is **only** required if you want to run the documentation notebooks locally or rebuild the docs site. Some example audio files in `docs/guide/interactive/audio/` are tracked via Git LFS to keep the main repo lightweight. `pip install drumscript` and ordinary use of the package do **not** need it. If you skip this step, `git clone` will still succeed — you'll just get small LFS pointer files in place of the example audio.
|
|
190
|
+
- macOS: `brew install git-lfs`
|
|
191
|
+
- Ubuntu/Debian: `sudo apt-get install git-lfs`
|
|
192
|
+
- Windows: [Download from git-lfs.com](https://git-lfs.com/) or install via `winget install GitHub.GitLFS`.
|
|
193
|
+
- After installing, run `git lfs install` once, then `git lfs pull` inside the cloned repo to fetch the audio.
|
|
194
|
+
|
|
160
195
|
---
|
|
161
196
|
|
|
162
197
|
## Quick Start
|
|
163
198
|
|
|
199
|
+
> Please note: DrumScript assumes you are providing **drum audio-only inputs by default**
|
|
200
|
+
|
|
201
|
+
> If you are using transcription with full song use the `full_song=True` flag, ie
|
|
202
|
+
|
|
164
203
|
### End-to-end transcription
|
|
165
204
|
|
|
166
205
|
```python
|
|
@@ -170,10 +209,11 @@ import drumscript as ds
|
|
|
170
209
|
pdf_path = ds.transcribe("drum_audio.wav")
|
|
171
210
|
|
|
172
211
|
# Transcribe a full song (separates drums automatically)
|
|
173
|
-
pdf_path = ds.transcribe("full_song.mp3"
|
|
212
|
+
pdf_path = ds.transcribe("full_song.mp3") # drum only audio
|
|
213
|
+
pdf_path = ds.transcribe("full_song.mp3", full_song=True) # full song, tells DrumScript to extract the drums first and then transcribe
|
|
174
214
|
|
|
175
215
|
# Get all intermediate results
|
|
176
|
-
result = ds.transcribe("drum_audio.wav",
|
|
216
|
+
result = ds.transcribe("drum_audio.wav", verbose=True)
|
|
177
217
|
print(f"Tempo: {result['tempo']:.1f} BPM")
|
|
178
218
|
print(f"Events: {len(result['events'])}")
|
|
179
219
|
```
|
|
@@ -205,11 +245,34 @@ results = ds.extract_stems(
|
|
|
205
245
|
"full_song.mp3",
|
|
206
246
|
drumless=True,
|
|
207
247
|
output_format="mp3",
|
|
208
|
-
|
|
248
|
+
verbose=True,
|
|
209
249
|
)
|
|
210
250
|
print(f"Backing track: {results['mix']}")
|
|
211
251
|
```
|
|
212
252
|
|
|
253
|
+
---
|
|
254
|
+
|
|
255
|
+
## Benchmarking
|
|
256
|
+
|
|
257
|
+
DrumScript includes a benchmarking framework for evaluating the classifier against standard ADT datasets using [`mir_eval`](https://github.com/mir-evaluation/mir_eval). Currently supports IDMT-SMT-Drums V2.
|
|
258
|
+
|
|
259
|
+
```zsh
|
|
260
|
+
# Install dev dependencies (includes mir_eval)
|
|
261
|
+
uv sync --extra dev
|
|
262
|
+
|
|
263
|
+
# Run the IDMT benchmark
|
|
264
|
+
uv run --extra dev python benchmarks/run.py idmt \
|
|
265
|
+
--root /path/to/IDMT-SMT-DRUMS-V2
|
|
266
|
+
|
|
267
|
+
# Run on a single subset with a limit
|
|
268
|
+
uv run --extra dev python benchmarks/run.py idmt \
|
|
269
|
+
--root /path/to/IDMT-SMT-DRUMS-V2 \
|
|
270
|
+
--subset RealDrum --limit 5
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
Results are archived to `outputs/benchmarks/idmt/` with per-file metrics, summary statistics, and git commit tracking for reproducibility. See [`benchmarks/README.md`](benchmarks/README.md) for dataset setup and full usage.
|
|
274
|
+
|
|
275
|
+
|
|
213
276
|
---
|
|
214
277
|
|
|
215
278
|
## CLI Usage
|
|
@@ -218,29 +281,29 @@ DrumScript also provides a command-line interface.
|
|
|
218
281
|
|
|
219
282
|
### Basic transcription (isolated drum stem)
|
|
220
283
|
|
|
221
|
-
```
|
|
284
|
+
```zsh
|
|
222
285
|
drumscript drum_audio.wav
|
|
223
286
|
```
|
|
224
287
|
|
|
225
288
|
### Full song transcription (auto-separates drums)
|
|
226
289
|
|
|
227
|
-
```
|
|
228
|
-
drumscript full_song.mp3 --full
|
|
290
|
+
```zsh
|
|
291
|
+
drumscript full_song.mp3 --full-song
|
|
229
292
|
```
|
|
230
293
|
|
|
231
294
|
### Extract a drumless backing track
|
|
232
295
|
|
|
233
|
-
```
|
|
296
|
+
```zsh
|
|
234
297
|
drumscript full_song.mp3 --drumless
|
|
235
298
|
```
|
|
236
299
|
|
|
237
300
|
### All options
|
|
238
301
|
|
|
239
|
-
```
|
|
302
|
+
```zsh
|
|
240
303
|
drumscript <audio_file> [OPTIONS]
|
|
241
304
|
|
|
242
305
|
Options:
|
|
243
|
-
--full
|
|
306
|
+
--full-song Transcribe a full song (isolates drums first via Demucs)
|
|
244
307
|
--drumless Extract a drumless backing track
|
|
245
308
|
--mute STEM Mute a specific stem (e.g. --mute bass). Repeatable.
|
|
246
309
|
--all-stems Export all individual stems (drums, bass, vocals, other)
|
|
@@ -251,7 +314,7 @@ Options:
|
|
|
251
314
|
|
|
252
315
|
### Examples
|
|
253
316
|
|
|
254
|
-
```
|
|
317
|
+
```zsh
|
|
255
318
|
# Transcribe with 6/8 time signature
|
|
256
319
|
drumscript drum_audio.wav --ts 6/8
|
|
257
320
|
|
|
@@ -273,6 +336,28 @@ We welcome contributions! DrumScript is intended to be a community-owned project
|
|
|
273
336
|
|
|
274
337
|
> All bug reports and feature requests must be filed as GitHub Issues. All code changes must be submitted as Pull Requests. Keeping discussion public helps everyone.
|
|
275
338
|
|
|
339
|
+
**[hello.drumscript@gmail.com](mailto:hello.drumscript@gmail.com)**
|
|
340
|
+
|
|
341
|
+
## Alpha Priorities (v0.0.4 < v1.0.0)
|
|
342
|
+
The alpha phase runs between 01 June and 31 August 2026
|
|
343
|
+
|
|
344
|
+
**What works today:**
|
|
345
|
+
|
|
346
|
+
- End-to-end transcription pipeline: audio → onsets → classification → PDF / MIDI / MusicXML
|
|
347
|
+
- Tempo detection via spectral onset envelope
|
|
348
|
+
- Stem separation using Demucs (`htdemucs` 4-stem model)
|
|
349
|
+
- Drumless backing track generation
|
|
350
|
+
- CLI and Python API
|
|
351
|
+
|
|
352
|
+
**What we're focused on during the alpha:**
|
|
353
|
+
|
|
354
|
+
- Expanding test coverage across genres, kit types, and recording conditions
|
|
355
|
+
- Fixing classification edge cases (deep snares vs clicky kicks, splash cymbals vs open hats)
|
|
356
|
+
- Improving onset detection sensitivity for ghost notes and fast passages
|
|
357
|
+
- Stabilising the public API ahead of the beta freeze
|
|
358
|
+
- Community feedback collection
|
|
359
|
+
|
|
360
|
+
|
|
276
361
|
---
|
|
277
362
|
|
|
278
363
|
## FAQs
|
|
@@ -297,8 +382,9 @@ DrumScript's own classification engine is **fully deterministic** — it uses ph
|
|
|
297
382
|
|
|
298
383
|
## Acknowledgements
|
|
299
384
|
|
|
300
|
-
|
|
301
|
-
|
|
385
|
+
1. **[Demucs](https://github.com/adefossez/demucs)** — The stem splitting functionality is built upon the work of [@adefossez](https://github.com/adefossez).
|
|
386
|
+
2. **[librosa](https://librosa.org/)** — For foundational audio processing tools.
|
|
387
|
+
3. **[@nanaoto](https://github.com/nanaoto)** — For building the `mir_eval` benchmarking infrastructure and IDMT-SMT-Drums V2 adapter (PR [#273](https://github.com/DrumScript/DrumScript/pull/273)).
|
|
302
388
|
|
|
303
389
|
---
|
|
304
390
|
|
|
@@ -306,6 +392,18 @@ DrumScript's own classification engine is **fully deterministic** — it uses ph
|
|
|
306
392
|
|
|
307
393
|
[Apache License 2.0](LICENSE)
|
|
308
394
|
|
|
395
|
+
---
|
|
396
|
+
## Similar Projects
|
|
397
|
+
|
|
398
|
+
DrumScript has no affiliation with any of the projects below. They are listed for context and reference.
|
|
399
|
+
|
|
400
|
+
* **[librosa](https://librosa.org/)** — The spectral analysis library that powers DrumScript's onset detection and feature extraction.
|
|
401
|
+
* **[Demucs](https://github.com/adefossez/demucs)** — The stem separation model we use for isolating drums from full mixes.
|
|
402
|
+
* **[tepreece/drumscript (Golang)](https://github.com/tepreece/drumscript)** — A `(Go)lang` MIDI drum pattern scripting language by Tom Preece. Different use case (composing drum patterns via script), different technology (MIDI output rather than audio transcription). If you're looking to *write* drum patterns programmatically, check it out. Maintained by [@tepreece](https://github.com/tepreece)
|
|
403
|
+
* **[basic-pitch](https://github.com/spotify/basic-pitch)** — A lightweight yet powerful audio-to-MIDI converter with pitch bend detection (better for non-percussive audio). Maintained by Spotify.
|
|
404
|
+
* **[mir_eval](https://github.com/mir-evaluation/mir_eval)** — Standard evaluation metrics for music information retrieval tasks.
|
|
405
|
+
* **[onset_db](https://github.com/CPJKU/onset_db)** - Provides a dataset of annotated musical onsets for tuning and evaluating audio detection algorithms. Maintained by JKU Linz.
|
|
406
|
+
|
|
309
407
|
---
|
|
310
408
|
|
|
311
409
|
<!--END-->
|
|
@@ -23,6 +23,9 @@ drumscript/audio_processor/onset_detector.py
|
|
|
23
23
|
drumscript/audio_processor/stem_splitter.py
|
|
24
24
|
drumscript/audio_processor/tempo_detector.py
|
|
25
25
|
drumscript/audio_processor/tempogram.py
|
|
26
|
+
drumscript/datasets/__init__.py
|
|
27
|
+
drumscript/datasets/base.py
|
|
28
|
+
drumscript/datasets/idmt.py
|
|
26
29
|
drumscript/drum_classifier/__init__.py
|
|
27
30
|
drumscript/drum_classifier/classify.py
|
|
28
31
|
drumscript/notation_generator/__init__.py
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: drumscript
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.6
|
|
4
4
|
Summary: A Python package to convert drum audio to sheet music.
|
|
5
5
|
Author-email: drumscript-admin <hello.drumscript@gmail.com>
|
|
6
6
|
License-Expression: Apache-2.0
|
|
@@ -50,10 +50,10 @@ Provides-Extra: dev
|
|
|
50
50
|
Requires-Dist: ipykernel; extra == "dev"
|
|
51
51
|
Requires-Dist: myst-parser; extra == "dev"
|
|
52
52
|
Requires-Dist: myst-nb>=1.3.0; extra == "dev"
|
|
53
|
+
Requires-Dist: mir-eval>=0.8.2; extra == "dev"
|
|
53
54
|
Requires-Dist: pytest; extra == "dev"
|
|
54
55
|
Requires-Dist: pytest-cov>=7.1.0; extra == "dev"
|
|
55
56
|
Requires-Dist: shibuya>=2025.10.21; extra == "dev"
|
|
56
|
-
Requires-Dist: fastapi>=0.128.8; extra == "dev"
|
|
57
57
|
Requires-Dist: ipywidgets>=8.1.8; extra == "dev"
|
|
58
58
|
Requires-Dist: requests>=2.32.5; extra == "dev"
|
|
59
59
|
Requires-Dist: ruff>=0.15.11; extra == "dev"
|
|
@@ -62,14 +62,48 @@ Dynamic: license-file
|
|
|
62
62
|
# **`DrumScript`**
|
|
63
63
|
|
|
64
64
|
<!--date_created: sun-15-june-2025-->
|
|
65
|
-
<!--date_edited:
|
|
65
|
+
<!--date_edited: thurs-18-june-2026--->
|
|
66
66
|
|
|
67
|
-
**
|
|
67
|
+
**Workflow Status**
|
|
68
|
+
|
|
69
|
+
[](https://github.com/DrumScript/DrumScript/actions/workflows/tests.yml)
|
|
70
|
+
|
|
71
|
+
**Demo Notebooks**
|
|
72
|
+
|
|
73
|
+
[](https://colab.research.google.com/github/DrumScript/DrumScript/blob/main/docs/guide/interactive/drumscript_interactive_notebook.ipynb)
|
|
68
74
|
|
|
69
|
-
|
|
75
|
+
**DrumScript** is an open-source Python library and CLI tool for drum audio analysis and transcription. Give it a recording — a full mix or an isolated drum stem — and it will generate PDF sheet music, MIDI files, and MusicXML output. The `DrumScript` model is a **deterministic classifier**, and doesn't use AI/machine learning. Built for drummers and by drummers, it is - and always will be - an open-source community tool.
|
|
70
76
|
|
|
71
77
|
> **Python >=3.9**
|
|
72
78
|
|
|
79
|
+
> **[Documentation](https://drumscript.github.io/DrumScript/)**
|
|
80
|
+
|
|
81
|
+
**Public Alpha (v0.1.4+) — June to August 2026**
|
|
82
|
+
|
|
83
|
+
- We're looking for early adopters and feedback
|
|
84
|
+
- [Feedback on the classification model](https://github.com/DrumScript/DrumScript/issues), and help shape v1.0.0.
|
|
85
|
+
- In particular we are interested in hearing from everyone:: drummers (coding not required!), sound engineers and academics in Music Information Retrieval with an interest in deterministic drum/percussion classifications.
|
|
86
|
+
- For beta release, we are planning to (amongst other things) improve the classification model, fix any user-suggested bugs, implement user-suggested feature requests and **most importantly** build a **WebGPU/ONNX/WASM UI** that will be free to use for all.
|
|
87
|
+
|
|
88
|
+
> See the **[Roadmap](https://drumscript.github.io/DrumScript/guide/roadmap.html)** for what's planned.
|
|
89
|
+
|
|
90
|
+
**What it looks like**
|
|
91
|
+
|
|
92
|
+
<!-- TODO: Replace with a GIF showing terminal output-->
|
|
93
|
+
<!-- For now, this shows the PDF transcription output -->
|
|
94
|
+
|
|
95
|
+
*Input: audio recording → Output: drum notation (PDF).
|
|
96
|
+
|
|
97
|
+
**Example 1: Simple groove**
|
|
98
|
+
|
|
99
|
+

|
|
100
|
+
|
|
101
|
+
**Example 2: A well-known Sabbath song**
|
|
102
|
+
|
|
103
|
+

|
|
104
|
+

|
|
105
|
+

|
|
106
|
+
|
|
73
107
|
---
|
|
74
108
|
|
|
75
109
|
- **[Features](#features)**
|
|
@@ -78,14 +112,7 @@ Dynamic: license-file
|
|
|
78
112
|
- **[CLI Usage](#cli-usage)**
|
|
79
113
|
- **[Contributing](#contributing)**
|
|
80
114
|
- **[FAQs](#faqs)**
|
|
81
|
-
|
|
82
|
-
**Workflow Status**
|
|
83
|
-
|
|
84
|
-
[](https://github.com/DrumScript/DrumScript/actions/workflows/tests.yml)
|
|
85
|
-
|
|
86
|
-
**Demo Notebooks**
|
|
87
|
-
|
|
88
|
-
[](https://colab.research.google.com/drive/1eDVXc3d6ezmorxINOjzldRPSC3emTl2I)
|
|
115
|
+
- **[Similar projects](#similar-projects)**
|
|
89
116
|
|
|
90
117
|
---
|
|
91
118
|
|
|
@@ -115,9 +142,11 @@ DrumScript/
|
|
|
115
142
|
│ ├── audio_processor/ # Audio loading, DSP, stem splitting
|
|
116
143
|
│ ├── drum_classifier/ # Rule-based classification engine
|
|
117
144
|
│ ├── notation_generator/ # Score building, PDF/MIDI/XML export
|
|
145
|
+
│ ├── datasets/ # Benchmark dataset adapters (IDMT, etc.)
|
|
118
146
|
│ └── utils/ # Helpers (ffmpeg installer, research scripts)
|
|
147
|
+
├── benchmarks/ # Evaluation runners (see benchmarks/README.md)
|
|
119
148
|
├── docs/ # Sphinx documentation
|
|
120
|
-
├── tests/ # pytest test suite
|
|
149
|
+
├── tests/ # pytest test suite (131 unit + 8 integration)
|
|
121
150
|
├── .github/workflows/ # CI/CD (tests, build, publish, docs)
|
|
122
151
|
├── pyproject.toml # Package metadata and dependencies
|
|
123
152
|
└── uv.lock # Pinned dependency versions
|
|
@@ -128,13 +157,13 @@ DrumScript/
|
|
|
128
157
|
|
|
129
158
|
**For users:**
|
|
130
159
|
|
|
131
|
-
```
|
|
160
|
+
```zsh
|
|
132
161
|
pip install drumscript
|
|
133
162
|
```
|
|
134
163
|
|
|
135
164
|
**For developers:**
|
|
136
165
|
|
|
137
|
-
```
|
|
166
|
+
```zsh
|
|
138
167
|
git clone https://github.com/DrumScript/DrumScript.git
|
|
139
168
|
cd DrumScript
|
|
140
169
|
uv sync # this will create a .venv
|
|
@@ -157,10 +186,20 @@ DrumScript manages all dependencies via [`pyproject.toml`](pyproject.toml) using
|
|
|
157
186
|
- Ubuntu/Debian: `sudo apt-get install libportaudio2`
|
|
158
187
|
- Windows: Usually bundled with the `sounddevice` wheel.
|
|
159
188
|
|
|
189
|
+
- **git-lfs** is **only** required if you want to run the documentation notebooks locally or rebuild the docs site. Some example audio files in `docs/guide/interactive/audio/` are tracked via Git LFS to keep the main repo lightweight. `pip install drumscript` and ordinary use of the package do **not** need it. If you skip this step, `git clone` will still succeed — you'll just get small LFS pointer files in place of the example audio.
|
|
190
|
+
- macOS: `brew install git-lfs`
|
|
191
|
+
- Ubuntu/Debian: `sudo apt-get install git-lfs`
|
|
192
|
+
- Windows: [Download from git-lfs.com](https://git-lfs.com/) or install via `winget install GitHub.GitLFS`.
|
|
193
|
+
- After installing, run `git lfs install` once, then `git lfs pull` inside the cloned repo to fetch the audio.
|
|
194
|
+
|
|
160
195
|
---
|
|
161
196
|
|
|
162
197
|
## Quick Start
|
|
163
198
|
|
|
199
|
+
> Please note: DrumScript assumes you are providing **drum audio-only inputs by default**
|
|
200
|
+
|
|
201
|
+
> If you are using transcription with full song use the `full_song=True` flag, ie
|
|
202
|
+
|
|
164
203
|
### End-to-end transcription
|
|
165
204
|
|
|
166
205
|
```python
|
|
@@ -170,10 +209,11 @@ import drumscript as ds
|
|
|
170
209
|
pdf_path = ds.transcribe("drum_audio.wav")
|
|
171
210
|
|
|
172
211
|
# Transcribe a full song (separates drums automatically)
|
|
173
|
-
pdf_path = ds.transcribe("full_song.mp3"
|
|
212
|
+
pdf_path = ds.transcribe("full_song.mp3") # drum only audio
|
|
213
|
+
pdf_path = ds.transcribe("full_song.mp3", full_song=True) # full song, tells DrumScript to extract the drums first and then transcribe
|
|
174
214
|
|
|
175
215
|
# Get all intermediate results
|
|
176
|
-
result = ds.transcribe("drum_audio.wav",
|
|
216
|
+
result = ds.transcribe("drum_audio.wav", verbose=True)
|
|
177
217
|
print(f"Tempo: {result['tempo']:.1f} BPM")
|
|
178
218
|
print(f"Events: {len(result['events'])}")
|
|
179
219
|
```
|
|
@@ -205,11 +245,34 @@ results = ds.extract_stems(
|
|
|
205
245
|
"full_song.mp3",
|
|
206
246
|
drumless=True,
|
|
207
247
|
output_format="mp3",
|
|
208
|
-
|
|
248
|
+
verbose=True,
|
|
209
249
|
)
|
|
210
250
|
print(f"Backing track: {results['mix']}")
|
|
211
251
|
```
|
|
212
252
|
|
|
253
|
+
---
|
|
254
|
+
|
|
255
|
+
## Benchmarking
|
|
256
|
+
|
|
257
|
+
DrumScript includes a benchmarking framework for evaluating the classifier against standard ADT datasets using [`mir_eval`](https://github.com/mir-evaluation/mir_eval). Currently supports IDMT-SMT-Drums V2.
|
|
258
|
+
|
|
259
|
+
```zsh
|
|
260
|
+
# Install dev dependencies (includes mir_eval)
|
|
261
|
+
uv sync --extra dev
|
|
262
|
+
|
|
263
|
+
# Run the IDMT benchmark
|
|
264
|
+
uv run --extra dev python benchmarks/run.py idmt \
|
|
265
|
+
--root /path/to/IDMT-SMT-DRUMS-V2
|
|
266
|
+
|
|
267
|
+
# Run on a single subset with a limit
|
|
268
|
+
uv run --extra dev python benchmarks/run.py idmt \
|
|
269
|
+
--root /path/to/IDMT-SMT-DRUMS-V2 \
|
|
270
|
+
--subset RealDrum --limit 5
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
Results are archived to `outputs/benchmarks/idmt/` with per-file metrics, summary statistics, and git commit tracking for reproducibility. See [`benchmarks/README.md`](benchmarks/README.md) for dataset setup and full usage.
|
|
274
|
+
|
|
275
|
+
|
|
213
276
|
---
|
|
214
277
|
|
|
215
278
|
## CLI Usage
|
|
@@ -218,29 +281,29 @@ DrumScript also provides a command-line interface.
|
|
|
218
281
|
|
|
219
282
|
### Basic transcription (isolated drum stem)
|
|
220
283
|
|
|
221
|
-
```
|
|
284
|
+
```zsh
|
|
222
285
|
drumscript drum_audio.wav
|
|
223
286
|
```
|
|
224
287
|
|
|
225
288
|
### Full song transcription (auto-separates drums)
|
|
226
289
|
|
|
227
|
-
```
|
|
228
|
-
drumscript full_song.mp3 --full
|
|
290
|
+
```zsh
|
|
291
|
+
drumscript full_song.mp3 --full-song
|
|
229
292
|
```
|
|
230
293
|
|
|
231
294
|
### Extract a drumless backing track
|
|
232
295
|
|
|
233
|
-
```
|
|
296
|
+
```zsh
|
|
234
297
|
drumscript full_song.mp3 --drumless
|
|
235
298
|
```
|
|
236
299
|
|
|
237
300
|
### All options
|
|
238
301
|
|
|
239
|
-
```
|
|
302
|
+
```zsh
|
|
240
303
|
drumscript <audio_file> [OPTIONS]
|
|
241
304
|
|
|
242
305
|
Options:
|
|
243
|
-
--full
|
|
306
|
+
--full-song Transcribe a full song (isolates drums first via Demucs)
|
|
244
307
|
--drumless Extract a drumless backing track
|
|
245
308
|
--mute STEM Mute a specific stem (e.g. --mute bass). Repeatable.
|
|
246
309
|
--all-stems Export all individual stems (drums, bass, vocals, other)
|
|
@@ -251,7 +314,7 @@ Options:
|
|
|
251
314
|
|
|
252
315
|
### Examples
|
|
253
316
|
|
|
254
|
-
```
|
|
317
|
+
```zsh
|
|
255
318
|
# Transcribe with 6/8 time signature
|
|
256
319
|
drumscript drum_audio.wav --ts 6/8
|
|
257
320
|
|
|
@@ -273,6 +336,28 @@ We welcome contributions! DrumScript is intended to be a community-owned project
|
|
|
273
336
|
|
|
274
337
|
> All bug reports and feature requests must be filed as GitHub Issues. All code changes must be submitted as Pull Requests. Keeping discussion public helps everyone.
|
|
275
338
|
|
|
339
|
+
**[hello.drumscript@gmail.com](mailto:hello.drumscript@gmail.com)**
|
|
340
|
+
|
|
341
|
+
## Alpha Priorities (v0.0.4 < v1.0.0)
|
|
342
|
+
The alpha phase runs between 01 June and 31 August 2026
|
|
343
|
+
|
|
344
|
+
**What works today:**
|
|
345
|
+
|
|
346
|
+
- End-to-end transcription pipeline: audio → onsets → classification → PDF / MIDI / MusicXML
|
|
347
|
+
- Tempo detection via spectral onset envelope
|
|
348
|
+
- Stem separation using Demucs (`htdemucs` 4-stem model)
|
|
349
|
+
- Drumless backing track generation
|
|
350
|
+
- CLI and Python API
|
|
351
|
+
|
|
352
|
+
**What we're focused on during the alpha:**
|
|
353
|
+
|
|
354
|
+
- Expanding test coverage across genres, kit types, and recording conditions
|
|
355
|
+
- Fixing classification edge cases (deep snares vs clicky kicks, splash cymbals vs open hats)
|
|
356
|
+
- Improving onset detection sensitivity for ghost notes and fast passages
|
|
357
|
+
- Stabilising the public API ahead of the beta freeze
|
|
358
|
+
- Community feedback collection
|
|
359
|
+
|
|
360
|
+
|
|
276
361
|
---
|
|
277
362
|
|
|
278
363
|
## FAQs
|
|
@@ -297,8 +382,9 @@ DrumScript's own classification engine is **fully deterministic** — it uses ph
|
|
|
297
382
|
|
|
298
383
|
## Acknowledgements
|
|
299
384
|
|
|
300
|
-
|
|
301
|
-
|
|
385
|
+
1. **[Demucs](https://github.com/adefossez/demucs)** — The stem splitting functionality is built upon the work of [@adefossez](https://github.com/adefossez).
|
|
386
|
+
2. **[librosa](https://librosa.org/)** — For foundational audio processing tools.
|
|
387
|
+
3. **[@nanaoto](https://github.com/nanaoto)** — For building the `mir_eval` benchmarking infrastructure and IDMT-SMT-Drums V2 adapter (PR [#273](https://github.com/DrumScript/DrumScript/pull/273)).
|
|
302
388
|
|
|
303
389
|
---
|
|
304
390
|
|
|
@@ -306,6 +392,18 @@ DrumScript's own classification engine is **fully deterministic** — it uses ph
|
|
|
306
392
|
|
|
307
393
|
[Apache License 2.0](LICENSE)
|
|
308
394
|
|
|
395
|
+
---
|
|
396
|
+
## Similar Projects
|
|
397
|
+
|
|
398
|
+
DrumScript has no affiliation with any of the projects below. They are listed for context and reference.
|
|
399
|
+
|
|
400
|
+
* **[librosa](https://librosa.org/)** — The spectral analysis library that powers DrumScript's onset detection and feature extraction.
|
|
401
|
+
* **[Demucs](https://github.com/adefossez/demucs)** — The stem separation model we use for isolating drums from full mixes.
|
|
402
|
+
* **[tepreece/drumscript (Golang)](https://github.com/tepreece/drumscript)** — A `(Go)lang` MIDI drum pattern scripting language by Tom Preece. Different use case (composing drum patterns via script), different technology (MIDI output rather than audio transcription). If you're looking to *write* drum patterns programmatically, check it out. Maintained by [@tepreece](https://github.com/tepreece)
|
|
403
|
+
* **[basic-pitch](https://github.com/spotify/basic-pitch)** — A lightweight yet powerful audio-to-MIDI converter with pitch bend detection (better for non-percussive audio). Maintained by Spotify.
|
|
404
|
+
* **[mir_eval](https://github.com/mir-evaluation/mir_eval)** — Standard evaluation metrics for music information retrieval tasks.
|
|
405
|
+
* **[onset_db](https://github.com/CPJKU/onset_db)** - Provides a dataset of annotated musical onsets for tuning and evaluating audio detection algorithms. Maintained by JKU Linz.
|
|
406
|
+
|
|
309
407
|
---
|
|
310
408
|
|
|
311
409
|
<!--END-->
|