Changing relative velocity ver 3. to absolute velocity ver. 4

• Jun 1, 2023 - 08:55

I have dozens of scores written with Musescore 3 where I used "relative velocity" to achieve realistic playback for classical guitar with 3-4 voices on same staff.

When I open these scores in Musescore 4, all negative (relative to mean) velocity values from Musescore 3 are displayed, but ignored in playback. To achieve realistic playback I need to edit all notes in every score and alter the velocity values to corresponding absolute positive values.

Question: how to I change relative velocity values from Musescore 3 to "absolute velocity values" in bulk?
It should happen "automatically" on import from Musescore 3.
Or can someone write a plugin?

I currently hesitate to open any score in Musescore 4 because of this extra work required for perfectly good Musescore 3 scores...


Comments

I put together a plugin you can try in MuseScore 4 to correct relative velocity settings made in earlier versions. It won't handle absolutely "user" velocity settings, only relatively "offset" velocity settings. Let me know if it works for you. For now, you need to select the portion of the score you want to affect (Ctrl+A to do the whole thing).

Attachment Size
fix-velocity.qml 1.11 KB

In reply to by Marc Sabatella

Thank you Marc for your help. Your plugin works, almost ok. Remarks:
1. When I select measures and run the plugin, an empty (blank) dialog without title appears and it does not disappear when processing is finished. I need to close this dialog manually. This dialog persists (remains open on screen) after I close Musescore 4 (!). This dialog should not be empty, but should indicate the title of your plugin and perhaps the number of measures that your plugin is processing. The dialog should disappear when the action of your plugin is completed.

  1. When I run your plugin twice on the same selection, the velocity on all notes is reset to "--". Since we import score from Musescore 3, your plugin should be allowed to run only once for any given measure. So you should set your plugin to remember measures that were processed and prevent these measures from being processed more than once by your plugin.

In reply to by Marc Sabatella

Commented out pluginType line.

There is a way to remember the selection, but it would be an overkill not worth the effort.

Need for improvement: In Musescore 3* note velocity offsets were in the range-128 to +128. In Musescore 4 the range is 64 +/- 64. So the Musescore 4 offsets applied by your plugin need to be HALVED to reproduce note velocity settings from Musescore 3.

In reply to by Marc Sabatella

I tested Musescore 3 velocity offset -40. When I use your plugin it gives note velocity 64-40=24. When I halve the Musecore 4 offset to -20, I get 64-20=44 which produces relative note volumes similar to Musescore 3.

In Musescore 3 I was able to enter note velocity offset from -128 to +128 (256 steps). Musescore 4 allows me to enter note velocities form 0 to 127 (128 steps). So we MUST halve the Musescore 3 offset values to insert them meaningfully into Musescore 4 (if both scales are linear).

I changed your line from
noterest.userVelocity += offset

to
noterest.userVelocity = noterest.userVelocity/2 + offset

and then the plugin provides Musescore playback very similar to Musescore 3.

In reply to by Marc Sabatella

Interesting. One thing in MS4 is still quite unclear to me.
Is MS4 user velocity (like value 64) an absolute velocity or a relative/offset velocity?
When we see zero based velocities (like +10, 0, -10...) then it's quite clear these must be offsets. But when we see 64 based velocities (like 74, 64, 54...) than these look like absolute velocities i.e. 64 is mezzo forte.

In reply to by hstanekovic

It's a hybrid, a kind of awkward middle ground right now between the old offset system and new planned absolute system that will support automation lanes etc. As it is, 64 means, "obey the dynamic marking". Values higher than 64 will be louder than the dynamic, values less than 64 we'll be quieter. The idea was to keep the overall scale still 0 to 127 to mimic MIDI and not be confusing to people who don't understand offsets. Instead, it's confusing to those who do :-)

In reply to by Marc Sabatella

It is completely fine to introduce new absolute MIDI dynamics, PROVIDING that there are clear explanations and tools to migrate from the relative offsets in MS3 to the new system.

Ideally the translation to the new absolute dynamics should be done on import from MS3, transparently to the User. This option would save everyone lots of time and effort...

In reply to by mountbest@gmail.com

@mountbest@gmail.com wrote > ...there [should be] clear explanations and tools to migrate from the relative offsets in MS3 to the new system. Ideally the translation ... should be done on import from MS3, transparently to the User. This option would save everyone lots of time and effort ...

Agree 100%!

Despite its many issues there's a LOT to be said for MuseScore 4, especially new scores created since MuseScore 4.1.

But the more I explore the further I'm dissuaded by regressions, dysfunction and awkward design ... and particularly the cost of faulty score migration. In MS 4.2 my imported 3.6 scores are strewn with miscalculated velocities and nonfunctioning dynamics, even with MSBasic sounds.

Imagine if Microsoft updated Excel with a new formula system that caused lots of formulas to fail in spreadsheets made with the previous build ... I'd hope on import Excel would at least post an alert to warn the user about each deprecated formula.

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