Export breaks to parts.

• Mar 11, 2017 - 18:36

I request that staff and page breaks be exported when parts are generated.

I understand that there may have to be changes in the parts, but an initial setting, as set up in the score would save a lot of extra fiddling.


Comments

In reply to by mike320

Not for me.

I have to generate the parts and then re-break them every time. I do charts for my bands and generally set up the breaks in the score as to how I would like them to be.

As they are not passed on to the parts, I really don't understand you twos objection.

As it is you have to set up everything separately. If they were exported, as I say, one might have to tweak them, but with no breaks you always have to tweak them individually.

Please educate me as to how you see the breaks being exported as further complicating this task.

In reply to by xavierjazz

If you have a page on the score with 4 instruments then you probably have 3 or possible 4 systems on a page, that is 12 or 16 lines of music. If you pass page breaks on to the parts then each parts page will have 3 or 4 lines of music on them and about 2/3 of the page blank. This just doesn't seem logical to me and it's not something I would want to go back and fix.

If you pass the line breaks to the parts then you will see measures where one instrument has 8-12 or more 16th notes in a measure and another part has a whole note in each measure. On the score there probably isn't much you can do to squeeze more then 2 maybe 3 measures on a line. This makes sense for the part with all of the 16th notes, but make no sense for the part with nothing but whole notes. You would then have to go back and fix the part with all of the whole notes.

These are both common occurrences in several types of music, not just vague hypotheticals.

People will always have to go back and adjust layouts of parts and scores and it is easier to allow MS to do most of the layout automatically and the user go back and add line returns and page breaks rather than to go back and remove only some of the line and page breaks. This usually means remove all of the line and page breaks and start from where MS had you before line and page breaks were added.

In reply to by xavierjazz

Right, having all parts with the same layout is highly unusual, and having any of the parts look anything like the score even more so. Most people let scores be with default breaks, and make each part look as good as it can by inserting breaks specific to that part. So in this common case, it would be very bad to have all parts forced to the same layout.

But indeed, for those unusual special cases where you actually *do* want consistent breaks in all parts for whatever reason, a utility to go through the parts and synchronize them could indeed be a good feature.

In reply to by Marc Sabatella

I write very simply - basically a lead sheet with some alterations in parts.

I understand how I want it to look.

The players I have the fortune to play with generally sight read on stage. It ain't always pretty but to us it sure is jazz. It's a blast! I'm lucky, we're happy.

Under those circumstances, it is an immense help if the charts are laid out in an identical fashion.

(Yell) "Page 3"!

I still would really like to understand how doing this would be worse than leaving it alone?

Help me out, eh?

In reply to by xavierjazz

The thing to understand is, your use of the score and parts mechanism as a way to generate transposed lead sheets is not really the intended use case. It is clever and useful, no doubt, but the main use case for score & parts is something else entirely -= think big band arrangement, not lead sheet. And in a big band arrangement, you'd almost *never* want all parts to have the same line breaks, nor would any part generally have line breaks in the same place as the score. If parts started out by default with the same line breaks, first thing you'd have to do is remove them to get back to normal. That is why, if we do provide some sort of automatic line break synchronizing facility, it would have to be a separate command you have to run explicitly in the cases where you are using the score / parts mechanism for this particular purpose

In reply to by xavierjazz

Wouldn't you agree, though, that a *command* you run would be more useful? That way it isn't limited to just preserving breaks from the score, but also allows you to further customize a part and then have those customziation copied to all other parts. I guess in your particular case you might have breaks in your score, but other use cases people have described do not. So instead of wanting breaks from the *score* copied to parts, it's more about copying from one part to others. And you might then update the breaks and want those updates recopied. That's why I keep suggesting this as the more generally useful solution. No reason this couldn't *also* work from the score, but again, why limit yourself to only copying the breaks at the moment the parts are generated - wouldn't it be better to be able to do so at *any* time? Certainly no worse for your use case, but it's much better for the other use cases.

So, something like Tools / Breaks / Copy Breaks to All Parts, you run at any time from the score or from any part, and the breaks are copied to all parts. Make some changes, run it again, as often as you like.

In reply to by Jojo-Schmitz

initial working plugin
This is a first working plugin but there's a big problem with it (which will be soon in the issue tracker): whenever you run the plugin, it updates the system breaks (so it works). But if you then switch tab to a part, and click on a layout break, something hard to describe happens. Like if the Score was shown in a part tab, even though it's not the real score...
However, if you save your file and open it again, now everything is fixed.
Might be an error in my code, though, I'm still checking.

In reply to by ecstrema

I still don't have a handle on how the plugin framework works. I just know the that the underlying elements themselves all have a "score" property that would normally need be set to point to the score the element belongs to (for ScoreElements, any, a subclass of Element that applies to anything of consequence).

If you can't set the property directly, maybe there is a better way to create the element. That is, instead of cloning it directly (which assuredly would inherit to score of the original), maybe create a brand one (I assume that's possible) that is explicitly given the part as the parent?) and then copy over any other attributes you need form the original?

In reply to by ecstrema

The easiest way to deal with this would be to add this function (the same as new Element, but with another parameter to set the score).

Element* PluginAPI::newElement(int elementType, Ms::Score* score)
      {
      if (!score)
            return nullptr;
      if (elementType <= int(ElementType::INVALID) || elementType >= int(ElementType::MAXTYPE)) {
            qWarning("PluginAPI::newElement: Wrong type ID: %d", elementType);
            return nullptr;
            }
      const ElementType type = ElementType(elementType);
      Ms::Element* e = Ms::Element::create(type, score);
      return wrap(e, Ownership::PLUGIN);
      }

But I guess things are never that simple... (if the score property was editable, it would be perfect, though)

In reply to by ecstrema

Thank you for this plugin! I just installed it and it worked. Well, sort of. I had to make a change to the code because it was giving me an error. Your line 27 says:

bool exportSectionBreaks = false;

I changed the bool to var and it works great now!

As for the adding Breaks if there are already breaks there; I imagine that it'd be a PITA to have to remove all the breaks if you have 8-10 parts... I imagine an if structure could be placed in the for loop that calls addBreaksToPart, or perhaps better within the do loop in addBreaksToPart to only add if the element is not there? I'm not familiar with this scripting language (yet, although it does like Java, which I do know) but I think it would be a relatively quick patch....

Having said that, I guess I should look online to find MuseScore plugin scripting instruction so that I can contribute...

Thanks again @Marr11317 !

In reply to by amilardovic

You are Welcome!
Effectively, it would be nice if there was a way to delete all breaks from all parts. Unfortunately, with the current plugin framework, I don't think it's possible.
I just corrected the bool to var thank you for reporting it. I wonder how it ever worked.

Does this exist yet. Doing some musical charts and, for the most part, I want all the brass parts formatted the same more often than I don't.

Would be nice to start with the same formatting as the score then fix the individual parts than have to enter exactly the same line breaks multiple times.

In a musical if there are multiple bars rest they are represented on a single line, so this use case happens more than you would think.

In reply to by Quaeritate

doesn't exist. And doesn't make much sense either, same page breaks in sore and parts make no sense at all, system breaks in connection with multimesure rests don't either. Multimeasure rests are the default setting for parts.
Only thing that may make sense are system breakes (and turning page breaks into system breaks) in absense of multimeasure rests.
The workaound of manually applying system breaks to parts at the same places an in the score is still there and easy enough to do, on those rare cases where they do make sense.
It still might be possible to create a plugin that reads system and page breaks from score and turns them into system breaks for parts.

In reply to by Jojo-Schmitz

Jojo, just because you don't need it doesn't mean that it makes no sense.

At the moment, if you want to set various breaks in parts you have to go to each part and do that. However, for those of us who have standard layouts, transferring the breaks would remove a whole set of operations.

In reply to by xavierjazz

I didn't say this doesn't make sense at all.

I did day that page breaks would practically never make sense. as by the very nature of a part it has less staves per system than the score, and so more systems per page.
Section breaks are copyed already, leaves system breaks (and page breaks turned into system breaks), which may make sense, if there are no multilmeasure rests (with those it 'd be of very questionable value).

As also said, yes, a tool for this operation might be helpfull a plugin could probably get written for this, reading page and systme breaks in score, applying system breaks to parts.

Now it just needs someone sufficiently interested and sufficiently proficient in writing (plugin/QML) code to implement this.

You can try this, Ihave already test: you make the first part with the breaks where you want. You save it, only this part, not the score, with the name you want. You re-enter this new part in MS, so you have your complete score, and alone, this part. You delete all you want in the part, the breaks are still here. You return to your score, choose the second stave you want, copy all this stave, return on the deleted empty part and past. You get a second part with all the breaks. You must change the name of the instrument , and perhaps transpose. You save this second part with another name, so you get the 1st and the 2nd part saved, and go on for the others.

Re-upping this request to note that this feature would also be useful for one piano, four hands duets where you want the parts printed on facing pages with page breaks at the same measure. Matching system breaks between parts is helpful especially for beginner–intermediate music.

Do you still have an unanswered question? Please log in first to post your question.