joining scores via album loses voltas, slurs, keysig changes to C major

• Nov 14, 2014 - 12:39
Type
Functional
Severity
S2 - Critical
Status
closed
Project
Tags

If joining scores via album, voltas get lost
I.e. if a score contained voltas, the joined score does not
data loss -> critical

self-built c13a719, Windows 7 (Enterprise, 64bit)


Comments

Title joining scores via album loses voltas joining scores via album loses voltas and slurs

loses slurs too, this to is a critical data loss
ties are kept though, but their 'dotted' style gets lost

Not sure, this could also be an issue with import from 1.x, the scores I joined via album all were created with 1.x.

keysig changes to C-major (i.e. no accidentals) are lost too!

Status (old) fixed active

Hmm, seems vertical spacers do work... or not, works if the space is in the 1st score, but not if it is in any subsequent one.

But a change to C major does not. It works when the change is inside a score (score starting with e.g. G-major, then switching to C-major), but not if between scores (e.g. score1 in G-major, score2 in C-major).

A minor point: It does add line breaks, even if a page break is already present, this is not really needed, but doesn't harm either, I guess. The code does check for a line break before adding one, guess it'd be an easy optimization to also check for a page break? Something like this in libmscore/score.cpp, line 2117:

if (!lastMeasure->lineBreak() && !lastMeasure->pageBreak()) {
      lastMeasure->undoSetBreak(true, LayoutBreak::Type::LINE);
      }

Joining doesn't work at all if there is a 'score' in the list that doesn't have any measure (like a title page or an index), fails with an alert box of "Error while creating score from album" and a debug message of "cannot append score (...mscore/album.cpp:141, bool Ms::Album::createScore(const QString&)". This failure is new, it worked before your fix.

"Joining doesn't work at all if there is a 'score' in the list that doesn't have any measure"
Scores need to have the same number of staves or parts. I could maybe special case 0 staff scores. Actually you could do it ;)

libmscore/score.cpp, line 2117
Sure

The 0-measure score I tried to join has 2 staves, just no measures.

Ah, I see, it needs to be equal, before it was OK if the 1st score had the same or more staves.

I guess changing those 2 "!=" to "<" in Score::appendScore() should do the trick

My assumption is that the loss of C major is another side effect of the fact we don't actually store any key sig at all for scores in C major. I am still a little concerned about this in general although so far we've gotten by just fixing whatever problems this causes as they come up. So I guess we'd need to special case that here as well.

yes, something like: if the to be appended score's 1st measure doesn't have any key sig (but the last measure of previous score had), add a key change to C-major