midi_player send notes off
Status: Beta
Brought to you by:
rbd
send note offs for all sounding notes when you stop (for logic to avoid stuck notes) -- there should be an array of size 128 for each channel found in the midi file. Add 1 to the array element when note-on is issued, subtract 1 when note-off is issued. When the player is stopped, send note-offs for any non-zero entries. A linear scan is OK here because stopping is not time-critical or frequent.
Commit [r527]
[Solution]
channel_notes_count[16][128], an array of size 128 for each channel found in the midi file.
Add 1 to the array element when note-on is issued, subtract 1 when note-off is issued.
When the player is stopped, send note-offs for any non-zero entries.
send notes off to each playing note individually according to the notes counting.
[Modification] in midi_player.srp
Related
Commit: [r527]