drumscript 0.1.5__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.5 → drumscript-0.1.6}/DrumScript.egg-info/PKG-INFO +74 -28
- {drumscript-0.1.5 → drumscript-0.1.6}/DrumScript.egg-info/SOURCES.txt +3 -0
- {drumscript-0.1.5 → drumscript-0.1.6}/DrumScript.egg-info/requires.txt +1 -0
- {drumscript-0.1.5 → drumscript-0.1.6}/PKG-INFO +74 -28
- {drumscript-0.1.5 → drumscript-0.1.6}/README.md +72 -27
- {drumscript-0.1.5 → 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.5 → drumscript-0.1.6}/drumscript/main.py +18 -8
- drumscript-0.1.6/drumscript/utils/__init__.py +0 -0
- {drumscript-0.1.5 → drumscript-0.1.6}/pyproject.toml +2 -1
- {drumscript-0.1.5 → drumscript-0.1.6}/DrumScript.egg-info/dependency_links.txt +0 -0
- {drumscript-0.1.5 → drumscript-0.1.6}/DrumScript.egg-info/entry_points.txt +0 -0
- {drumscript-0.1.5 → drumscript-0.1.6}/DrumScript.egg-info/top_level.txt +0 -0
- {drumscript-0.1.5 → drumscript-0.1.6}/LICENSE +0 -0
- {drumscript-0.1.5 → drumscript-0.1.6}/MANIFEST.in +0 -0
- {drumscript-0.1.5 → drumscript-0.1.6}/drumscript/audio_processor/__init__.py +0 -0
- {drumscript-0.1.5 → drumscript-0.1.6}/drumscript/audio_processor/audio_loader.py +0 -0
- {drumscript-0.1.5 → drumscript-0.1.6}/drumscript/audio_processor/feature_extractor.py +0 -0
- {drumscript-0.1.5 → drumscript-0.1.6}/drumscript/audio_processor/onset_detector.py +0 -0
- {drumscript-0.1.5 → drumscript-0.1.6}/drumscript/audio_processor/stem_splitter.py +0 -0
- {drumscript-0.1.5 → drumscript-0.1.6}/drumscript/audio_processor/tempo_detector.py +0 -0
- {drumscript-0.1.5 → drumscript-0.1.6}/drumscript/audio_processor/tempogram.py +0 -0
- {drumscript-0.1.5/drumscript/drum_classifier → drumscript-0.1.6/drumscript/datasets}/__init__.py +0 -0
- {drumscript-0.1.5/drumscript/notation_generator → drumscript-0.1.6/drumscript/drum_classifier}/__init__.py +0 -0
- {drumscript-0.1.5 → drumscript-0.1.6}/drumscript/drum_classifier/classify.py +0 -0
- {drumscript-0.1.5/drumscript/utils → drumscript-0.1.6/drumscript/notation_generator}/__init__.py +0 -0
- {drumscript-0.1.5 → drumscript-0.1.6}/drumscript/notation_generator/constants.py +0 -0
- {drumscript-0.1.5 → drumscript-0.1.6}/drumscript/notation_generator/helpers.py +0 -0
- {drumscript-0.1.5 → drumscript-0.1.6}/drumscript/notation_generator/midi_exporter.py +0 -0
- {drumscript-0.1.5 → drumscript-0.1.6}/drumscript/notation_generator/pdf_exporter.py +0 -0
- {drumscript-0.1.5 → drumscript-0.1.6}/drumscript/notation_generator/score_builder.py +0 -0
- {drumscript-0.1.5 → drumscript-0.1.6}/drumscript/notation_generator/xml_exporter.py +0 -0
- {drumscript-0.1.5 → drumscript-0.1.6}/drumscript/utils/ffmpeg_installer.py +0 -0
- {drumscript-0.1.5 → 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,6 +50,7 @@ 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"
|
|
@@ -61,7 +62,7 @@ Dynamic: license-file
|
|
|
61
62
|
# **`DrumScript`**
|
|
62
63
|
|
|
63
64
|
<!--date_created: sun-15-june-2025-->
|
|
64
|
-
<!--date_edited:
|
|
65
|
+
<!--date_edited: thurs-18-june-2026--->
|
|
65
66
|
|
|
66
67
|
**Workflow Status**
|
|
67
68
|
|
|
@@ -69,7 +70,7 @@ Dynamic: license-file
|
|
|
69
70
|
|
|
70
71
|
**Demo Notebooks**
|
|
71
72
|
|
|
72
|
-
[](https://colab.research.google.com/
|
|
73
|
+
[](https://colab.research.google.com/github/DrumScript/DrumScript/blob/main/docs/guide/interactive/drumscript_interactive_notebook.ipynb)
|
|
73
74
|
|
|
74
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.
|
|
75
76
|
|
|
@@ -77,10 +78,10 @@ Dynamic: license-file
|
|
|
77
78
|
|
|
78
79
|
> **[Documentation](https://drumscript.github.io/DrumScript/)**
|
|
79
80
|
|
|
80
|
-
**Public Alpha (v0.1.4) — June to August 2026**
|
|
81
|
+
**Public Alpha (v0.1.4+) — June to August 2026**
|
|
81
82
|
|
|
82
83
|
- We're looking for early adopters and feedback
|
|
83
|
-
- [Feedback on the classification model](https://github.com/DrumScript/DrumScript/issues), and help shape v1.0.
|
|
84
|
+
- [Feedback on the classification model](https://github.com/DrumScript/DrumScript/issues), and help shape v1.0.0.
|
|
84
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.
|
|
85
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.
|
|
86
87
|
|
|
@@ -88,12 +89,20 @@ Dynamic: license-file
|
|
|
88
89
|
|
|
89
90
|
**What it looks like**
|
|
90
91
|
|
|
91
|
-
<!-- TODO: Replace with a GIF showing terminal output
|
|
92
|
+
<!-- TODO: Replace with a GIF showing terminal output-->
|
|
92
93
|
<!-- For now, this shows the PDF transcription output -->
|
|
93
94
|
|
|
94
95
|
*Input: audio recording → Output: drum notation (PDF).
|
|
95
96
|
|
|
96
|
-
|
|
97
|
+
**Example 1: Simple groove**
|
|
98
|
+
|
|
99
|
+

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

|
|
104
|
+

|
|
105
|
+

|
|
97
106
|
|
|
98
107
|
---
|
|
99
108
|
|
|
@@ -133,9 +142,11 @@ DrumScript/
|
|
|
133
142
|
│ ├── audio_processor/ # Audio loading, DSP, stem splitting
|
|
134
143
|
│ ├── drum_classifier/ # Rule-based classification engine
|
|
135
144
|
│ ├── notation_generator/ # Score building, PDF/MIDI/XML export
|
|
145
|
+
│ ├── datasets/ # Benchmark dataset adapters (IDMT, etc.)
|
|
136
146
|
│ └── utils/ # Helpers (ffmpeg installer, research scripts)
|
|
147
|
+
├── benchmarks/ # Evaluation runners (see benchmarks/README.md)
|
|
137
148
|
├── docs/ # Sphinx documentation
|
|
138
|
-
├── tests/ # pytest test suite
|
|
149
|
+
├── tests/ # pytest test suite (131 unit + 8 integration)
|
|
139
150
|
├── .github/workflows/ # CI/CD (tests, build, publish, docs)
|
|
140
151
|
├── pyproject.toml # Package metadata and dependencies
|
|
141
152
|
└── uv.lock # Pinned dependency versions
|
|
@@ -146,13 +157,13 @@ DrumScript/
|
|
|
146
157
|
|
|
147
158
|
**For users:**
|
|
148
159
|
|
|
149
|
-
```
|
|
160
|
+
```zsh
|
|
150
161
|
pip install drumscript
|
|
151
162
|
```
|
|
152
163
|
|
|
153
164
|
**For developers:**
|
|
154
165
|
|
|
155
|
-
```
|
|
166
|
+
```zsh
|
|
156
167
|
git clone https://github.com/DrumScript/DrumScript.git
|
|
157
168
|
cd DrumScript
|
|
158
169
|
uv sync # this will create a .venv
|
|
@@ -175,10 +186,20 @@ DrumScript manages all dependencies via [`pyproject.toml`](pyproject.toml) using
|
|
|
175
186
|
- Ubuntu/Debian: `sudo apt-get install libportaudio2`
|
|
176
187
|
- Windows: Usually bundled with the `sounddevice` wheel.
|
|
177
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
|
+
|
|
178
195
|
---
|
|
179
196
|
|
|
180
197
|
## Quick Start
|
|
181
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
|
+
|
|
182
203
|
### End-to-end transcription
|
|
183
204
|
|
|
184
205
|
```python
|
|
@@ -188,10 +209,11 @@ import drumscript as ds
|
|
|
188
209
|
pdf_path = ds.transcribe("drum_audio.wav")
|
|
189
210
|
|
|
190
211
|
# Transcribe a full song (separates drums automatically)
|
|
191
|
-
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
|
|
192
214
|
|
|
193
215
|
# Get all intermediate results
|
|
194
|
-
result = ds.transcribe("drum_audio.wav",
|
|
216
|
+
result = ds.transcribe("drum_audio.wav", verbose=True)
|
|
195
217
|
print(f"Tempo: {result['tempo']:.1f} BPM")
|
|
196
218
|
print(f"Events: {len(result['events'])}")
|
|
197
219
|
```
|
|
@@ -223,11 +245,34 @@ results = ds.extract_stems(
|
|
|
223
245
|
"full_song.mp3",
|
|
224
246
|
drumless=True,
|
|
225
247
|
output_format="mp3",
|
|
226
|
-
|
|
248
|
+
verbose=True,
|
|
227
249
|
)
|
|
228
250
|
print(f"Backing track: {results['mix']}")
|
|
229
251
|
```
|
|
230
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
|
+
|
|
231
276
|
---
|
|
232
277
|
|
|
233
278
|
## CLI Usage
|
|
@@ -236,29 +281,29 @@ DrumScript also provides a command-line interface.
|
|
|
236
281
|
|
|
237
282
|
### Basic transcription (isolated drum stem)
|
|
238
283
|
|
|
239
|
-
```
|
|
284
|
+
```zsh
|
|
240
285
|
drumscript drum_audio.wav
|
|
241
286
|
```
|
|
242
287
|
|
|
243
288
|
### Full song transcription (auto-separates drums)
|
|
244
289
|
|
|
245
|
-
```
|
|
246
|
-
drumscript full_song.mp3 --full
|
|
290
|
+
```zsh
|
|
291
|
+
drumscript full_song.mp3 --full-song
|
|
247
292
|
```
|
|
248
293
|
|
|
249
294
|
### Extract a drumless backing track
|
|
250
295
|
|
|
251
|
-
```
|
|
296
|
+
```zsh
|
|
252
297
|
drumscript full_song.mp3 --drumless
|
|
253
298
|
```
|
|
254
299
|
|
|
255
300
|
### All options
|
|
256
301
|
|
|
257
|
-
```
|
|
302
|
+
```zsh
|
|
258
303
|
drumscript <audio_file> [OPTIONS]
|
|
259
304
|
|
|
260
305
|
Options:
|
|
261
|
-
--full
|
|
306
|
+
--full-song Transcribe a full song (isolates drums first via Demucs)
|
|
262
307
|
--drumless Extract a drumless backing track
|
|
263
308
|
--mute STEM Mute a specific stem (e.g. --mute bass). Repeatable.
|
|
264
309
|
--all-stems Export all individual stems (drums, bass, vocals, other)
|
|
@@ -269,7 +314,7 @@ Options:
|
|
|
269
314
|
|
|
270
315
|
### Examples
|
|
271
316
|
|
|
272
|
-
```
|
|
317
|
+
```zsh
|
|
273
318
|
# Transcribe with 6/8 time signature
|
|
274
319
|
drumscript drum_audio.wav --ts 6/8
|
|
275
320
|
|
|
@@ -293,7 +338,7 @@ We welcome contributions! DrumScript is intended to be a community-owned project
|
|
|
293
338
|
|
|
294
339
|
**[hello.drumscript@gmail.com](mailto:hello.drumscript@gmail.com)**
|
|
295
340
|
|
|
296
|
-
## Alpha Priorities (v0.
|
|
341
|
+
## Alpha Priorities (v0.0.4 < v1.0.0)
|
|
297
342
|
The alpha phase runs between 01 June and 31 August 2026
|
|
298
343
|
|
|
299
344
|
**What works today:**
|
|
@@ -339,6 +384,7 @@ DrumScript's own classification engine is **fully deterministic** — it uses ph
|
|
|
339
384
|
|
|
340
385
|
1. **[Demucs](https://github.com/adefossez/demucs)** — The stem splitting functionality is built upon the work of [@adefossez](https://github.com/adefossez).
|
|
341
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)).
|
|
342
388
|
|
|
343
389
|
---
|
|
344
390
|
|
|
@@ -349,14 +395,14 @@ DrumScript's own classification engine is **fully deterministic** — it uses ph
|
|
|
349
395
|
---
|
|
350
396
|
## Similar Projects
|
|
351
397
|
|
|
352
|
-
|
|
398
|
+
DrumScript has no affiliation with any of the projects below. They are listed for context and reference.
|
|
353
399
|
|
|
354
|
-
**[librosa](https://librosa.org/)** — The spectral analysis library that powers DrumScript's onset detection and feature extraction.
|
|
355
|
-
**[Demucs](https://github.com/adefossez/demucs)** — The stem separation model we use for isolating drums from full mixes.
|
|
356
|
-
**[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)
|
|
357
|
-
**[basic-pitch]
|
|
358
|
-
**[mir_eval](https://github.com/mir-evaluation/mir_eval)** — Standard evaluation metrics for music information retrieval tasks.
|
|
359
|
-
**[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.
|
|
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.
|
|
360
406
|
|
|
361
407
|
---
|
|
362
408
|
|
|
@@ -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,6 +50,7 @@ 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"
|
|
@@ -61,7 +62,7 @@ Dynamic: license-file
|
|
|
61
62
|
# **`DrumScript`**
|
|
62
63
|
|
|
63
64
|
<!--date_created: sun-15-june-2025-->
|
|
64
|
-
<!--date_edited:
|
|
65
|
+
<!--date_edited: thurs-18-june-2026--->
|
|
65
66
|
|
|
66
67
|
**Workflow Status**
|
|
67
68
|
|
|
@@ -69,7 +70,7 @@ Dynamic: license-file
|
|
|
69
70
|
|
|
70
71
|
**Demo Notebooks**
|
|
71
72
|
|
|
72
|
-
[](https://colab.research.google.com/
|
|
73
|
+
[](https://colab.research.google.com/github/DrumScript/DrumScript/blob/main/docs/guide/interactive/drumscript_interactive_notebook.ipynb)
|
|
73
74
|
|
|
74
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.
|
|
75
76
|
|
|
@@ -77,10 +78,10 @@ Dynamic: license-file
|
|
|
77
78
|
|
|
78
79
|
> **[Documentation](https://drumscript.github.io/DrumScript/)**
|
|
79
80
|
|
|
80
|
-
**Public Alpha (v0.1.4) — June to August 2026**
|
|
81
|
+
**Public Alpha (v0.1.4+) — June to August 2026**
|
|
81
82
|
|
|
82
83
|
- We're looking for early adopters and feedback
|
|
83
|
-
- [Feedback on the classification model](https://github.com/DrumScript/DrumScript/issues), and help shape v1.0.
|
|
84
|
+
- [Feedback on the classification model](https://github.com/DrumScript/DrumScript/issues), and help shape v1.0.0.
|
|
84
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.
|
|
85
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.
|
|
86
87
|
|
|
@@ -88,12 +89,20 @@ Dynamic: license-file
|
|
|
88
89
|
|
|
89
90
|
**What it looks like**
|
|
90
91
|
|
|
91
|
-
<!-- TODO: Replace with a GIF showing terminal output
|
|
92
|
+
<!-- TODO: Replace with a GIF showing terminal output-->
|
|
92
93
|
<!-- For now, this shows the PDF transcription output -->
|
|
93
94
|
|
|
94
95
|
*Input: audio recording → Output: drum notation (PDF).
|
|
95
96
|
|
|
96
|
-
|
|
97
|
+
**Example 1: Simple groove**
|
|
98
|
+
|
|
99
|
+

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

|
|
104
|
+

|
|
105
|
+

|
|
97
106
|
|
|
98
107
|
---
|
|
99
108
|
|
|
@@ -133,9 +142,11 @@ DrumScript/
|
|
|
133
142
|
│ ├── audio_processor/ # Audio loading, DSP, stem splitting
|
|
134
143
|
│ ├── drum_classifier/ # Rule-based classification engine
|
|
135
144
|
│ ├── notation_generator/ # Score building, PDF/MIDI/XML export
|
|
145
|
+
│ ├── datasets/ # Benchmark dataset adapters (IDMT, etc.)
|
|
136
146
|
│ └── utils/ # Helpers (ffmpeg installer, research scripts)
|
|
147
|
+
├── benchmarks/ # Evaluation runners (see benchmarks/README.md)
|
|
137
148
|
├── docs/ # Sphinx documentation
|
|
138
|
-
├── tests/ # pytest test suite
|
|
149
|
+
├── tests/ # pytest test suite (131 unit + 8 integration)
|
|
139
150
|
├── .github/workflows/ # CI/CD (tests, build, publish, docs)
|
|
140
151
|
├── pyproject.toml # Package metadata and dependencies
|
|
141
152
|
└── uv.lock # Pinned dependency versions
|
|
@@ -146,13 +157,13 @@ DrumScript/
|
|
|
146
157
|
|
|
147
158
|
**For users:**
|
|
148
159
|
|
|
149
|
-
```
|
|
160
|
+
```zsh
|
|
150
161
|
pip install drumscript
|
|
151
162
|
```
|
|
152
163
|
|
|
153
164
|
**For developers:**
|
|
154
165
|
|
|
155
|
-
```
|
|
166
|
+
```zsh
|
|
156
167
|
git clone https://github.com/DrumScript/DrumScript.git
|
|
157
168
|
cd DrumScript
|
|
158
169
|
uv sync # this will create a .venv
|
|
@@ -175,10 +186,20 @@ DrumScript manages all dependencies via [`pyproject.toml`](pyproject.toml) using
|
|
|
175
186
|
- Ubuntu/Debian: `sudo apt-get install libportaudio2`
|
|
176
187
|
- Windows: Usually bundled with the `sounddevice` wheel.
|
|
177
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
|
+
|
|
178
195
|
---
|
|
179
196
|
|
|
180
197
|
## Quick Start
|
|
181
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
|
+
|
|
182
203
|
### End-to-end transcription
|
|
183
204
|
|
|
184
205
|
```python
|
|
@@ -188,10 +209,11 @@ import drumscript as ds
|
|
|
188
209
|
pdf_path = ds.transcribe("drum_audio.wav")
|
|
189
210
|
|
|
190
211
|
# Transcribe a full song (separates drums automatically)
|
|
191
|
-
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
|
|
192
214
|
|
|
193
215
|
# Get all intermediate results
|
|
194
|
-
result = ds.transcribe("drum_audio.wav",
|
|
216
|
+
result = ds.transcribe("drum_audio.wav", verbose=True)
|
|
195
217
|
print(f"Tempo: {result['tempo']:.1f} BPM")
|
|
196
218
|
print(f"Events: {len(result['events'])}")
|
|
197
219
|
```
|
|
@@ -223,11 +245,34 @@ results = ds.extract_stems(
|
|
|
223
245
|
"full_song.mp3",
|
|
224
246
|
drumless=True,
|
|
225
247
|
output_format="mp3",
|
|
226
|
-
|
|
248
|
+
verbose=True,
|
|
227
249
|
)
|
|
228
250
|
print(f"Backing track: {results['mix']}")
|
|
229
251
|
```
|
|
230
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
|
+
|
|
231
276
|
---
|
|
232
277
|
|
|
233
278
|
## CLI Usage
|
|
@@ -236,29 +281,29 @@ DrumScript also provides a command-line interface.
|
|
|
236
281
|
|
|
237
282
|
### Basic transcription (isolated drum stem)
|
|
238
283
|
|
|
239
|
-
```
|
|
284
|
+
```zsh
|
|
240
285
|
drumscript drum_audio.wav
|
|
241
286
|
```
|
|
242
287
|
|
|
243
288
|
### Full song transcription (auto-separates drums)
|
|
244
289
|
|
|
245
|
-
```
|
|
246
|
-
drumscript full_song.mp3 --full
|
|
290
|
+
```zsh
|
|
291
|
+
drumscript full_song.mp3 --full-song
|
|
247
292
|
```
|
|
248
293
|
|
|
249
294
|
### Extract a drumless backing track
|
|
250
295
|
|
|
251
|
-
```
|
|
296
|
+
```zsh
|
|
252
297
|
drumscript full_song.mp3 --drumless
|
|
253
298
|
```
|
|
254
299
|
|
|
255
300
|
### All options
|
|
256
301
|
|
|
257
|
-
```
|
|
302
|
+
```zsh
|
|
258
303
|
drumscript <audio_file> [OPTIONS]
|
|
259
304
|
|
|
260
305
|
Options:
|
|
261
|
-
--full
|
|
306
|
+
--full-song Transcribe a full song (isolates drums first via Demucs)
|
|
262
307
|
--drumless Extract a drumless backing track
|
|
263
308
|
--mute STEM Mute a specific stem (e.g. --mute bass). Repeatable.
|
|
264
309
|
--all-stems Export all individual stems (drums, bass, vocals, other)
|
|
@@ -269,7 +314,7 @@ Options:
|
|
|
269
314
|
|
|
270
315
|
### Examples
|
|
271
316
|
|
|
272
|
-
```
|
|
317
|
+
```zsh
|
|
273
318
|
# Transcribe with 6/8 time signature
|
|
274
319
|
drumscript drum_audio.wav --ts 6/8
|
|
275
320
|
|
|
@@ -293,7 +338,7 @@ We welcome contributions! DrumScript is intended to be a community-owned project
|
|
|
293
338
|
|
|
294
339
|
**[hello.drumscript@gmail.com](mailto:hello.drumscript@gmail.com)**
|
|
295
340
|
|
|
296
|
-
## Alpha Priorities (v0.
|
|
341
|
+
## Alpha Priorities (v0.0.4 < v1.0.0)
|
|
297
342
|
The alpha phase runs between 01 June and 31 August 2026
|
|
298
343
|
|
|
299
344
|
**What works today:**
|
|
@@ -339,6 +384,7 @@ DrumScript's own classification engine is **fully deterministic** — it uses ph
|
|
|
339
384
|
|
|
340
385
|
1. **[Demucs](https://github.com/adefossez/demucs)** — The stem splitting functionality is built upon the work of [@adefossez](https://github.com/adefossez).
|
|
341
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)).
|
|
342
388
|
|
|
343
389
|
---
|
|
344
390
|
|
|
@@ -349,14 +395,14 @@ DrumScript's own classification engine is **fully deterministic** — it uses ph
|
|
|
349
395
|
---
|
|
350
396
|
## Similar Projects
|
|
351
397
|
|
|
352
|
-
|
|
398
|
+
DrumScript has no affiliation with any of the projects below. They are listed for context and reference.
|
|
353
399
|
|
|
354
|
-
**[librosa](https://librosa.org/)** — The spectral analysis library that powers DrumScript's onset detection and feature extraction.
|
|
355
|
-
**[Demucs](https://github.com/adefossez/demucs)** — The stem separation model we use for isolating drums from full mixes.
|
|
356
|
-
**[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)
|
|
357
|
-
**[basic-pitch]
|
|
358
|
-
**[mir_eval](https://github.com/mir-evaluation/mir_eval)** — Standard evaluation metrics for music information retrieval tasks.
|
|
359
|
-
**[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.
|
|
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.
|
|
360
406
|
|
|
361
407
|
---
|
|
362
408
|
|