infojunkie / musicxml-midi

MusicXML to MIDI converter via Musical MIDI Accompaniment (MMA).
https://blog.karimratib.me/demos/musicxml/
GNU General Public License v3.0
12 stars 1 forks source link

musicxml-grooves misses triplets #51

Open infojunkie opened 1 week ago

infojunkie commented 1 week ago

Attached is the latest musicxml-grooves.log

One class of issue remains, and it's a biggie. The sequence:

[DRUM-SNAREDRUM1:1] Remaining gap of 1 left before note at 3.
[DRUM-SNAREDRUM1:1] Remaining gap of 1 left before note at 3.3333333333333335.
[DRUM-SNAREDRUM1:1] Remaining gap of 1 left before note at 3.6666666666666665.

indicates that the quantization algorithm eagerly converts the first note to a binary-timed note instead of a ternary-timed one, and thus misses the subsequent tuplet altogether. The outcome is something like:

Screenshot from 2024-09-16 23-07-33

where the 2nd measure is a nonsensical assembly of fractional binary-time notes instead of the original intent of a triplet. The first measure was converted correctly because the first note happened to be have onset/duration attributes that drove the quantizer to recognize it as a ternary-timed note.

infojunkie commented 5 days ago

There was a bug in the triplet detection code that targeted the wrong duration. This has been fixed, but more cases remain as per the latest log.