NoteWorthy Composer Forum

Forums => General Discussion => Topic started by: David Palmquist on 2016-12-09 11:22 pm

Title: Copying staffs more efficiently
Post by: David Palmquist on 2016-12-09 11:22 pm
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?


Title: Re: Copying staffs more efficiently
Post by: Mike Shawaluk on 2016-12-09 11:39 pm
If your goal is to copy the entire staff to a new empty staff, there are a few easy ways to select everything:
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)
Title: Re: Copying staffs more efficiently
Post by: David Palmquist on 2016-12-10 01:20 am
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.
Title: Re: Copying staffs more efficiently
Post by: Rick G. on 2016-12-10 03:23 am
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.
Title: Re: Copying staffs more efficiently
Post by: Opagust on 2016-12-10 08:40 am
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.
Title: Re: Copying staffs more efficiently
Post by: David Palmquist on 2016-12-10 09:49 am
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.
Title: Re: Copying staffs more efficiently
Post by: NoteWorthy Online on 2016-12-10 11:45 am
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.
Title: Re: Copying staffs more efficiently
Post by: NoteWorthy Online on 2016-12-14 09:36 am
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...
Title: Re: Copying staffs more efficiently
Post by: David Palmquist on 2016-12-17 12:17 am
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.

Title: Re: Copying staffs more efficiently
Post by: Peter Edwards on 2017-10-19 06:04 pm
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?
Title: Re: Copying staffs more efficiently
Post by: Opagust on 2017-10-20 08:04 am
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.
Title: Re: Copying staffs more efficiently
Post by: Opagust on 2017-10-20 05:43 pm
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.
Title: Re: Copying staffs more efficiently
Post by: Peter Edwards on 2017-10-20 06:58 pm
Brilliant. Thanks!
Title: Re: Copying staffs more efficiently
Post by: Flurmy on 2017-10-20 07:09 pm
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?
Title: Re: Copying staffs more efficiently
Post by: Bart on 2017-10-20 09:49 pm
Brilliant. Thanks!

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
Title: Re: Copying staffs more efficiently
Post by: Peter Edwards on 2017-10-21 06:53 am
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.

Title: Re: Copying staffs more efficiently
Post by: Rick G. on 2017-10-26 01:21 am
My problem was transferring the vocal lines from a piano score into an orchestral score, having modified them in the former.
rg_lyricCopy.vbs (https://forum.noteworthycomposer.com/?topic=8401.0) is the tool for this. You can copy lyrics from one song and paste them into another.
Title: Re: Copying staffs more efficiently
Post by: Rick G. on 2017-10-26 01:26 am
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 (https://forum.noteworthycomposer.com/?topic=8401.0) for an example. It will also paste text from the Clipboard.
Title: Re: Copying staffs more efficiently
Post by: Opagust on 2017-10-26 08:14 am
rg_lyricCopy.vbs (https://forum.noteworthycomposer.com/?topic=8401.0) 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.
Title: Re: Copying staffs more efficiently
Post by: Peter Edwards on 2017-10-26 09:01 am
rg_lyricCopy.vbs (https://forum.noteworthycomposer.com/?topic=8401.0) 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.
Title: Re: Copying staffs more efficiently
Post by: Flurmy on 2017-10-26 06:28 pm
For text, there is a way in VBScript. See rg_lyricCopy.vbs (https://forum.noteworthycomposer.com/?topic=8401.0) 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?
Title: Re: Copying staffs more efficiently
Post by: Rick G. on 2017-10-26 08:08 pm
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.
Title: Re: Copying staffs more efficiently
Post by: Opagust on 2017-10-27 07:31 am
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. :'( 
Title: Re: Copying staffs more efficiently
Post by: Rick G. on 2017-11-02 05:46 pm
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> (https://forum.noteworthycomposer.com/?topic=9659.0)that may help.