This repository is a listening-oriented research artifact, not the full development repository. It contains a compact demo for comparing three candidate MIDI staccato duration models on one isolated MidiCaps/Lakh target line.
Open the static notebook-style report:
GitHub Pages serves docs/index.html, with relative audio paths pointing to the MP3 files under docs/audio/staccato_listening_grid_three_models/. The source notebook-style HTML is also kept at notebooks/staccato_listening_demo.html.
The inter-onset interval is the time from one note attack to the next:
IOI_i = onset_{i+1} - onset_i
The demo compares:
- A - 40% of IOI:
d'_i = 0.4 * IOI_i - B - 120 ms absolute duration:
d'_i = 120 ms - C - 40% of IOI, limited to 40-120 ms:
d'_i = max(40 ms, min(0.4 * IOI_i, 120 ms))
All models preserve note onset and velocity. They only move note offsets.
This demo assumes the selected target is a mostly monophonic line. For chordal or strongly polyphonic tracks, the next-onset safety rule may over-shorten simultaneous notes.
MP3s are included for listening. Rerunning the notebook requires the MidiCaps/Lakh source MIDI, a General MIDI soundfont, FluidSynth support through PrettyMIDI, and ffmpeg for MP3 conversion. Source MIDI files and the full dataset are not included here.
src/staccato_edit.py: staccato models, IOI measurement, edit application, and validation.src/staccato_listening_demo.py: demo infrastructure for loading MIDI, rendering audio, and building the listening grid.