[Regression] MIDI fixup for overlapping note shouldn't kick in for different midi tracks
A single instrument is exported to different MIDI tracks while in MuseScore it's played on the same channel. MIDI fixup for colliding notes should take this into account. Since it currently does, we have long sounding notes in MIDI
Simple example attached
See : https://musescore.org/en/node/270869 and https://musescore.org/en/node/270823
Attachment | Size |
---|---|
Midi_problems.mid | 167 bytes |
Midi_problems.mscz | 4.93 KB |
Comments
Definitely not. The same channel is the same channel, even
if on a different track ("channel" here means the tuple made
of MIDI port and MIDI channel, to have more than 15 instruments
playing at the same time), and collisions between the same channel
on different tracks (e.g. piano hands) must be handled the
same as collisions on the same track, because otherwise, you
get the "shorter note cuts off longer note" problem back.
In reply to Definitely not. The same… by mirabilos
This is how it looks in the original version of the MIDI collisions patch:
This is entirely correct output for the scope of the fix (no restriking).
Then, you added the restrike patch, which fixed the problem that two “keydowns” in this example were removed, but introduced the change in MIDI output:
This, indeed, introduces two more or less slight problems. The MIDI output has collisions again (probably less slight for some players)
By contrast, this is how it looks when you assign different channels to the hands:
I’m wondering if restriking can’t be made to create similar-looking output… lemme think about it.
In reply to This is how it looks in the… by mirabilos
Yup, I did it.
https://github.com/musescore/MuseScore/pull/3588
Turns out that this is, indeed, a restriking-only problem, and I tweaked the restriking patch enough to make it work good enough for its intended lifetime.
Fixed in branch 2.2.1, commit d3bd3a280f
fix #270878: improve restriking
• hoist the temporary noteoff event created for restriking to the
same track as the corresponding noteon event
• use the restriking track for the “real” noteoff events
Note: staffIdx can be 0, so the + 1
Fixed in branch 2.2.1, commit f86d0075ba
Merge pull request #3588 from mirabilos/midi-270878
fix #270878: improve restriking
Fixed in branch 2.3, commit 83b2f2372c
fix #270878: improve restriking
• hoist the temporary noteoff event created for restriking to the
same track as the corresponding noteon event
• use the restriking track for the “real” noteoff events
Note: staffIdx can be 0, so the + 1
Automatically closed -- issue fixed for 2 weeks with no activity.