Copy a score under another

• Mar 8, 2016 - 12:13

Hello everybody,
I am trying to write a plugin that copies a score under another score (for me as a composer I need this feature because I first import the RAW data of the DAW in Musescore, clean it up (e.g. get rid of additional tracks that the DAW needed to represent different articulations of the instrument) and then import this cleaned up score to my "real" score, where I use it to orchestrate the whole piece.)

I am wondering what the argument of the method "appendPart(const QString&)" does. It would be cool, if I could just put the part of the score there I want to add from. But since it is a string it does not work. Also, putting the name of the part there only throws a "Debug: appendPart: not found" error. So what is the sense of this parameter then?

Or is there another possibility to copy a part from one score to another?


Comments

I'm unsure whether a plugin would be the correct/faster approach here. It would have to read all the tracks from the original and then either match up the instruments and copy their staves contents, and/or decide what to do with instruments existing in one score, but not in the other.

Copying a part from one score to another should be fairly easy to do manually.

  1. Open both scores in MuseScore
  2. Select the region you want to copy from in one score
  3. Place your cursor in the 2nd score at the correct position and paste

Note that to achieve what I think you want, you'll probably want to make sure the instrument list of the target score matches up with the instrument list of the source score. If not, you'll have to copy in steps where each copy action contains a set of matching staff order.
You could also try and use the Album feature to join scores, which is likely to require much of the same setup in the first score, but has the advantage of copying in more subsequent scores in one go.

About the appendPart(const QString&) function. This function adds an empty part for the instrumentname you provide to the end of the system of the score.
So if I have a score with a violin staff only, appendPart("Piano") should add a Piano (two staves) at the end of the system.
The debug message you got indicates that you did not feed an instrument name but rather an empty string as the argument. The full message is appendPart: [requested_instrument] not found

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