CC sent via MIDI action is sent *after* the note it's on?

• Mar 1, 2020 - 16:31

Hi all,

as I've shared in a few other posts (mainly https://musescore.org/en/node/301773 ), I've been working on ways to get MuseScore to send CC values via MIDI actions, in order to drive the selection of samples in Virtual Playing Orchestra via new SFZ files. Eventually I've reached the point where I have something usable, which I've shared in this project:

https://github.com/lminiero/musescore-vpo-midi-actions

Basically, it provides new SFZ files for VPO that use CC 14 to change articulation, and includes a simple node.js application that can edit an existing MuseScore score to add MIDI actions to the XML so that the UI provides ways to send those CC 14 values accordingly. This mainly works, but has one major issue.

Specifically, if I add a stave text on a note to send one of my MIDI actions, it is apparently sent after the note it is associated to, not before. This has of course the unwanted result that the related note will not be played as it should (it will still have the previous articulation on, if any). If I set it on the previous note, it works as expected (probably because the CC is sent right after the note "on", I guess), but has issues with tremolos (since even though it's a single note in the score, it's actually several short notes in MIDI). That said, tremolos I'm not really concerned about now (I can just remove the tremolo marking when exporting to MIDI), while the timing of the CC message is more problematic for me.

Is this indeed how MuseScore sends CC messages at the moment when configured as MIDI actions? Is there any way by which I can prioritize the CC message over any other MIDI message, including notes?

To give you a better understanding of the issue, I'm sharing two mscz files:

  1. testCC_on-note.mscz, as the title says, has stave text on the notes where the articulation change should happen;
  2. testCC_before-note.mscz, on the other hand, has stave text on the notes before the ones where the articulation should take place.

In both cases, you'll have to add the "0LM-1st-violin-SEC-KS-CC14.sfz" from my repo (after you've added it to the Strings folder of your VPO installation, of course) to the Synthetizer, and make sure it's correctly set in the mixer too (it should be, but it may have hardcoded references to my local paths).

Thanks!

Attachment Size
testCC14_on-note.mscz 6.21 KB
testCC14_before-note.mscz 6.27 KB

Comments

In reply to by Ziya Mete Demircan

Thanks for the feedback! I did suspect the messages had the same timestamp, as I then found out that Ardour for instance has the issue that it gives priority to Note events when there are many on the same tick, and it's going to be fixed in Ardour 6.

As such, I guess it's up to the synthetizer getting the messages to do things right, but the issue is that the same happens when I load the SFZ in Zerberus too, which means MuseScore seems affected too. Not sure if the ordering in the file itself matters too, when timestamps are the same, as in your screenshot the Note event does always seem to precede the CC one.

Do you still have an unanswered question? Please log in first to post your question.