Skip to main content
Topic: Avoiding note & accidental collisions in layered staves. (Read 7025 times) previous topic - next topic

Avoiding note & accidental collisions in layered staves.

This webpage has two concurrent windows to handle the upper and lower staves of layered music and create extra notespace and/or accidental space when notes or accidentals would otherwise collide.  It handles notes only (no chords) and stem direction must be specified on all notes.  It can handle crossovers.


This page must be up at the same time you have a NWC file open since data are moved to and from the textareas on the webpage through cuts and pastes via the windows clipboard.  The stem up note will get extra space and, if both notes have accidentals, the stem up note will get the accidental space (change from non-crossovers).

It is a little easier to cut the lower staff to the lower window first.  After you cut the upper staff to the upper window and Submit, copy the pre-selected upper window, Alt/Tab to get back to NWC, and your cursor will be waiting where you left it and you can paste the clipboard back.  Now you will have to go back to the webpage to select and copy the lower staff.

It can now look at conflicting notes of different durations.

The attachment from the first message of the following thread: NWC Newbie Presents... is a way to test this webpage. At measures 14 and 31 the lead and tenor notes overlap while there are several places where the bass and baritone both have accidentals and are within a 6th of each other.

If you may need to use this when you don't have internet access, just do a Save As from your browser.  Run from your PC it has an unlabeled checkbox which can put test data in both textareas.

Created as a response to the Feature / "bug fix" requests thread.
Since 1998

Re: Avoiding note & accidental collisions in layered staves.

Reply #1
Hi Warren,

I executed your tool on your testfile, with the attached file as the result.
Please take a look at measure 6. It seems a few extra note spaces are welcome.

Happy new year and keep up the good work!
Gust
Always look on the bright side of life!

Re: Avoiding note & accidental collisions in layered staves.

Reply #2
It seems a few extra note spaces are welcome.
Indeed. After removing some unneeded accidentals, it should look something like this:
Code: (nwc) [Select · Download]
!NoteWorthyComposer(2.5)
|AddStaff|Name:"Staff"
|StaffProperties|EndingBar:Open (hidden)|WithNextStaff:Layer
|Clef|Type:Treble
|Key|Signature:F#|Tonic:G
|TimeSig|Signature:Common
|RestMultiBar|NumBars:5|PrintOnce:Y|WhenHidden:ShowBars,ShowRests
|Bar
|RestChord|Dur:8th|Opts:Stem=Down,ArticulationsOnStem,HideRest|Dur2:4th|Pos2:n-2
|RestChord|Dur:8th|Opts:Stem=Down,NoLegerLines,Muted,HideRest|Dur2:Whole|Pos2:6z
|Spacer|Width:50
|RestChord|Dur:8th|Opts:Stem=Down,ArticulationsOnStem,HideRest|Dur2:4th|Pos2:-2
|Spacer|Width:50
|RestChord|Dur:8th|Opts:Stem=Down,NoLegerLines,Muted,HideRest|Dur2:Whole|Pos2:6z
|Spacer|Width:50
|RestChord|Dur:8th|Opts:Stem=Down,ArticulationsOnStem,HideRest|Dur2:4th|Pos2:-2
|Spacer|Width:50
|RestChord|Dur:8th|Opts:Stem=Down,NoLegerLines,Muted,HideRest|Dur2:Whole|Pos2:6z
|Spacer|Width:50
|RestChord|Dur:8th|Opts:Stem=Down,ArticulationsOnStem,HideRest|Dur2:4th|Pos2:-2
|Spacer|Width:50
|RestChord|Dur:8th|Opts:Stem=Down,NoLegerLines,Muted,HideRest|Dur2:Whole|Pos2:6z
|Bar
|AddStaff|Name:"Staff-1"
|StaffProperties|EndingBar:Open (hidden)|BoundaryTop:10|BoundaryBottom:10
|Clef|Type:Treble
|Key|Signature:F#|Tonic:G
|TimeSig|Signature:Common
|RestMultiBar|NumBars:5|PrintOnce:Y|WhenHidden:ShowBars,ShowRests
|Bar
|Spacer|Width:50
|Note|Dur:8th|Pos:#-3|Opts:Stem=Down,XAccSpace=1,XNoteSpace=1
|Spacer|Width:50
|Note|Dur:4th|Pos:-3|Opts:Stem=Down
|Note|Dur:4th|Pos:-3|Opts:Stem=Down
|Note|Dur:4th|Pos:-3|Opts:Stem=Down
|Note|Dur:8th|Pos:-3|Opts:Stem=Down
|Bar
!NoteWorthyComposer-End
Registered user since 1996

Re: Avoiding note & accidental collisions in layered staves.

Reply #3
I executed your tool on your testfile, with the attached file as the result.
Please take a look at measure 6. It seems a few extra note spaces are welcome.

Happy new year and keep up the good work!

Happy new year to you as well and thanks.  I had included the syncopation in measure 6 to show my tool only worked on the first note, i.e., notes that started in exactly the same place;  I now have had some comments as well as grace notes in the test file.  You and Rick are correct that that measure needs work to make it presentable, but at the moment I am only working on notes which start at the same time.  Perhaps for version 2?!?

Changes in italics

2013-01-17 13:49 A new version does the same thing as above, but if the notes have the same stem direction and duration (but no crossover), they will be converted to a chord with Rick's muted, whole, tied, grace note used to keep the note on the other staff (now stemless) from sounding when only one staff is being played.
Since 1998