Undo introduces non-existent step after changing note value in tremolo between notes

• Feb 7, 2012 - 23:37
Type
Functional
Severity
S2 - Critical
Status
closed
Project
Tags

1. Open attached score.
2. Select first note.
3. Change to lower value.
4. Undo.

Result: The former state isn't restored.

Using MuseScore 1.1 - Mac 10.6.8.


Comments

Title [1.1] Undo introduces non-existant step after changing note value in tremolo [1.1] Undo introduces non-existent step after changing note value in tremolo
Title [1.1] Undo introduces non-existent step after changing note value in tremolo Undo introduces non-existent step after changing note value in tremolo

This is still valid.

1. Open attached score (produced in 1.3).
2. Click on first note.
3. Change to minim.
4. 'Undo'.

Result: The second note isn't restored.

Undo introduces non-existent step after changing note value in tremolo between notes.png

Note: Marking as 'critical' because undo doesn't restore the correct step.

Using MuseScore 2.0 Nightly Build (43b7d1d) - Mac 10.7.5.

The specific problem of this issue report is due to a bug in import of 1.x tremolo between two notes: the actual value of the two notes is not set to half the "visual" value, i.e. in the example the notes are imported as 4/4 notes instead of actual 2/4 notes appearing as 4/4 notes. This can be easily fixed in libmscore/measure.cpp.

However, there is a further little problem when changing note duration if a tremolo between two notes is present. Try to reproduce from scratch in 2.0 the example and then change to lower value: if you select 2/4 nothing happens because the notes are actual 2/4. If you choose any other duration, the first note is changed, but the tremolois still (wrongy) present. If you delete this tremolo both note values change to half the (new) duration of the first note.

Title Undo introduces non-existent step after changing note value in tremolo Undo introduces non-existent step after changing note value in tremolo between notes

Thanks ABL for explaining :).

I think it just affects tremolo between notes?

> I think it just affects tremolo between notes?
I think so.

I tried to prepare a 1.3 file to test tremolo import.
I found that in 1.3 we can create a tremolo between two grace notes (and even between a grace note and a regular note).
Even if I am not completely sure about its musical meaning, this is not possible in 2.0 at the moment.
The solution could be to use something similar to Soerboe's solution for slurs manually merged in 430374304 , i.e. find the proper segment given the tick AND the grace level.
Do you think this extension should be done? Do you have any references about the use annotations + grace notes? (for example: tremolo, staccato, et cetera...)

Attached a file produced in 1.3 with different examples of tremoli (and pdf of how it appears in 1.3).

Attachment Size
tremolotest.mscx 30.38 KB
tremolotest_1.3.pdf 15.92 KB

Sorry for the off-topic. I was trying to fix the import of tremolo between notes and things become much more complex if tremolo between grace notes is allowed.
I posted a pull request for 1.x tremolo between two notes import fix:
https://github.com/musescore/MuseScore/pull/383
However, at the moment this pull request does not work properly for a tremolo between two grace notes.

Moreover, it is just a partial fix for this bug.
With the code from the pull request, the tremolo between two notes behaves as a 2.0 "native" tremolo between two notes.
However, a bug similar to the original issue can be obtained by starting from scratch in 2.0:
1. Create new score.
2. Create a tremolo between two notes (ES: two 1/2 notes, which then appear as whole notes after the tremolo is applied).
2. Select the first note.
3. Change to lower value different from the actual value (ES: 1/4 or lower).
4. Undo: everything looks fine, but actual duration of the first note is not correct (actual duration now is equal to apparent duration).
5. Select the first note.
6. Change to lower value.
7. Undo.

Result: the second note disappears, as in the original bug report.
Windows 8, rev. 43b7d1d5

Proposal: tremolo between notes could be deleted (and pushed in the undo stack) if the note duration is changed.