Skip to main content
Topic: "Extend staff below with rests to cursor" user tool (0.3) (Read 949 times) previous topic - next topic

"Extend staff below with rests to cursor" user tool (0.3)

I have written a small user tool that extends a staff with invisible rests - this is e.g. useful if a staff needs a layered staff late in the score.

Here is a short description:
This simple tool fills the staff below the active staff with invisible rests up to the cursor position.
The following items are copied down from the active staff while filling: All sorts of bars, flow controls, endings, time signatures, and keys. These copied objects keep the visibility from the active staff.
This is e.g helpful when a staff split for layering is necessary later in the score.
Right now, the tool never creates dotted rests.
If the staff below the active staff extends past the cursor position, or there is no staff below the active staff, the score is not altered.

To install, download the attached lua file (wherever you want to store user tools), open some NWC score (e.g. a new one), go to "Tools --> User Tools", click "New" and add the following:
  • Group: Whatever you want to keep your user tools organized
  • Name: "Extend staff below with rests to cursor"
  • Command: Browse to location where you saved the downloaded file
  • Input Type: File Text
  • Options: Returns File Text

I have also attached a weird test file to play around with this tool.

A companion tool "Remove following rests of same length" can help you if you want to insert new notation in the rest stretches, but want to re-align parts after the inserted pieces (NWC has no "overwrite mode", so inserting notation without disturbing the position of staff parts to the right is not possible "out of the box").

(I have not researched whether there are already other tools that can be used for this purpose ... I wanted a very simple tool, both from the viewpoint of usage - no options - and code - as short as possible, and I need to learn to write user tools in Lua anyway, so I took this as a first example).

H.M.

Re: "Extend staff below with rests to cursor" user tool (0.2)

Reply #1
Update: Version 0.2 now can create whole rests.

Re: "Extend staff below with rests to cursor" user tool (0.1)

Reply #2
I discovered a little typo: '64h' instead of '64th' (in two places) :))
Always look on the bright side of life!

Re: "Extend staff below with rests to cursor" user tool (0.3)

Reply #3
Repaired with 0.3 - thanks!