NoteWorthy Composer Forum

Forums => Tips & Tricks => User Tools => Topic started by: hmmueller on 2018-01-12 09:43 pm

Title: Copy corresponding parts of multiple staffs
Post by: hmmueller on 2018-01-12 09:43 pm
There was a question about this in the General Forum; and I have felt the need for this also quite a few times. Of course, NWC does not have the concept of a "vertical selection", and it would be hard to define this in general, because there are no obvious "vertical lines" in NWC (and also not in music in general).

What my tool, therefore, does is to place the burden on the score writer: One has to add markers on each staff that delineate the segments. In practice, this can be done very quickly by putting the marker on the top score, copying it with Ctrl-C, and then repeating PgDn and Ctrl-V for all staffs (I do this with rehearsal markers and various dynamics for 2...4...8...20 staffs all the time). Of course, if one hits a "non-aligning object" (an extrem case is a multibar rest), the marker will - and all below - will suddenly land more or less offset to the left or right - that's just as it is. But markers near bars tend to align vertically nicely.

So ... the attachment contains the user tool and an example file. The user tool should be added to nwc2UserTool.ini with three lines, as follows (of course, you must replace the path so that it points to the directory where you store the user tool):

Code: [Select · Download]
C Copy segments=14,php\php.exe C:\Private\MyMusic\MusicalHelpers\hmm_CopySegment.php copy
D Delete segments=14,php\php.exe C:\Private\MyMusic\MusicalHelpers\hmm_CopySegment.php delete
R Reset segments=14,php\php.exe C:\Private\MyMusic\MusicalHelpers\hmm_CopySegment.php reset

Usage is as follows:
The idea is that you can make the markers really stand out (see the example), so that you do not get confused afterwards what went where even if the segments do not longer line up well.

Unfortunately, Ctrl-Z does not work over the boundary of a user tool (even though NWC recognizes that the score has changed) - if the copying creates something wrong, one has to go back to a saved version.

What do you say? Might this - or something along these lines - be a solution or at least acceptable crutch until NWC gets "vertical selections and copy/pastes" somewhen?

Harald M.

// Edit: Rewritten script in OO way ... now seems to be bug-free  :D