Skip to main content
Topic: Copying staffs more efficiently (Read 12583 times) previous topic - next topic

Copying staffs more efficiently

When I create a new staff that I want to copy another staff into, then page up to get the contents of the original staff, in the original staff, the cursor comes up between the key signature and the time signature.  When I press Shift-end, Copy, and Paste the result into the new staff, I find the clef and key signature have not been copied, so I have to go back to the original staff to fetch them.  This seems to be new.

I would prefer to have the cursor move up to the beginning of the new staff to the beginning of the source staff so I could copy the source staff all in one step.

It's not a major inconvenience for a single copying action, but today I'm copying four trumpet parts to new staffs to transpose for french horn, and copying the baritone sax and string bass parts to new staffs for a bass saxophone.  I'd rather copy six times before transposing, instead of twelve.

One for the wish list?



Re: Copying staffs more efficiently

Reply #1
If your goal is to copy the entire staff to a new empty staff, there are a few easy ways to select everything:
  • Double-click the bar in the left margin for the staff you want to copy.
  • With the cursor anywhere in the staff, go to Edit > Select All. (Or type Alt-E, A)
But I agree that it seems strange that doing a Page Up (or Page Down) from an empty staff doesn't put you at the start of the other staff. (The other obvious thing is to press Home or Left Arrow before you do your Shift-End to select the staff contents)

Re: Copying staffs more efficiently

Reply #2
Thanks, Mike.  The way I've always done it (for 20 years now!) is create the new staff, move to the source staff (left end), use shift-end to select it all, and copy/paste back to the new staff.  Now in the source staff, I have to remember to move the cursor left, before using shift-end to select the entire staff.

I think this is a new phenomenon.  If I'm right, something's changed. 

When you're trying to whip together some transposed parts for an imminent rehearsal, or if you're an infrequent user of the program, you don't need the distraction of having to do things differently than before.  Sooner or later you get used to it, but it's a pain when you're working under pressure.

Re: Copying staffs more efficiently

Reply #3
End, Shift+Home works well.
My user tool works better for me. The options I built in to it may not be to others liking.
Registered user since 1996

Re: Copying staffs more efficiently

Reply #4
Maybe this tool can ease your life, David.
It copies the active staff .
To install, just download it, start NWC, open a file and drag the downloaded file upon it.

You can then run it via 'Tools/User Tool..' or just ALt+F8.
Always look on the bright side of life!

Re: Copying staffs more efficiently

Reply #5
I'll try the user tool on the next chart I do, thanks, Opagust.

 I like Rick's method too.  Starting at the end and going home to copy is elegant.

I'm more concerned about other users when they encounter the cursor behaviour. The cursor behaviour is simply wrong and should be fixed so other users won't encounter it.

Re: Copying staffs more efficiently

Reply #6
The cursor behaviour is simply wrong and should be fixed so other users won't encounter it.

If you turn off Smart Insertion Point (in Options, Editor), the current behavior will be more apparent.

I'll look into ways to improve this behavior; perhaps using the actual position of the insertion point from the user's vantage point.

Re: Copying staffs more efficiently

Reply #7
2.75a Beta 7 includes a subtle change that might make this work better for those using  Smart Insertion Point.

I just noticed that when zoomed out, the clef can still get missed when changing staff. Perhaps this can still be improved a bit more...

Re: Copying staffs more efficiently

Reply #8
Beta 7 does most of the correction, Eric, thank you.  The cursor will now go to the clef sign, but that means you miss anything to the left of the clef such as a tempo mark or perhaps text.


Re: Copying staffs more efficiently

Reply #9
Maybe this tool can ease your life, David.
It copies the active staff .

Is there a way of adapting this so that a staff can be copied into another file whilst retaining all its attributes and lyrics?

Re: Copying staffs more efficiently

Reply #10
Is there a way of adapting this so that a staff can be copied into another file whilst retaining all its attributes and lyrics?
No, there isn't. A user tool can't process two files at a time.
So the only way is to do it manually.
Always look on the bright side of life!

Re: Copying staffs more efficiently

Reply #11
No, there isn't. A user tool can't process two files at a time.
So the only way is to do it manually.

I wasn't pleased with my quick answer, so did a little thinking and came up with a 2 step solution. Attached is a new version of the tool CopyStaff, with the possibility to choose the option 'another file' as target. I you do so, the text representation of the staff and its lyrics will be shown in the output window. You then have to select all (CTRL+A) and copy it in your clipboard(CTRL+C).
The other attached user tool 'PasteStaff' is then to be run on the target file, where you have to  paste the content of your clipboard in the input window.
Always look on the bright side of life!

Re: Copying staffs more efficiently

Reply #12
Brilliant. Thanks!

Re: Copying staffs more efficiently

Reply #13
You then have to select all (CTRL+A) and copy it in your clipboard(CTRL+C).
Sorry for the stupid question but... there isn't a way to put things in the clipboard programmatically?

Re: Copying staffs more efficiently

Reply #14

I am not sure, but if usertools are limited to only one file, then - in this case - the easiest (fastest) way seems to me :
"save the open file as a new file" ,
x times CTRL+D to delete all the unwanted staves,
"normal save" to save the final result.

Bart

Re: Copying staffs more efficiently

Reply #15
That won't work if the receiving file already exists. My problem was transferring the vocal lines from a piano score into an orchestral score, having modified them in the former.


Re: Copying staffs more efficiently

Reply #16
My problem was transferring the vocal lines from a piano score into an orchestral score, having modified them in the former.
rg_lyricCopy.vbs is the tool for this. You can copy lyrics from one song and paste them into another.
Registered user since 1996

Re: Copying staffs more efficiently

Reply #17
Sorry for the stupid question but... there isn't a way to put things in the clipboard programmatically?
For text, there is a way in VBScript. See rg_lyricCopy.vbs for an example. It will also paste text from the Clipboard.
Registered user since 1996

Re: Copying staffs more efficiently

Reply #18
rg_lyricCopy.vbs is the tool for this. You can copy lyrics from one song and paste them into another.

When trying to paste (2 verses of 25 lines), I get an error: insufficient space.
Always look on the bright side of life!

 

Re: Copying staffs more efficiently

Reply #19
rg_lyricCopy.vbs is the tool for this. You can copy lyrics from one song and paste them into another.

Not quite. I'd also made changes to staff sizes and names, lyric offsets and boundary offsets, so an all-in-one approach was simpler.

Re: Copying staffs more efficiently

Reply #20
For text, there is a way in VBScript. See rg_lyricCopy.vbs for an example. It will also paste text from the Clipboard.
Oh, yes, there is the relevant Windows API call, I know.
What I mean is: doesn't it exists in Lua too?

Re: Copying staffs more efficiently

Reply #21
Oh, yes, there is the relevant Windows API call, I know.
What I mean is: doesn't it exists in Lua too?
Good luck tring to use the Windows API in a script.
My code uses the "htmlfile" COM object to get text from the Clipboard.
To put text into the Clipboard, it writes and runs a hypertext application.
This latter step raised security flags when it tied to do in PHP.

I don't know how to do any of this in Lua.
Registered user since 1996

Re: Copying staffs more efficiently

Reply #22
Good luck tring to use the Windows API in a script.
My code uses the "htmlfile" COM object to get text from the Clipboard.
To put text into the Clipboard, it writes and runs a hypertext application.
This latter step raised security flags when it tied to do in PHP.

I don't know how to do any of this in Lua.

In Lua it's possible to access the clipboard via the extern library 'Clipboard'. Unfortunally, the run time environment of NWC does not allow to use extern libraries, so it can't be done in a user tool. :'( 
Always look on the bright side of life!

Re: Copying staffs more efficiently

Reply #23
My problem was transferring the vocal lines from a piano score into an orchestral score, having modified them in the former.
A couple of User Tools <here>that may help.
Registered user since 1996