Skip to content

Conversation

@njvdberg
Copy link
Contributor

This PR is the first of a number of PR's required to

  • implement score ordering.
  • solve several issues with Parts and Excerpts
  • independent sorting of staves/parts in both main score and excepts.

The changes in this PR are:

-1 Replace MusicXMLid as an instrument id by the id as given in instruments.xml
This solves the issue an Oboe suddenly becomes a Baroque Oboe when the instruments form is opened again. The reason for this name change is MusicxXMLid isn't unique, several instrument share the same MusicXMLid. Both Oboe and Baroque Oboe share the same MusicXMLid, wind.reed.oboe but there also 3 Cornets, 4 Bariton Horns and even 10 Horns share the same id. This similar to PR #7995 but since it was required here too it is include in this PR and PR #7995 is closed.

-2 Your score in instrument form now shows Parts rather than Instruments
In the list under Your score, "Instruments" should refer to Parts, not Instruments. Please note Part is a class as used internally, not "Part" as seen on the UI, which is actually an Excerpt. And to complicate things even more, the word "Instrument" on the UI sometimes refers to a Part-class, sometime to an Instrument-class. The column Your score actually show the Parts for an Instrument.
By this change 2 issues are solved

-3 Soloist function implemented
When a part is made Soloist the part is made soloists. The form now also reflect the actual status of the part, soloist not no soloist. This is first step to implementing score ordering.

-4 Make soloist button moved
Original the Make soloist button was in the header of the part list under Your score. To make more space for the score order name is was decided to move this button to the instrument line. For the discussion, see the discussion with @Tantacrul on Discord (design channel, April 15th, 2021).

-5 Some minor typos corrected.
When encountered some minor typos are corrected.

  • 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

@Tantacrul
Copy link
Contributor

The new position of the soloist button is working well, I think.

We'll need to do a bit of UI cleanup on the button. One quick thing: I think we should reduce the distance between the edges of the text and the edge of the button

image

I also think we need to create a special button style just for this. @njvdberg - are you comfortable implementing that or should I ask @cbjeukendrup or @Eism ?

@njvdberg
Copy link
Contributor Author

@Tantacrul Depends on how difficult the specs of this new button will be and on the urgency. If it isn't the most urgent job, I'm willing to give it try, always nice to explore new things. I suppose I can fallback on @cbjeukendrup and/or @Eism in case I'm running into problems. Nice MSoC project (Musescore Summer of Code) 😃

@cbjeukendrup
Copy link
Member

cbjeukendrup commented May 14, 2021

@njvdberg I would recommend to extend the existing FlatButton component, rather than creating a new one. You could add a property called something like narrowMargins, and then take that into account for the width.

Currently, the 'calculation' for the width is on one line, so when taking the new property into account, I think it's a good idea to write it out like

    width: {
        if (...) {
            return ...
        }

        return ...
    }

@njvdberg njvdberg force-pushed the instruments-to-parts branch 3 times, most recently from d83c9d7 to d38c9d2 Compare May 23, 2021 18:31
@njvdberg
Copy link
Contributor Author

PR #8147 requires this PR, so please merge this PR before PR #8147.

@RomanPudashkin
Copy link
Contributor

@vshalkevich please, check this PR

@njvdberg njvdberg force-pushed the instruments-to-parts branch 2 times, most recently from e0149f7 to a62ecfe Compare May 24, 2021 16:56
@vshalkevich
Copy link

@njvdberg Could you rebuild failed MU4 file for Window 10 x64 ? I would like to check also on it

@cbjeukendrup
Copy link
Member

Could you rebuild failed MU4 file for Window 10 x64 ? I would like to check also on it

It must have failed due to the Chocolatey package manager server being down due to maintenance. Now, it should be working again, so when triggering the workflow again, it will build.

@njvdberg
Copy link
Contributor Author

It must have failed due to the Chocolatey package manager server being down due to maintenance.

I didn't realize that thing was down to whatever reason but I reckoned the cause was somewhere outside my scope 😉

instrument.transpose.diatonic = reader.readElementText().toInt();
} else if (reader.name() == "instrumentId") {
instrument.id = reader.readElementText();
instrument.musicXMLid = reader.readElementText();
Copy link
Member

Choose a reason for hiding this comment

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

Why are both "instrumentId" and "musicXMLid" going to instrument.musicXMLid?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

"instrumentId" is the unique identification, that's the one which we really need. "muscXMLid" is still used somewhere, e.g. when reading a score which doesn't have a id specified for an instrument. Then musicXMLid is used for guess what instrument it should be. It is also used for reading MU1 and MU2 scores.
So it is best keep this parameter (and up-to-date).

Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't "instrumentId" then go to instrument.id instead of instrument.musicXMLid?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, in the Instrument section of the score file, the MusicXMLid is called instrumentId (because was used as an id in older version of MuseScore. The same MusicXMLid is defined in instruments.xml with the musicXMLid tag.
An example:
In instruments.xml the Flute is defined as

<Instrument id="flute">
    <family>flutes</family>
    <longName>Flute</longName>
    <shortName>Fl.</shortName>
    <description>Standard Concert Flute</description>
    <musicXMLid>wind.flutes.flute</musicXMLid>
           .
           .

In the score file the same Flute appears as

   <Instrument id="flute">
    <longName>Flute</longName>
    <shortName>Fl.</shortName>
           .
           .
    <instrumentId>wind.flutes.flute</instrumentId>
           .
           .

But welcome in the wonder world of instrument id's 😉 Here is some history....

Copy link
Member

Choose a reason for hiding this comment

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

Ah, now I understand! Thanks!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

My pleasure 😃

This drove me crazy last year, all these id's and in the meantime changing names.

Copy link
Contributor

@shoogle shoogle Jun 30, 2021

Choose a reason for hiding this comment

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

For MU4, I think we would be justified in changing <instrumentId> to <MusicXMLid> in the MSCX file format and using compatibility code to deal with old scores during import. There will already be other changes in the file format (e.g. for the Smart Tempos project), so it might be worth tidying up the syntax here and potentially a few other places too.

Edit: created issue https://musescore.org/en/node/322680

Copy link
Contributor Author

@njvdberg njvdberg Jul 1, 2021

Choose a reason for hiding this comment

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

Changing the tag <instrumentId> into <MusicXMLid> would be nice and makes thing more clear 😄

@njvdberg njvdberg force-pushed the instruments-to-parts branch from a62ecfe to 30721cd Compare June 1, 2021 11:59
njvdberg added 5 commits June 3, 2021 16:09
…fined by the "id" attribute of the "instrument" tag in instruments.xml.

Reasons for this change are:
 - musicXMLid isn't unique for instruments.
 - not all instruments have a musicXMLid defined.
…and use the instrument names otherwise.

The behavior is now similar as it was in 3.x.

The PR is required for the upcoming score ordering PR which needs part information for the ordering.
…ctedInstrumentInfo for each part and no longer for each instrument in each part.
Replace "instrument" in some variables/methods by "part" which actually is.

Remove Excerpt when assoicated score is empty (doesn't contain any staves). This happens when all parts are rmoved from the excerpt.
…order names.

Form will show initial "soloist" status and implements soloist toggling.
@njvdberg njvdberg force-pushed the instruments-to-parts branch from 30721cd to d4e619c Compare June 3, 2021 14:09
@njvdberg
Copy link
Contributor Author

njvdberg commented Jun 3, 2021

Just another rebase.

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.

6 participants