denote
Portal and facade for audio-to-symbol tools (MIDI, chords, pitch from audio).
Denote wraps multiple audio analysis backends behind a unified Python interface. Each backend is an optional dependency — install only what you need.
Install
pip install denote # core only (librosa)
pip install denote[basic_pitch] # + MIDI transcription
pip install denote[torchcrepe] # + GPU pitch estimation
pip install denote[all] # everything
Quick Start
import denote
# Audio to MIDI (requires basic-pitch)
result = denote.transcribe("song.wav")
result.midi # pretty_midi.PrettyMIDI object
result.notes # list of NoteEvent(start_time, end_time, pitch, velocity)
# Pitch estimation (requires torchcrepe, or falls back to librosa pYIN)
pitch = denote.get_pitch("vocal.wav")
pitch.times # timestamps in seconds
pitch.frequencies # Hz (NaN for unvoiced)
pitch.confidence # voicing confidence
# Beat tracking (uses librosa, no extra install needed)
beats = denote.get_beats("song.wav")
beats.beats # beat times in seconds
beats.tempo # BPM estimate
# Source separation (requires torch + torchaudio; weights download once)
stems = denote.separate("song.wav")
stems.stems # {"drums", "bass", "other", "vocals"}: (2, frames) at stems.sr (44.1 kHz)
stems.vocals # the voice, mono
# Key estimation (uses librosa, no extra install needed)
key = denote.get_key("song.wav")
key.key # "A minor"
key.confidence # the winner's profile correlation (not a probability)
key.margin # lead over the runner-up: small means ambiguous
key.ranked[:3] # all 24 keys, best first; key.relative names the relative key
# Chords (no model, no download): Harte labels with times
chords = denote.get_chords("song.wav")
chords.segments() # [{"start": 0.0, "end": 2.9, "label": "C:maj"}, ...]; "N" = no chord
denote.get_chords("song.wav", vocabulary=["C", "G", "Am", "F"]) # only these chords
denote.get_chords(
"song.wav", sequence=["C", "G", "Am", "F"]
) # known order: when does each happen?
# Score any backend against labelled data (the "eval" extra):
# from denote.benchmark import evaluate_chords, guitarset_items
Choose Your Backend
# See what's available
denote.list_backends() # all registered backends
denote.list_backends("pitch") # ['librosa_pyin', 'pesto', 'swift_f0', 'torchcrepe']
# Each backend's tasks, code licence, weights licence and commercial use
# of the outputs ('yes', 'no', 'conditional', 'unclear' or 'provider terms'), read from
# configs: nothing is loaded
denote.backend_table("pitch")
# Specify a backend explicitly
pitch = denote.get_pitch("vocal.wav", backend="librosa_pyin")
Service-Level Access
For more control, access backends via the service layer:
# Per-backend service handle
denote.services.basic_pitch.transcribe("song.wav", onset_threshold=0.3)
denote.services.torchcrepe.get_pitch("vocal.wav", model="tiny", device="cuda")
# Native adapter (full backend API)
denote.services.basic_pitch.adapter
Supported Backends
| Backend | Task | Code licence | Weights licence (commercial use) | Install |
|---|---|---|---|---|
| Basic Pitch (Spotify) | MIDI transcription | Apache 2.0 | Apache 2.0 (yes) | pip install denote[basic_pitch] |
| torchcrepe | Pitch estimation | MIT | MIT (yes) | pip install denote[torchcrepe] |
| SwiftF0 | Pitch estimation | MIT | MIT (yes) | pip install denote[swift_f0] |
| PESTO | Pitch estimation | LGPL 3.0 | LGPL 3.0 (yes; redistributing the weights carries LGPL terms) | pip install denote[pesto] |
| librosa pYIN | Pitch estimation | ISC | no weights (yes) | (included) |
| Beat This! | Beats + downbeats | MIT | MIT (yes) | pip install denote[beat_this] |
| librosa beats | Beat tracking | ISC | no weights (yes) | (included) |
| librosa key (Krumhansl-Schmuckler) | Key estimation | ISC | no weights (yes) | (included) |
| Hybrid Demucs (torchaudio) | Source separation | BSD 2-Clause | unstated; author says research use (unclear) | pip install denote[torchaudio_hdemucs] |
HTDemucs on MLX (demucs_mlx) |
Source separation (Apple silicon) | MIT | unstated; converted from the same Demucs checkpoints (unclear) | own environment: python -m denote.isolated build demucs_mlx |
RoFormer via audio-separator (roformer) |
Source separation | MIT | default checkpoint MIT (yes); other community checkpoints unstated (unclear) | own environment: python -m denote.isolated build roformer |
denote.backend_table() gives the same columns from the backends' configs, where each licence's source is cited.
More backends coming: madmom, autochord.
Backends in their own environment
Some models pin dependencies that cannot share denote's environment (demucs-mlx pins its MLX, audio-separator needs torch>=2.13 on Apple silicon). Those backends run their model in a separate Python environment that denote builds with uv from pinned requirements (through ps.isolated), and talk to it through a long-lived worker process, so the model loads once:
python -m denote.isolated build demucs_mlx # one-time
python -m denote.isolated status # which are built, and where
result = denote.separate("song.wav", backend="demucs_mlx") # htdemucs on MLX
result.stems # {"drums", "bass", "other", "vocals"}
vocals = denote.separate("song.wav", backend="roformer").vocals # Mel-Band RoFormer
denote.services["roformer"].close() # free the worker's memory
Environments live in ~/.local/share/denote/envs/<backend> (set DENOTE_DATA_DIR to move them). A missing one raises denote.isolated.EnvNotBuilt with the build command; pass build_env=True to build it on first use instead. Building needs uv on the PATH. Each environment is installed from a lock kept with its backend (env.lock, every package pinned), so it is reproducible; python -m denote.isolated lock <backend> re-resolves it. A backend's worker keeps its model loaded (4.5 to 6 GB for these two) until denote.services[<backend>].close() or the end of the process.
Plugin System
Register your own backends:
import denote
denote.register_backend(
"my_tool",
config={
"name": "my_tool",
"tasks": ["transcribe"],
"pip_install": "my-tool",
},
adapter=MyAdapter(config),
)
Metadata
Release files for denote 0.0.14
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| denote-0.0.14.tar.gz | 148.3 kB | Without provenance | Details for denote-0.0.14.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| denote-0.0.14-py3-none-any.whl | Python 3 | none | any | Details for denote-0.0.14-py3-none-any.whl |
Total release size: 245.3 kB
Release files / denote-0.0.14.tar.gz
| Download URL | denote-0.0.14.tar.gz |
|---|---|
| Size | 148.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e86b0aa7cb62a3b176b0ac3a951d8997b6ab851bc8ccf0cefb22e4f754a29802
|
|
BLAKE2b-256 checksum How to use checksums |
a65a90e184b002cf62dac7a3bf768408a553fa66b48f8c87e5a3b3236688e345
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / denote-0.0.14-py3-none-any.whl
| Download URL | denote-0.0.14-py3-none-any.whl |
|---|---|
| Size | 97.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
41fd43bde13a65e15a14b6e506685778d63316a0f985fb95cf3ea0366df67536
|
|
BLAKE2b-256 checksum How to use checksums |
86190f46f8da042b8e6aeb481b322f4b96e00b38a37b6855b375f670a13eb9fb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for denote 0.0.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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.