Solitito β guitar chord and note recognition
Recognition model for Solitito, a real-time guitar trainer written in Rust. Code, training scripts and documentation are in the GitHub repository β this one holds the two binary artifacts the app needs.
| file | |
|---|---|
best_model_v2_take6.onnx |
the model, 29 MB |
dsp_weights.json |
pseudo-CQT kernel in sparse format, 2 MB |
What it does
Takes 48 frames of features (144 CQT bins + 12 chroma + 12 bass energy, 16 kHz, 256-sample hop β 0.77 s of audio) and returns three heads:
| output | shape | meaning |
|---|---|---|
root_logits |
13 | 12 pitch classes + "Noise" |
quality_logits |
11 | maj, min, maj7, dom7, min7, m7b5, dim7, aug, sus, note, N |
pitch_logits |
12 | sigmoid β which pitch classes are sounding |
CNN with Squeeze-and-Excitation blocks, then a Transformer encoder with a CLS token. 7.3M parameters, CPU inference.
Results
Measured on a validation split grouped by source recording, with solo tracks excluded:
| metric | |
|---|---|
| root accuracy | 98.1% |
| pitch F1 | 0.909 |
| exact match (root and quality) | 92.4% |
Training data
Two sources: a synthetic set rendered through NAM amp models with exact labels, and GuitarSet for real playing.
Getting GuitarSet right took four runs. Half of it is _solo β monophonic
improvisation carrying the accompaniment's chord annotation β and its
instructed chord labels contain no maj7 or min7 at all, while calling 500
segments m that were played as m7. Fixing those two moved exact match from
44.8% to 92.4%. The details, with numbers, are in the GitHub README.
Using it
Put both files next to the Solitito binary. ./solitito --check verifies they
load.
Feeding this model your own features requires matching the DSP exactly β the
input is not raw audio. dist/gen_weights.py in the GitHub repository produces
the kernel, and dsp_weights.json here is its output.
License
MIT. GuitarSet is CC BY 4.0 β Qingyang Xi, Rachel M. Bittner, Johan Pauwels, Xuzhou Ye & Juan P. Bello, https://guitarset.weebly.com/.