Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MU3] Fix GH#15727: Crash on transpose of specific 3.6 score #16775

Closed
wants to merge 377 commits into from

Conversation

Jojo-Schmitz
Copy link
Contributor

Resolves: #15727 (but for 3.x, backport of #16770)

iveshenry18 and others added 30 commits May 12, 2022 08:34
Dolet also sometimes incorrectly exports footers as direction words,
particularly "This music has been legally downloaded . Do not
photocopy." This commit throws out staff text with these contents.

Duplicate of musescore#8678, part 2
This commit refines the regex for inferring credit directions. It
ultimately removes requirements for names (the part after the word
"by") due to the inordinate difficulty of writing strict regex that
catches all possible characters included in names. To mitigate false
positives, it clarifies/restricts the regex for the part before the word
"by". This compromise decreases the number of false negatives without
significantly increasing false positives.

Duplicate of musescore#8678, part 3
Some scores specify header text both in the <identification> element
and in the incorrectly-exported staff text. The latter tends to have
more information, so this commit hides the former when the latter is
present to avoid redundancy.

Duplicate of musescore#8678, part 4
Due to inferred (mis-exported) credits not having valid positioning
information, there were occasionally collisions with the title text.
This commit adds a reformatting function that runs at the end of the
import (if any inferred header text is present) that prevents these
vertical collisions.

Duplicate of musescore#8678, part 5
This commit extends the cases covered by inferred subtitles. Also, it
extends this functionality to apply to Titles—some titles are multi-
line, where the second line is really a subtitle. This commit adds a
function to infer these, extract them from the title, and add them
as the subtitle.

Duplicate of musescore#8678, part 6
This commit changes the vertical padding to 1.2 * the line height when
reformatting a header box with inferred credits or subtitles.

Duplicate of musescore#8678, part 7
This commit adds credit inferring to the title text (similar to what
already exists for subtitles). It also adds and refines the inference
cases for both credits and subtitles.

Duplicate of musescore#8678, part 8
See musescore#8678, issue possibly caused by another commit though
…n to determine note length

Currently, the importer uses MusicXML note duration instead of note length as calculated from the MusicXML note
type, dots, time-modification etcetera to determine how long a note takes and where to place the next note. When
the MusicXML note duration does not match the calculated value, various types of corruption occur.

When using the calculated duration, none of these problems occur. This change does not affect correctly encoded
MusicXML files.

Duplicate of musescore#8282, resp. backport of musescore#8429, part 1
…on to set duration as shown in the piano roll editor

See discussion in https://musescore.org/en/node/313339. This change enables correct import of Overture files containing
changed note durations (while leaving the note type unchanged) by using the duration to change the note's off time.
Strictly speaking Overture does not adhere to the MusicMXL spec, but this change does not seem to introduce any regression.
If necessary it can be made optional in future (either as a user setting or by making it Overture specific).

Duplicate of musescore#8282, resp. backport of musescore#8429, part 2
as it was needed for MSVC, which uses these in some headers, so they
conflict with MuseScore's functions, variables, marcos.

Partial backport of musescore#8765
…port in .musicxml format

Caused by superfluous and incomplete findUnit() function in exportxml.cpp.

Backport of musescore#8793
Dolet exports some N.C. chord symbols as a direction with a words
element containing "NmiCmi". This adds a simple inference to handle
that.

Duplicate of musescore#8651, part 1, plus a compile fix (adding a missing
paramenter,`_isBold`)
Dolet seems to occasionally export $ and Ø where segno and coda symbols
ought to be exported in lyrics and staff text. This commit adds those as
special cases to the map in text2syms.

Duplicate of musescore#8651, part 2
Sometimes pedals are imported that begin or end on segments that have
notes on tracks (or staves) other than the track the spanner is on.
Previously, this would cause incorrect tick adjustments on "change"
type pedals, and it would result in some pedals not being able to
compute a start or end element. This commit fixes these issues by
considering all tracks of a part when assessing pedal change tick
adjustments and when computing start elements.

Duplicate of #, part 1
Previously, the <offset> element was not correctly applied to any
spanners in <direction> elements. This commit fixes that and adjusts the
applicable tests accordingly.

Duplicate of musescore#8766, part 3
The version of IntervalTree we are using has received many upstream updates, however these have not been merged into here since 2013.

Backport of musescore#8808
Regression introduced by (the backport of) musescore#8510.

Backport of musescore#8818
The sizing of REPEAT_LEFT and REPEAT_RIGHT text is inconsistent due to
the inconsistent sizing of the coda and segno symbols. This commit adds
an override on MusicXML import based on the presence of non-symbol text.

Duplicate of musescore#8583
Currently, MuseScore displays copyright metadata in a centered footer.
This results in the information being displayed on every page, which
is inconsistent with many published scores.

This commit hides the footers on import and rather creates a VBox,
populates it with the copyright metadata, and places it at the bottom
of the first page (either below the first explicit pagebreak, or below
the last system of the first page after an initial layout).

Duplicate of musescore#8763, part 1
Dolet sometimes exports scores with up to 10 staves, most of which are
hidden. Since MuseScore has a MAX_STAFF limit of 4, such scores are
corrupted.

This commit adds a mechanism for discarding these hidden staves in such
cases. In doing so, it also must implement a mapping from MusicXML staff
number to index in the Part's Staff list. Therefore, this commit also
adds a function to MusicXmlPart that applies this mapping if present,
or defaults to decrementing the value, and uses this function wherever
the MusicXML staff number is read.

Duplicate of musescore#8763, part 2
When line and sign are not specified on a pedal element, they default
to "no" and "yes" respectively. Previously, this was handled by adding
Symbol elements for the "Ped." and "*" markings. These would layout
poorly and were inconsistent with pedal markings added to the score
manually.

This commit better handles this default case, and also makes the
corresponding changes to the export code to correctly handle such
pedal markings.

Duplicate of musescore#8763, part 6, fixing an mtest, maybe due to skipped commits
This commit adds code to cleanupLayoutBreaks() that attempts to reduce
the size of the copyrightVBox by 20% if it is present and there is page
overflow

Duplicate of musescore#8763, part 9
Duplicate of musescore#8763, part 11, plus fixing a merge conflict
In MusicXML, instrument names and abbreviations aren't necessarily
meant to be displayed in notation. Nonetheless, due to the instrument
creation process on import this would occur, even in scores where
part-name and part-abbreviation are set to "no".

This commit fixes that, and to that end creates member functions of
Part that change the name of EVERY instrument in the part (rather than
just the first one).

Duplicate of musescore#8763, part 12
lvinken and others added 28 commits November 20, 2022 16:19
Backport of musescore#14924, to fix musescore#14859

Plus fixing the templates causing the issue in the first place, as those cause other issues too, like adding the brace and also the barline span to an added __instrument__ too, not just to an added staff.
…easure beam

Backport of musescore#15001

Also fixing a compiler warning and some formatting
…s a tab note moving to a string at the highest fret.

Backport of musescore#15730
This reverts commit 5b30d14, backport
of musescore#12133.
Causes issues when reading scores containing "pedalLineStyle" with
earlier 3.x releases
This reverts commit 89e9471, PR musescore#7711.
Causes issues when reading scores containing "dontHideStavesInFirstSystem" with earlier 3.x releases.
This reverts commit d200716.

It seems no longer to be needed, most probably got obsoleted by later changes to SMuFL or Bravura/Petaluma

See also https://musescore.org/en/node/344717#comment-1175789
Further investigation shows that the current MusicXML importer contains two kinds of MAX_STAVES sized data structures: the voice mapping data and the per staff octave state. It also seems that in the current MuseScore releases (both 3.x and 4.x) MAX_STAVES is used for the maximum number of staves in an instrument template only. It obviously does not limit the actual number of staves in a part.

The structural solution would be to make these MusicXML importer data structures dynamically sized. A crude solution is to create a local fixed (larger) size. This here is an experimental 3.x version of the last one, it allows up to 6 staves per part.
reg. declaration hides previous local declaration (C4456)
Force building 32-bit Windows on GitHub CI using Qt 5.9.9 for now, as there is no 5.15.2 package available
currently for the GitHub CI builds.
Also allow "Save online" even from an unstable build in GUI
and on the commandline.
Temp. measure... needed only as long as there is no 'official' release
(which may mean forever).

Ignore a file generated on a master build same way it is ignored non in the master branch too.
Just eases the switching between master and 3.x

Fix some GitHub actions warnings reg. deprecated Node.js 12 vs. 16

Fix vtests build using a similar method as the mtest.
Doesn't work, so back to 5.9.8, for Linux, for now...

Trick musescore.com to allow save, by claiming the score to stem from 3.6.3...

Change Linux builds to use Ubuntu 20
and partly sync with master's ci_linux_mu3.yml
to any but the top part/instrument, if parts have been generated, and another on saving after having added it.

Backport of musescore#16730
…files from Reaper

Articulations without placement or type attributes import as "chord automatic".
Articulations with placement or type attributes import as "above chord" or "below chord".

Backport of musescore#16751 plus fixing mtests
@Jojo-Schmitz Jojo-Schmitz deleted the 3x-fixTransposeCrash branch March 13, 2023 17:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet