Duplicated note events in test files
Thanks to mirabilos for the report.
Quote:
you added tons of lines to e.g. mtest/libmscore/midi/testTieTrill-ref.txt
(all the reference files) in there, but why is the same event generated
four(!) times at the same MIDI time?
Example:
@@ -1,4 +1,8 @@
+Tick = 0 Type = 176 Pitch = 2 Velocity = 80 Channel = 0
Tick = 0 Type = 144 Pitch = 74 Velocity = 80 Channel = 0
+Tick = 0 Type = 176 Pitch = 2 Velocity = 80 Channel = 0
+Tick = 0 Type = 176 Pitch = 2 Velocity = 80 Channel = 0
+Tick = 0 Type = 176 Pitch = 2 Velocity = 80 Channel = 0
Tick = 0 Type = 3 Pitch = 0 Velocity = 127 Channel = 0
Tick = 55 Type = 144 Pitch = 74 Velocity = 0 Channel = 0
Tick = 60 Type = 144 Pitch = 72 Velocity = 80 Channel = 0
@@ -16,6 +20,10 @@ Tick = 415 Type = 144 Pitch = 74 Velocity = 0 Channel =
Tick = 420 Type = 144 Pitch = 72 Velocity = 80 Channel = 0
Tick = 475 Type = 144 Pitch = 72 Velocity = 0 Channel = 0
Tick = 480 Type = 144 Pitch = 74 Velocity = 80 Channel = 0
+Tick = 480 Type = 176 Pitch = 2 Velocity = 80 Channel = 0
+Tick = 480 Type = 176 Pitch = 2 Velocity = 80 Channel = 0
+Tick = 480 Type = 176 Pitch = 2 Velocity = 80 Channel = 0
+Tick = 480 Type = 176 Pitch = 2 Velocity = 80 Channel = 0
Tick = 480 Type = 4 Pitch = 0 Velocity = 80 Channel = 0
Tick = 535 Type = 144 Pitch = 74 Velocity = 0 Channel = 0
Tick = 540 Type = 144 Pitch = 72 Velocity = 80 Channel = 0
Both times, it is added four times. Is that not redundant?
Or is the output incomplete and the control carries extra info?
The reason this happens is because events are added for every voice. Evidently this is leading to the duplication of the initial note events for chord rests with a static velocity.
I'm working on a fix for this.
Comments
https://github.com/musescore/MuseScore/pull/4937
Fixed in branch master, commit 8a9b5eb8b8
fix #287906: velocity events are duplicated for the same channel
Fixed in branch master, commit dcdfaf4ac5
_Merge pull request #4937 from jthistle/287906-duplicated-vel-events
fix #287906: velocity events are duplicated for the same channel_
Automatically closed -- issue fixed for 2 weeks with no activity.