scrime-u-bordeaux / web-midifile-performer

a web version of the midifile performer software
0 stars 0 forks source link

Aftergraces synced with other unrelated notes will not receive listeners #100

Open NyuBlara opened 5 hours ago

NyuBlara commented 5 hours ago

As an example : K276-1, measure 40.

image

The first of these two aftergraces is triggered in this set, along with the two left-hand eighth notes. It is not found when setting up noteheads, and thus receives no listener.

In general, aftergraces should not be synced with anything. So the best way to fix this would actually be to force a small delay between them and any other events when parsing the XML file.

josephlarralde commented 4 hours ago

Yep, thinking a little bit overhead I'm seriously considering rewriting the C++ library in javascript to extend it more easily since we don't have other active c++ bindings ... also I recently experimented behaviours that smelled like memory leaks as discussed in a previous issue of the library. We could then implemend setTimeout and setInterval based logic for trills etc directly in the js library

NyuBlara commented 3 hours ago

IMHO, this is above the library level. Grace notes only exist in the MusicXML realm ; they are only a notation artifact, which has been mostly abandoned in modern music, and to a MIDI file, they are ordinary short notes. The same is true of trills and other such concepts : they are not recognizable in a MIDI file, and thus cannot be dealt with at that level of abstraction.

josephlarralde commented 3 hours ago

Yes, but : with it we are currently limited to action -> reaction (1 gesture produces 1 synchronous event and that's all)

NyuBlara commented 3 hours ago

In that sense, yes, we could reflect on this ; but I feel it's unrelated to the present issue.

josephlarralde commented 3 hours ago

Yeah, sorry I'm a serial thread hacker ... The relationship I see with the current issue is : "it would be nice to easily schedule events from the model (but the model would have to be rewritten)"