[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-116971":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":16,"stars7d":17,"stars30d":17,"stars90d":15,"forks30d":15,"starsTrendScore":18,"compositeScore":19,"rankGlobal":10,"rankLanguage":10,"license":20,"archived":21,"fork":21,"defaultBranch":22,"hasWiki":21,"hasPages":21,"topics":23,"createdAt":10,"pushedAt":32,"updatedAt":33,"readmeContent":34,"aiSummary":10,"trendingCount":15,"starSnapshotCount":15,"syncStatus":35,"lastSyncTime":36,"discoverSource":37},116971,"dettato","kobimusic\u002Fdettato","kobimusic","SOTA multi-instrument audio-to-MIDI transcriber","https:\u002F\u002Fhuggingface.co\u002Fcollections\u002Fkobimusic\u002Fdettato",null,"Python",300,23,1,0,31,221,283,94.03,"Apache License 2.0",false,"main",[24,25,26,27,28,29,30,31],"audio-to-midi","automatic-music-transcription","deep-learning","drums","midi","music-information-retrieval","music-transcription","pytorch","2026-11-22 09:01:28","2026-11-23 18:09:09","# dettato\n\n\u003Cp>\n  \u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002Fcollections\u002Fkobimusic\u002Fdettato\">\u003Cpicture>\n    \u003Csource media=\"(prefers-color-scheme: dark)\" srcset=\"https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002Fhuggingface\u002Fbadges\u002Fresolve\u002Fmain\u002Fmodel-on-hf-md-dark.svg\">\n    \u003Cimg alt=\"Model on Hugging Face\" src=\"https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002Fhuggingface\u002Fbadges\u002Fresolve\u002Fmain\u002Fmodel-on-hf-md.svg\">\n  \u003C\u002Fpicture>\u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002Fkobimusic\">\u003Cimg alt=\"Hugging Face: kobimusic\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FHugging%20Face-kobimusic-FFD21E?logo=huggingface&logoColor=000\">\u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fkobi.music\">\u003Cimg alt=\"kobi.music\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fweb-kobi.music-B73E6A\">\u003C\u002Fa>\n  \u003Cimg alt=\"Python 3.10+\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fpython-3.10%2B-3776AB?logo=python&logoColor=fff\">\n\u003C\u002Fp>\n\nKobiMusic's **dettato** is an audio to MIDI transcriber. You give it a recording and it writes a MIDI file, with one track for\neach instrument and a drum track. On nine public benchmark sets it beats MuScriptor 1.3B, which is the next best open model. It\nscores 59.2 composite F1 and MuScriptor scores 45.1. On the three sets that Mirelo publishes, it also scores a bit higher than\nMirelo A2M v1.1 Pro, which is a closed model (60.8 to 56.1). The part I benchmarked is 20M parameters, and MuScriptor is about 65\ntimes bigger.\n\ndettato is four models in a chain. The transcriber (15.3M parameters) finds the notes. The evidence repairer (4.9M) fixes\nthem using the transcriber's evidence. The grouper (2.9M) puts the notes into instrument tracks, and the drum model (5.0M) writes\nthe drums. The code and the weights are under Apache-2.0, so commercial use is fine.\n\n**No copyrighted recordings.** dettato was trained on a mix of synthetic instrument recordings and CC solo instruments from the\nURMP dataset. The rest of the instruments morph together around 20 soundfonts, using the\n[soundfont babies](https:\u002F\u002Fkobi.music\u002Fresearch\u002Fmaking-soundfont-babies) technique I published. The vocals and the other\naugmentation are CC data too, and the grouper and drum model cards list the CC research datasets they use. No benchmark recording\nwas used for training.\n\n**What to expect.** It is hard to know how well it will work for your music from benchmarks alone, so I would try it first. The\nweakest step is putting the notes into the instrument tracks they belong in. For instance, on jazz recordings a quarter of the saxophone\nnotes can land in the piano track. It also writes performance MIDI. This means the notes keep the timing of the recording, and\nthey are not quantized to a beat. If you want something you can play from, like sheet music, I would recommend\n[Songscription](https:\u002F\u002Fwww.songscription.ai) or [Klangio](https:\u002F\u002Fklang.io). They are both great tools.\n\n![Composite F1 on all nine benchmark sets, and each system on each set it reports](https:\u002F\u002Fraw.githubusercontent.com\u002Fkobimusic\u002Fdettato\u002Fmain\u002Fdocs\u002Ffigures\u002Fbench_all_sets.png)\n\nThe benchmark is the eight sets from Table 2 of the MuScriptor paper, plus the Slakh2100 test set. The eight sets are Bach10,\nDagstuhl ChoirSet, PHENICX-Anechoic, RWC Popular, RWC Classical, RWC Genre, RWC Jazz and RWC Royalty-Free. I scored them with the\nrules from that paper. The composite is the mean of the note onset, note frame, note offset and drum F1.\n\n| system | parameters | composite | onset | frame | offset | drums |\n|---|---|---|---|---|---|---|\n| **dettato transcriber + drums** | 20.3M | **59.2** (95% 57.9-60.6) | **67.2** | **77.9** | **44.8** | **47.1** |\n| MuScriptor | 1.3B | 45.1 | 48.6 | 70.2 | 27.8 | 34.0 |\n\nMirelo A2M v1.1 Pro reports three of the sets: PHENICX-Anechoic, RWC Classical and RWC Royalty-Free. On those three, dettato\nscores 60.8. Mirelo A2M scores 56.1 (Mirelo published that number), MuScriptor scores 47.4 and YourMT3+ scores 45.7.\n\n![The three sets Mirelo A2M reports: composite and each measure for dettato, Mirelo A2M, MuScriptor and YourMT3+](https:\u002F\u002Fraw.githubusercontent.com\u002Fkobimusic\u002Fdettato\u002Fmain\u002Fdocs\u002Ffigures\u002Fbench_mirelo_sets.png)\n\nOn the eight MuScriptor sets alone, dettato scores 58.4. MuScriptor scores 44.6 and YourMT3+ scores 41.1, which are the numbers\nfrom the paper. The tables for each set are on the [dettato](https:\u002F\u002Fhuggingface.co\u002Fkobimusic\u002Fdettato) and\n[dettato-drums](https:\u002F\u002Fhuggingface.co\u002Fkobimusic\u002Fdettato-drums) cards.\n\nThe table scores the notes from the transcriber and the hits from the drum model. I measured the evidence repairer alone\n(+0.30 composite with the base network of the transcriber in front). The grouper was measured on my own track benchmark, and their\ncards have the details. I have not scored the four models as one chain yet, the way this package runs them.\n\n## Install\n\n```bash\npip install git+https:\u002F\u002Fgithub.com\u002Fkobimusic\u002Fdettato\ndettato song.mp3 -o out\u002F        # -> out\u002Fsong.mid + out\u002Fsong.json\n```\n\nThe weights download from the Hugging Face Hub on first use ([the dettato collection](https:\u002F\u002Fhuggingface.co\u002Fcollections\u002Fkobimusic\u002Fdettato)).\n\n![Beethoven, Symphony No. 5, i.: dettato's MIDI, one lane per instrument track plus timpani](https:\u002F\u002Fraw.githubusercontent.com\u002Fkobimusic\u002Fdettato\u002Fmain\u002Fdocs\u002Ffigures\u002Fexample_tracks.png)\n\n## Models\n\nFour models, 28.1M parameters in all, collected in the [dettato collection](https:\u002F\u002Fhuggingface.co\u002Fcollections\u002Fkobimusic\u002Fdettato). Each has its own model card:\n\n| stage | model | parameters | what it does |\n|---|---|---|---|\n| 1 | [kobimusic\u002Fdettato](https:\u002F\u002Fhuggingface.co\u002Fkobimusic\u002Fdettato) | 15.3M | notes from audio: onset, end and pitch on 88 keys, two voices per key |\n| 2 | [kobimusic\u002Fdettato-evidence](https:\u002F\u002Fhuggingface.co\u002Fkobimusic\u002Fdettato-evidence) | 4.9M | repairs the notes using the transcriber's own evidence: drops wrong notes, fixes onsets and ends, adds missed notes |\n| 3 | [kobimusic\u002Fdettato-grouper](https:\u002F\u002Fhuggingface.co\u002Fkobimusic\u002Fdettato-grouper) | 2.9M | puts every note in an instrument track and names the instrument |\n| 4 | [kobimusic\u002Fdettato-drums](https:\u002F\u002Fhuggingface.co\u002Fkobimusic\u002Fdettato-drums) | 5.0M | drum hits on General MIDI drum keys, drum kits and orchestral percussion |\n\n## Use\n\n### Command line\n\n```bash\ndettato song.mp3 other.wav folder\u002F -o out\u002F\n```\n\n- Takes any number of files and folders. Folders are searched recursively, and the folder structure is kept under `out\u002F`.\n- Writes `out\u002F\u003Cname>.mid` and `out\u002F\u003Cname>.json` (the tracks, note counts, the tuning estimate, which drum model ran).\n- Uses the GPU when there is one: CUDA, else Apple silicon's MPS (`--device cpu` to force the CPU).\n\n### Python\n\n```python\nimport dettato\n\nresult = dettato.transcribe(\"song.mp3\")       # loads the models once, then reuses them\nresult.save_midi(\"song.mid\")\nfor track in result.tracks:\n    print(track.name, track.program, track.is_drum, len(track.notes))   # notes: (N, 4) onset s, end s, pitch, velocity\n```\n\nFor many files, load once and keep the object:\n\n```python\nfrom dettato import Dettato\n\nmodel = Dettato.from_pretrained(\"cuda\")\nfor path in paths:\n    model.transcribe(path).save_midi(path + \".mid\")\n```\n\nEach stage can also be used on its own (`dettato.transcriber`, `dettato.evidence`, `dettato.grouper`, `dettato.drums`). The model\ncards show how.\n\n### Weights offline\n\nSet `DETTATO_WEIGHTS` to a folder holding the four model repos (`dettato\u002F`, `dettato-evidence\u002F`, `dettato-grouper\u002F`,\n`dettato-drums\u002F`, each with its `config.json` and `model.safetensors`) to load them from disk instead of the Hub.\n\n## How it works\n\n![The pipeline: transcriber, evidence repairer, grouper and drum model](https:\u002F\u002Fraw.githubusercontent.com\u002Fkobimusic\u002Fdettato\u002Fmain\u002Fdocs\u002Ffigures\u002Fpipeline.png)\n\n1. **Transcriber.** A pitch-equivariant lane network reads a harmonic log-frequency spectrogram and gives onset, frame and offset\n   probabilities for every key, for two voices per key, at 20 ms. The song is processed in overlapping 8 s windows (one every\n   2 s, averaged with a Hann taper), and notes come from peak picking. The network runs once per recording: that one pass feeds\n   the repairer and the grouper (below). The recording's tuning is estimated first, and the pass runs on the retuned audio when\n   it sits clearly off A440.\n2. **Evidence repairer.** A note-level transformer reads each note together with the transcriber's evidence for it (its probability\n   maps around the note and its last hidden state) and decides which notes to keep, where they start and end, and which notes are\n   missing.\n3. **Grouper.** The transcriber's internal features (the same pass, averaged over every other window) are gathered at every\n   repaired note, and a note-level transformer gives each note an instrument and a track embedding. Notes are clustered into\n   tracks. A track is kept only when it is clearly its own instrument, and tracks with the same instrument are merged.\n4. **Drums.** A small drum-kit model and an orchestral-percussion model. A router listens to the whole recording and picks one.\n   The drum model needs audio recorded at 40 kHz or more and is skipped for lower-rate sources.\n\n## Requirements\n\n- Python 3.10+, PyTorch 2.2+. A CUDA GPU is recommended: on an RTX 5060 (8 GB) a 4-minute song takes about 15 s and a 6-minute song\n  about 25 s, and both peak under 4 GB of GPU memory (above 250 s the transcriber's feature buffers are kept in host memory,\n  about 10 MB per second of audio, so GPU memory stops growing with the song's length). On Apple silicon it runs on MPS: on an M1 Ultra\n  a 30 s clip takes about 10 s (the drum model about half of it). The CPU works but is slow (a 15 s clip took 87 s on a laptop CPU,\n  model loading included).\n- Audio is read with `soundfile`. Formats it cannot read (m4a \u002F aac, some mp3s) go through `ffmpeg`, which must then be on the PATH.\n\n## Limits\n\n- Pitched notes cover the 88 piano keys, with at most two notes on the same key at once.\n- Instrument names are only roughly right: on real jazz about a quarter of a saxophone's or lead guitar's\n  notes can land in the piano's track, synth-heavy music is named less reliably, and a concert band gets rough names.\n- No drums for sources recorded below 40 kHz.\n\nThe example recordings in the figures are in the public domain: Beethoven's Symphony No. 5 and Grieg's Piano Concerto by Musopen\n(via Wikimedia Commons) and *The Stars and Stripes Forever* by the United States Marine Band.\n\n## Licence\n\nCode and model weights: Apache-2.0 (see [LICENSE](https:\u002F\u002Fgithub.com\u002Fkobimusic\u002Fdettato\u002Fblob\u002Fmain\u002FLICENSE) and [NOTICE](https:\u002F\u002Fgithub.com\u002Fkobimusic\u002Fdettato\u002Fblob\u002Fmain\u002FNOTICE)). The model cards list the datasets each model was\ntrained with and their licences. Some of the grouper's and the drum model's training datasets carry non-commercial terms.\n\n## Citation\n\n```bibtex\n@software{dettato2026,\n  title  = {Dettato: multi-instrument audio-to-MIDI transcription},\n  author = {Mills, Nathan},\n  year   = {2026},\n  url    = {https:\u002F\u002Fgithub.com\u002Fkobimusic\u002Fdettato}\n}\n```\n",2,"2026-11-24 04:54:42","CREATED_QUERY"]