Add ADTOF drum transcription to MIDI pipeline#10
Open
kurtjcu wants to merge 3 commits intotsondo:mainfrom
Open
Add ADTOF drum transcription to MIDI pipeline#10kurtjcu wants to merge 3 commits intotsondo:mainfrom
kurtjcu wants to merge 3 commits intotsondo:mainfrom
Conversation
Introduce dedicated Automatic Drum Transcription (ADT) support using ADTOF-pytorch. Drums were previously routed through BasicPitch (a pitched-instrument model) which produced poor results on unpitched percussion. - Add DrumMidiSpec to model registry with 5-class ADTOF descriptor - Add drum_map.py: GM MIDI note mapping for ADT class outputs - Add adtof_backend.py: AdtofBackend with load/predict/evict lifecycle - Extend notes_to_midi with is_drum parameter (channel 10, fixed 60ms note duration, no pitch bend) - Add adtof-pytorch dependency
Route drum stems through ADTOF instead of BasicPitch in the MIDI extraction pipeline. The existing FluidSynth render already handled channel 10 correctly — this closes the transcription gap. - Add ADTOF lazy loading and eviction to MidiModelLoader - Add drum detection branch to MidiPipeline with 3-stage progress - Extend ExtractRequest with adt_model parameter - Add adt_models list to /api/midi/gm-programs response
Show an ADT model dropdown in the MIDI panel when drum stems are selected. Add tests covering drum map, ADTOF backend protocol, registry spec, pipeline routing, loader integration, and API endpoint behavior.
4578e4f to
520d8eb
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
DrumMidiSpecin the model registry with 5-class output (kick, snare, tom, hi-hat, cymbal) mapped to GM MIDI note numbersWhat changed
utils/drum_map.py,pipelines/adtof_backend.pymodels/registry.pyDrumMidiSpec+adtof-drumsentrymodels/midi_loader.py,pipelines/midi_pipeline.pybackend/api/midi.pyadt_modelparam on extract, ADT models in/gm-programsutils/midi_io.pyis_drumparameter for channel 10 + fixed durationfrontend/components/midi.jspyproject.toml,uv.lockadtof-pytorchdependencyTest plan
pytest tests/test_drum_map.py tests/test_drum_midi_spec.py tests/test_adtof_backend.py tests/test_midi_loader_drum.py tests/test_midi_pipeline_routing.py tests/test_drum_midi_integration.py tests/test_notes_to_midi_drum.py