Skip to content

Conversation

@iveshenry18
Copy link
Contributor

Resolves: ENG-35: All elements of small notes should be reduced in size

Since MusicXML only stores note-level information about smallness
(<type size='cue'> and <cue>), chords that should be small were being
read as normal-sized chords of small notes. This caused issues with
the sizes of flags, ledger lines, and articulations.

This commit adds handleSmallness to ensure that a chord with all small
notes is imported as a small chord with all non-small notes, as well
as a test for this particular case.

For future discussion: it may be worth considering making the _small attribute of a Chord fully derived from its member Notes; leaving the two independent can create redundancy and other errors such as this one.

  • I signed CLA
  • I made sure the code in the PR follows the coding rules
  • I made sure the code compiles on my machine
  • I made sure there are no unnecessary changes in the code
  • I made sure the title of the PR reflects the core meaning of the issue you are solving
  • I made sure the commit message(s) contain a description and answer the question "Why do those changes fix that particular issue?" or "Why are those changes really necessary as improvements?"
  • I made sure the commit message title starts with "fix #424242:" if there is a related issue
  • I created the test (mtest, vtest, script test) to verify the changes I made

Since MusicXML only stores note-level information about smallness
(<type size='cue'> and <cue>), chords that should be small were being
read as normal-sized chords of small notes. This caused issues with
the sizes of flags, ledger lines, and articulations.

This commit adds handleSmallness to ensure that a chord with all small
notes is imported as a small chord with all non-small notes, as well
as a test for this particular case.
* I.e. a chord is "small until proven otherwise".
*/

static void handleSmallness(bool cueOrSmall, Note* note, Chord* c)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it makes sense to handle this logic directly in Chord class. Just because it might be useful not only for import functionality, but for the whole domain model

We can consider it in the further PRs

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree! Taking it a step further, we could make the _small attribute of a Chord fully dependent on its member Notes (i.e. Chord::setSmall() just sets all the Notes to small, and Chord::small() reads whether all the Notes are small; Chord doesn't actually store a _small flag of its own). Not sure if that would introduce any regressions though. Just something to consider!

Copy link
Contributor

@Jojo-Schmitz Jojo-Schmitz May 29, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better leave such a change for the master branch only I guess.
And hope the 4.0 Alpha and Beta phasse catch regressions, if any ;-)

@vpereverzev vpereverzev merged commit 73807f9 into musescore:3.6.2_backend May 28, 2021
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Jun 28, 2021
Since MusicXML only stores note-level information about smallness
(<type size='cue'> and <cue>), chords that should be small were being
read as normal-sized chords of small notes. This caused issues with
the sizes of flags, ledger lines, and articulations.

This commit adds handleSmallness to ensure that a chord with all small
notes is imported as a small chord with all non-small notes, as well
as a test for this particular case.

Port of musescore#8181
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Jul 1, 2021
Since MusicXML only stores note-level information about smallness
(<type size='cue'> and <cue>), chords that should be small were being
read as normal-sized chords of small notes. This caused issues with
the sizes of flags, ledger lines, and articulations.

This commit adds handleSmallness to ensure that a chord with all small
notes is imported as a small chord with all non-small notes, as well
as a test for this particular case.

Port of musescore#8181
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Jul 27, 2021
Since MusicXML only stores note-level information about smallness
(<type size='cue'> and <cue>), chords that should be small were being
read as normal-sized chords of small notes. This caused issues with
the sizes of flags, ledger lines, and articulations.

This commit adds handleSmallness to ensure that a chord with all small
notes is imported as a small chord with all non-small notes, as well
as a test for this particular case.

Port of musescore#8181
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Jul 27, 2021
Since MusicXML only stores note-level information about smallness
(<type size='cue'> and <cue>), chords that should be small were being
read as normal-sized chords of small notes. This caused issues with
the sizes of flags, ledger lines, and articulations.

This commit adds handleSmallness to ensure that a chord with all small
notes is imported as a small chord with all non-small notes, as well
as a test for this particular case.

Port of musescore#8181
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Jul 27, 2021
Since MusicXML only stores note-level information about smallness
(<type size='cue'> and <cue>), chords that should be small were being
read as normal-sized chords of small notes. This caused issues with
the sizes of flags, ledger lines, and articulations.

This commit adds handleSmallness to ensure that a chord with all small
notes is imported as a small chord with all non-small notes, as well
as a test for this particular case.

Port of musescore#8181
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Jul 27, 2021
Since MusicXML only stores note-level information about smallness
(<type size='cue'> and <cue>), chords that should be small were being
read as normal-sized chords of small notes. This caused issues with
the sizes of flags, ledger lines, and articulations.

This commit adds handleSmallness to ensure that a chord with all small
notes is imported as a small chord with all non-small notes, as well
as a test for this particular case.

Port of musescore#8181
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Jul 28, 2021
Since MusicXML only stores note-level information about smallness
(<type size='cue'> and <cue>), chords that should be small were being
read as normal-sized chords of small notes. This caused issues with
the sizes of flags, ledger lines, and articulations.

This commit adds handleSmallness to ensure that a chord with all small
notes is imported as a small chord with all non-small notes, as well
as a test for this particular case.

Port of musescore#8181
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Jul 28, 2021
Since MusicXML only stores note-level information about smallness
(<type size='cue'> and <cue>), chords that should be small were being
read as normal-sized chords of small notes. This caused issues with
the sizes of flags, ledger lines, and articulations.

This commit adds handleSmallness to ensure that a chord with all small
notes is imported as a small chord with all non-small notes, as well
as a test for this particular case.

Port of musescore#8181
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Aug 13, 2021
Since MusicXML only stores note-level information about smallness
(<type size='cue'> and <cue>), chords that should be small were being
read as normal-sized chords of small notes. This caused issues with
the sizes of flags, ledger lines, and articulations.

This commit adds handleSmallness to ensure that a chord with all small
notes is imported as a small chord with all non-small notes, as well
as a test for this particular case.

Port of musescore#8181
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Aug 13, 2021
Since MusicXML only stores note-level information about smallness
(<type size='cue'> and <cue>), chords that should be small were being
read as normal-sized chords of small notes. This caused issues with
the sizes of flags, ledger lines, and articulations.

This commit adds handleSmallness to ensure that a chord with all small
notes is imported as a small chord with all non-small notes, as well
as a test for this particular case.

Port of musescore#8181
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Aug 19, 2021
Since MusicXML only stores note-level information about smallness
(<type size='cue'> and <cue>), chords that should be small were being
read as normal-sized chords of small notes. This caused issues with
the sizes of flags, ledger lines, and articulations.

This commit adds handleSmallness to ensure that a chord with all small
notes is imported as a small chord with all non-small notes, as well
as a test for this particular case.

Port of musescore#8181
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Aug 19, 2021
Since MusicXML only stores note-level information about smallness
(<type size='cue'> and <cue>), chords that should be small were being
read as normal-sized chords of small notes. This caused issues with
the sizes of flags, ledger lines, and articulations.

This commit adds handleSmallness to ensure that a chord with all small
notes is imported as a small chord with all non-small notes, as well
as a test for this particular case.

Port of musescore#8181
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Aug 30, 2021
Since MusicXML only stores note-level information about smallness
(<type size='cue'> and <cue>), chords that should be small were being
read as normal-sized chords of small notes. This caused issues with
the sizes of flags, ledger lines, and articulations.

This commit adds handleSmallness to ensure that a chord with all small
notes is imported as a small chord with all non-small notes, as well
as a test for this particular case.

Port of musescore#8181
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Sep 1, 2021
Since MusicXML only stores note-level information about smallness
(<type size='cue'> and <cue>), chords that should be small were being
read as normal-sized chords of small notes. This caused issues with
the sizes of flags, ledger lines, and articulations.

This commit adds handleSmallness to ensure that a chord with all small
notes is imported as a small chord with all non-small notes, as well
as a test for this particular case.

Port of musescore#8181
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Sep 2, 2021
Since MusicXML only stores note-level information about smallness
(<type size='cue'> and <cue>), chords that should be small were being
read as normal-sized chords of small notes. This caused issues with
the sizes of flags, ledger lines, and articulations.

This commit adds handleSmallness to ensure that a chord with all small
notes is imported as a small chord with all non-small notes, as well
as a test for this particular case.

Port of musescore#8181
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Sep 10, 2021
Since MusicXML only stores note-level information about smallness
(<type size='cue'> and <cue>), chords that should be small were being
read as normal-sized chords of small notes. This caused issues with
the sizes of flags, ledger lines, and articulations.

This commit adds handleSmallness to ensure that a chord with all small
notes is imported as a small chord with all non-small notes, as well
as a test for this particular case.

Port of musescore#8181
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Sep 23, 2021
Since MusicXML only stores note-level information about smallness
(<type size='cue'> and <cue>), chords that should be small were being
read as normal-sized chords of small notes. This caused issues with
the sizes of flags, ledger lines, and articulations.

This commit adds handleSmallness to ensure that a chord with all small
notes is imported as a small chord with all non-small notes, as well
as a test for this particular case.

Port of musescore#8181
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Mar 5, 2023
Since MusicXML only stores note-level information about smallness
(<type size='cue'> and <cue>), chords that should be small were being
read as normal-sized chords of small notes. This caused issues with
the sizes of flags, ledger lines, and articulations.

This commit adds handleSmallness to ensure that a chord with all small
notes is imported as a small chord with all non-small notes, as well
as a test for this particular case.

Port of musescore#8181
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.

4 participants