Help with creating a new staff/part
As part of a plugin Im trying to produce a function that will create a new staff/part and copy all of an existing one to it.
Ive used appendPart but it gives me 2 problems:
1 The staff created has no key signature (well its always C). I can find no way of changing this for a staff or part.
2 The new staff always starts with a full measure and if I try to add from a staff that starts with a partial measure, I loose chords/rests. How can I reduce the duration of the first measure?
Thanks
Comments
Not sure, but you'll find the copying itself isn't likely to work well. Unless you've figured out something I haven't, there is no way to get chord symbols, or text, or other markings, and things like triplets and ties won't recreate corrctly, either.
In reply to Not sure, but you'll find the by Marc Sabatella
Thanks Marc
I love MuseScore and understand that the plugin interface has limitations.
All Im trying to do is preserve a simple staff containing only rests and single note chords.
This is a minor part of a plugin Im writing that will create variuos types of chords from selections.
I envisage the plugin being used more than once on the simple staff and changing it in differing ways in different places.
So I want to keep a copy of the original to be used for optional full or partial restore.
Obviously the user chould do this anyway but I was trying to make it automatic.
Pehaps I will use a text file instead, with 3 plugins: copy, main plugin used morethan once and an optional restore.