Strange results when changing 4/4 measues with halfnotes tremolos between notes to 3/4

• May 2, 2019 - 09:26
Reported version
S3 - Major
PR created
  1. score in 4/4
  2. fill some measures with half notes
  3. select those measures
  4. apply the triple tremolo between notes to the selection
    Result like the attached tremolo44.mscz
  5. change timesig to 3/4
    Result: looks pretty ugly, but at least some of the note durations make some sense
  6. (suppose to not have noticed the above mess, which might not be on the same page you're doing the time sig change) save, close, reopen, see attached tremolo34.mscz
    Result in 3.0,5 and 3.1 Beta: crash
    Result in latest development build (and 3.1 Beta update, once that gets released): loads without a crash (due to the fix from #288474: Particular .mscz file crashes MuseScore 3.0.5 before it can open), but still lists half notes all over the place and lost one tremolo, or created one more.
    A DEBUG build also spits out Debug: cannot connect tremolo (...\MuseScore\libmscore\layout.cpp:2501, void Ms::connectTremolo(Ms::Measure*))
Attachment Size
tremolo44.mscz 3.34 KB
tremolo34.mscz 3.64 KB


I'm not sure though what the expected behavoir would be... maybe something like this (shortening the durations and keep the tremolos)?
Or getting rid if the tremolos and end up with this (same number of notes and same durations)?

@Jojo, your results make a tremolo between notes impossible unfortunately.

The results I would expect would be like
tremolo time sig.PNG

It looks quite complicated, but it keeps the same number of beats in the tremolo through a time change and does not affect playback.

In reality, I suspect that most people would want what looks like a tremolo between two dotted 1/2 notes that fills each entire measure. The problem is how to have the notes make sense when the notes change as seen in my second and third measures. You would need a mind reading algorithm.

So I'd suggest to disallow the timesig change altogether (in cases where it'd fail), with a similar error meassage as when that would make a tuplet cross a barline, "Tremolo cannot cross barlines"

This can cause a crash if you attempt to add a second time signature before the bugged tremolos. Use the score below, attach 6/8 before the first measure, now you can see the strange tremolos. Then attach 12/8 before the third measure, and MuseScore crashes. Running in Visual Studio shows the crash is because of a nullptr doing setTremolo() at line 2478 in libmscore/undo.cpp.

Attachment Size
Crash Score.mscz 3.31 KB

I think removing the tremolo would be acceptable as long as it's undoing the time sig restores the tremolos. I didn't test the PR so I don't know if this is an issue.