Warning for the new version of Musescore

• Mar 15, 2025 - 08:34

If you have a lot of plugins, I suggest making a copy of the file 'config.json'
C:\Users(username)\AppData\Local\MuseScore\MuseScore4\extensions\ -> config.json (WINDOWS)
/home/(username)/.local/share/MuseScore/MuseScore4/extensions/ -> config.json (LINUX)
before loading Musescore 4.5. To make sure that the new version can read it, you should replace all instances of "muse:\/\/
with
"musescore:\/\/
otherwise it creates a new one and you will need to re-enable all plugins.


Comments

In reply to by michaelnorris

Incidentally, I had reported the problem here...
https://musescore.org/en/node/373273
It doesn't seem to me that in a blue rectangle selection you can find the SLUR_SEGMENT: just like before this Element is only accessible through individual selection. For the Tie element there is no problem, you can get the beginning and end from the firsTiedNote and lastTiedNote (or even tieBack and tieForward) properties of the Note element, for the Slur element at the moment I can't think of anything, I'll think about it... But I'm rather pessimistic.

In reply to by ILPEPITO

Actually, the blue rectangle selection ONLY seems to return SLUR_SEGMENT in MS 4.5 — no SLUR objects are accessible any more. If only there were some way to get the SLUR object from a SLUR_SEGMENT — in the MS code base, there is a callback slurSegment.slur() which returns the underlying SLUR object, but that doesn't seem to be exposed to the API.

In reply to by michaelnorris

You're right, by golly! I assumed that in Musescore 4.5 there were no differences... now instead in the blue rectangle you have SLUR_SEGMENT. But what a nice surprise! This is good news (you can access the offsets, I can guarantee it because I just checked it); the bad news is that spannerTick(s) has totally disappeared from the properties. Maybe they will reappear in the next version... eh eh eh. I want to ask you a question: does it seem serious to you that a program can evolve in this way? Personally, I am seriously reconsidering going back to 3.6.2.
Moving on to your problem, I would solve the problem by learning to analyze mscx files, or trying to establish relationships between page sizes and positions, but it is certainly a complex and not always reliable system... I don't know what else to tell you.

In reply to by ILPEPITO

I wonder if the issue could be resolved in spanner.cpp, specifically the property delegate method?

EngravingItem* SpannerSegment::propertyDelegate(Pid pid)
{
switch (pid) {
case Pid::PLAY:
case Pid::COLOR:
case Pid::VISIBLE:
case Pid::PLACEMENT:
case Pid::EXCLUDE_FROM_OTHER_PARTS:
case Pid::POSITION_LINKED_TO_MASTER:
case Pid::APPEARANCE_LINKED_TO_MASTER:
return spanner();
default: break;
}
return nullptr;
}

All the properties listed above return valid entries to the plugin, plus the slur-specific ones mentioned in slurtie.cpp — but none of these handle the Spanner properties. I feel like if we could somehow handle the basic spanner properties in this method as well, that would solve our problems (and also give us access to the SlurSegment properties such as offsets)?

In reply to by Jojo-Schmitz

I've never compiled the MuseScore source code before, but I'm planning to try it, in order to see whether making the following edit in spanner.cpp (adding the spannerTick and spannerTicks properties) would fix the bug:

EngravingItem* SpannerSegment::propertyDelegate(Pid pid)
{
switch (pid) {
case Pid::PLAY:
case Pid::COLOR:
case Pid::VISIBLE:
case Pid::PLACEMENT:
case Pid::EXCLUDE_FROM_OTHER_PARTS:
case Pid::POSITION_LINKED_TO_MASTER:
case Pid::APPEARANCE_LINKED_TO_MASTER:
case Pid::SPANNER_TICK:
case Pid::SPANNER_TICKS:
return spanner();
default: break;
}
return nullptr;
}

In reply to by michaelnorris

Best wishes... I'll add a detail that I noticed only now (I've never used spannerTick(s), so I didn't realize the matter before): just as the offsets in this type of elements are only available in their _SEGMENT version, for spannerTick(s) exactly the opposite is true, and this already from Musescore 3.6.2 (As soon as it occurred to me, I checked it). These, like other properties, are only virtually present in the object, but do not contain the information. In version 4.5 apparently spannerTick(s) has been eliminated, so it does not even appear virtually. Feel free to make your own considerations on all this...

In reply to by ILPEPITO

Thanks. The way I understand the source code of MuseScore (though I could be wrong), the SpannerSegment class inherits properties from the Spanner superclass (including tick and ticks). But it seems like those very properties of the Spanner superclass are then not being exposed in the API, because the SpannerSegment is not passing on the properties of spannerTick and spannerTicks to its superclass.

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