Skip to main content
Topic: Layering voices (Read 2278 times) previous topic - next topic

Layering voices

In many song sheets for choirs, each group of two voices is on 1 staff. In NWC, you can do this by entering chords, or by layering each group of two staffs.But both methods are not ideal:
– Entering chords is not very easy + you don’t always have control over the stems of the individual notes of a chord, which is necessary to differentiate between the two voices.
– When layering, you not only have to set the stems. In order not to have a messy result after layering, you also have to set the properties ‘Use stem for articulation’, ‘Slur direction’ and ‘Tie direction’.
This can easily be done by selecting a whole staff. But that’s not always enough: you have to check the whole staff for situations where you have to set the properties ‘Extra note spacing’ and/or ‘Extra accidental spacing':
– when the distance between the note on the top staff and the note on the bottom equals 1,
– when you have notes with accidentals,
– when the top note is lower then the bottom note,
– when you have chords.
This tool takes care of all this (with the active staff as top staff and the next as bottom staff).

In addition:
– The label and the abbreviated label of the top staff is modified by concatenating with those of the bottom staff, since the former are used when printing the layered staffs. (When the labels are equal, there will be no concatenation.)
– If both staffs have lyrics, the property ‘Placement’ will be set to ‘Top’, resp. ‘Bottom’.

By choosing the action ‘Unlayer’, you can undo all the actions described above.

Installation instructions:
- Download and save the file in YourScriptsFolder and change the extention' txt' to 'js'.
- Open a NoteWorthy File
- Choose ‘Tools’, ‘User Tool…’ or enter Alt-F8
- Click ‘New…’
- Enter the name of the tool and choose a group or enter the name of a new group
Command Line: Wscript  C:\Users\Gust\MijnScripts\LayerVoices.js <PROMPT:Action:=|Layer|Unlayer|Help”
Input Type:  File Text
Under ‘Options: Check ‘Returns File text’

28/12/2017: New version attached, written in lua. See next post for some details.
14/03/2017: Bug corrected in lua script. See reply #2
Always look on the bright side of life!

Re: Layering voices

Reply #1
I rewrote this tool in lua (see attachment in previous post).
- Articulations are only preserved on the upper staff.
- The 'Unlayer' action has been removed. Instead the original, unlayered staves are made invisible and the layering + modifications are done on copies if those staves (with names ending with'/layered'), which are muted.
Always look on the bright side of life!

Re: Layering voices

Reply #2
I discovered and corrected a bug in the lua script (removing articulations in the lower staff was also done on multi measure rests, wich caused an error).
You can download the new version in the original post
Always look on the bright side of life!