Skip to main content
Topic: Bug in measure bar count (Read 6652 times) previous topic - next topic

Bug in measure bar count

Hi,

When I have a double repeat (a left one followed by a right one) inside a measure, the next measure number is the same as the one with the double repeat.

Example (3 measures from Mozart's Turkish march):

!NoteWorthyComposerClip(2.0,Single)
|Clef|Type:Treble
|Note|Dur:16th,Grace|Pos:5|Opts:Stem=Down,Beam=First
|Note|Dur:16th,Grace|Pos:6|Opts:Stem=Down,Beam=End
|Note|Dur:8th|Pos:7|Opts:Stem=Down,Beam=First
|Chord|Dur:8th|Pos:#4,6|Opts:Stem=Down,Beam=End
|Chord|Dur:8th|Pos:3,5|Opts:Stem=Down,Beam=First
|Chord|Dur:8th|Pos:#2,4|Opts:Stem=Down,Beam=End
|Bar
|Note|Dur:4th|Pos:3
|Bar|Style:MasterRepeatClose|XBarCnt:Y
|Bar|Style:MasterRepeatOpen|XBarCnt:Y
|Dynamic|Style:mf|Pos:-8
|Note|Dur:8th,Staccato|Pos:3|Opts:Stem=Down,Beam=First
|Note|Dur:8th,Staccato|Pos:4|Opts:Stem=Down,Beam=End
|Bar
|Chord|Dur:8th,Staccato|Pos:3,5|Opts:Stem=Down,Beam=First
|Chord|Dur:8th|Pos:3,5|Opts:Stem=Down,Beam=End
|Note|Dur:16th,Slur|Pos:6|Opts:Stem=Down,Beam=First
|Note|Dur:16th,Slur|Pos:5|Opts:Stem=Down,Beam
|Note|Dur:16th,Slur|Pos:4|Opts:Stem=Down,Beam
|Note|Dur:16th|Pos:3|Opts:Stem=Down,Beam=End
!NoteWorthyComposerClip-End

Re: Bug in measure bar count

Reply #1
I think it's correct behaviour, not a bug.  Your repeat signs are in the middle of a bar.  I don't know if there's a rule in music theory for numbering bars when they are split like this.  If not, NWC can't assume you want to do that, since others might prefer not to.

You can force a bar number change, though, by adding a hidden regular bar line, like so:

!NoteWorthyComposerClip(2.0,Single)
|Bar|Style:MasterRepeatClose
|Bar|Visibility:Never
|Bar|Style:MasterRepeatOpen
!NoteWorthyComposerClip-End
 

Re: Bug in measure bar count

Reply #2
The measure count only increments when the bar contains notes.

Re: Bug in measure bar count

Reply #3
...or time in the form of rests.

Re: Bug in measure bar count

Reply #4
No, no, I think you missed the point:

It's a correct behaviour for the numbering not to be increased between the two repeat bars, AND I've precised that I didn't want it to be increased.

BUT it's also not incremented at the NEXT bar, so I become TWO measures numbered 2 in this example.

Or did I miss something?

Re: Bug in measure bar count

Reply #5
Bersyl91 is correct.  If you paste the clip from the first post there are indeed 2 normal barlines labelled "2", with the back to back master repeats in between. 

I reckon this is a bug.

NWC1 behaves differently.  In that case, the back to back master repeat barlines get numbered as 3 and the surrounding ones are 2 and 4.
I plays 'Bones, crumpets, coronets, floosgals, youfonymums 'n tubies.

Re: Bug in measure bar count

Reply #6
If you look closely at the clip, the two master repeat bars include:

XBarCnt:Y

This enables the exclusion from bar count feature. If you select the bar lines, you can turn this back off using Edit, Properties.

Re: Bug in measure bar count

Reply #7
But if you turn off "exclude from bar count" for both repeat signs, you can get an extra count too, so it has to be done carefully.

I notice the print preview won't show Bar 1, so you don't get any numbering of bars on the print until you have a system wrap.  This shouldn't be troublesome, unless you have a pickup bar.  Then you can't tell whether or not is is numbered 0 or 1 after it's printed.


Re: Bug in measure bar count

Reply #9
NWC does not include extra adjacent bar lines in the measure count, regardless of the setting of the exclude option. Only bar lines that have a musical duration separating them (notes or rests) are included in the count.

Re: Bug in measure bar count

Reply #10
Quote
No, you can't get an extra count:
Where neither repeat is excluded from the bar count, you get the second half of the split bar counted as a new bar.  I've attached a few illustrations - this is shown in <Song2>. 

<Song4> is particularly interesting, and comes from this:

!NoteWorthyComposerClip(2.0,Single)
|Text|Text:"Anomaly - inserted a hidden bar line, excluded "|Font:StaffItalic|Pos:22
|Text|Text:"from count, between the repeats"|Font:StaffItalic|Pos:16
|Clef|Type:Treble
|Note|Dur:16th,Grace|Pos:5|Opts:Stem=Down,Beam=First
|Note|Dur:16th,Grace|Pos:6|Opts:Stem=Down,Beam=End
|Note|Dur:8th|Pos:7|Opts:Stem=Down,Beam=First
|Chord|Dur:8th|Pos:#4,6|Opts:Stem=Down,Beam=End
|Chord|Dur:8th|Pos:3,5|Opts:Stem=Down,Beam=First
|Chord|Dur:8th|Pos:#2,4|Opts:Stem=Down,Beam=End
|Bar
|Note|Dur:4th|Pos:3
|Bar|Style:MasterRepeatClose|XBarCnt:Y
|Bar|XBarCnt:Y|Visibility:Never
|Bar|Style:MasterRepeatOpen
|Dynamic|Style:mf|Pos:-8
|Note|Dur:8th,Staccato|Pos:3|Opts:Stem=Down,Beam=First
|Note|Dur:8th,Staccato|Pos:4|Opts:Stem=Down,Beam=End
|Bar
|Chord|Dur:8th,Staccato|Pos:3,5|Opts:Stem=Down,Beam=First
|Chord|Dur:8th|Pos:3,5|Opts:Stem=Down,Beam=End
|Note|Dur:16th,Slur|Pos:6|Opts:Stem=Down,Beam=First
|Note|Dur:16th,Slur|Pos:5|Opts:Stem=Down,Beam
|Note|Dur:16th,Slur|Pos:4|Opts:Stem=Down,Beam
|Note|Dur:16th|Pos:3|Opts:Stem=Down,Beam=End
!NoteWorthyComposerClip-End


Re: Bug in measure bar count

Reply #11
I admit being corrected.
About <SONG1>-The repeat open's bar bar would be the 8th-notes after it, and the the repeat close's bar would be nonexistent.  This logic makes sense, as there would be no bar to count for the repeat open.

<SONG4> makes no sense to me, but it could be useful-see https://forum.noteworthycomposer.com/?topic=5827.msg38132#msg38132, fourth paragraph

Re: Bug in measure bar count

Reply #12
If you look closely at the clip, the two master repeat bars include:

XBarCnt:Y

This enables the exclusion from bar count feature. If you select the bar lines, you can turn this back off using Edit, Properties.

Oops, one should be awake enough to spot these things...


But if you turn off "exclude from bar count" for both repeat signs, you can get an extra count too, so it has to be done carefully.

I notice the print preview won't show Bar 1, so you don't get any numbering of bars on the print until you have a system wrap.  This shouldn't be troublesome, unless you have a pickup bar.  Then you can't tell whether or not is is numbered 0 or 1 after it's printed.

Doesn't seem to matter what kind of barlines surround the hidden one, the phenomenon appears the same.

There IS something dodgy going on here though...

David's clip with the hidden barline:
!NoteWorthyComposerClip(2.0,Single)
|Clef|Type:Treble
|Note|Dur:16th,Grace|Pos:5|Opts:Stem=Down,Beam=First
|Note|Dur:16th,Grace|Pos:6|Opts:Stem=Down,Beam=End
|Note|Dur:8th|Pos:7|Opts:Stem=Down,Beam=First
|Chord|Dur:8th|Pos:#4,6|Opts:Stem=Down,Beam=End
|Chord|Dur:8th|Pos:3,5|Opts:Stem=Down,Beam=First
|Chord|Dur:8th|Pos:#2,4|Opts:Stem=Down,Beam=End
|Bar
|Note|Dur:4th|Pos:3
|Bar|Style:MasterRepeatClose|XBarCnt:Y
|Bar|XBarCnt:Y|Visibility:Never
|Bar|Style:MasterRepeatOpen
|Dynamic|Style:mf|Pos:-8
|Note|Dur:8th,Staccato|Pos:3|Opts:Stem=Down,Beam=First
|Note|Dur:8th,Staccato|Pos:4|Opts:Stem=Down,Beam=End
|Bar
|Chord|Dur:8th,Staccato|Pos:3,5|Opts:Stem=Down,Beam=First
|Chord|Dur:8th|Pos:3,5|Opts:Stem=Down,Beam=End
|Note|Dur:16th,Slur|Pos:6|Opts:Stem=Down,Beam=First
|Note|Dur:16th,Slur|Pos:5|Opts:Stem=Down,Beam
|Note|Dur:16th,Slur|Pos:4|Opts:Stem=Down,Beam
|Note|Dur:16th|Pos:3|Opts:Stem=Down,Beam=End
!NoteWorthyComposerClip-End

The opening repeat is numbered "1"

Remove the exclusion from the closing repeat:
!NoteWorthyComposerClip(2.0,Single)
|Clef|Type:Treble
|Note|Dur:16th,Grace|Pos:5|Opts:Stem=Down,Beam=First
|Note|Dur:16th,Grace|Pos:6|Opts:Stem=Down,Beam=End
|Note|Dur:8th|Pos:7|Opts:Stem=Down,Beam=First
|Chord|Dur:8th|Pos:#4,6|Opts:Stem=Down,Beam=End
|Chord|Dur:8th|Pos:3,5|Opts:Stem=Down,Beam=First
|Chord|Dur:8th|Pos:#2,4|Opts:Stem=Down,Beam=End
|Bar
|Note|Dur:4th|Pos:3
|Bar|Style:MasterRepeatClose
|Bar|XBarCnt:Y|Visibility:Never
|Bar|Style:MasterRepeatOpen
|Dynamic|Style:mf|Pos:-8
|Note|Dur:8th,Staccato|Pos:3|Opts:Stem=Down,Beam=First
|Note|Dur:8th,Staccato|Pos:4|Opts:Stem=Down,Beam=End
|Bar
|Chord|Dur:8th,Staccato|Pos:3,5|Opts:Stem=Down,Beam=First
|Chord|Dur:8th|Pos:3,5|Opts:Stem=Down,Beam=End
|Note|Dur:16th,Slur|Pos:6|Opts:Stem=Down,Beam=First
|Note|Dur:16th,Slur|Pos:5|Opts:Stem=Down,Beam
|Note|Dur:16th,Slur|Pos:4|Opts:Stem=Down,Beam
|Note|Dur:16th|Pos:3|Opts:Stem=Down,Beam=End
!NoteWorthyComposerClip-End

The opening repeat is numbered "2", as is the barline prior to the closing repeat.

Remove the exclusion from both the closing repeat and the hidden barline:
!NoteWorthyComposerClip(2.0,Single)
|Clef|Type:Treble
|Note|Dur:16th,Grace|Pos:5|Opts:Stem=Down,Beam=First
|Note|Dur:16th,Grace|Pos:6|Opts:Stem=Down,Beam=End
|Note|Dur:8th|Pos:7|Opts:Stem=Down,Beam=First
|Chord|Dur:8th|Pos:#4,6|Opts:Stem=Down,Beam=End
|Chord|Dur:8th|Pos:3,5|Opts:Stem=Down,Beam=First
|Chord|Dur:8th|Pos:#2,4|Opts:Stem=Down,Beam=End
|Bar
|Note|Dur:4th|Pos:3
|Bar|Style:MasterRepeatClose
|Bar|Visibility:Never
|Bar|Style:MasterRepeatOpen
|Dynamic|Style:mf|Pos:-8
|Note|Dur:8th,Staccato|Pos:3|Opts:Stem=Down,Beam=First
|Note|Dur:8th,Staccato|Pos:4|Opts:Stem=Down,Beam=End
|Bar
|Chord|Dur:8th,Staccato|Pos:3,5|Opts:Stem=Down,Beam=First
|Chord|Dur:8th|Pos:3,5|Opts:Stem=Down,Beam=End
|Note|Dur:16th,Slur|Pos:6|Opts:Stem=Down,Beam=First
|Note|Dur:16th,Slur|Pos:5|Opts:Stem=Down,Beam
|Note|Dur:16th,Slur|Pos:4|Opts:Stem=Down,Beam
|Note|Dur:16th|Pos:3|Opts:Stem=Down,Beam=End
!NoteWorthyComposerClip-End

The opening repeat is numbered "3" (I would expect this)

This one is a beauty!
!NoteWorthyComposerClip(2.0,Single)
|Clef|Type:Treble
|Note|Dur:16th,Grace|Pos:5|Opts:Stem=Down,Beam=First
|Note|Dur:16th,Grace|Pos:6|Opts:Stem=Down,Beam=End
|Note|Dur:8th|Pos:7|Opts:Stem=Down,Beam=First
|Chord|Dur:8th|Pos:#4,6|Opts:Stem=Down,Beam=End
|Chord|Dur:8th|Pos:3,5|Opts:Stem=Down,Beam=First
|Chord|Dur:8th|Pos:#2,4|Opts:Stem=Down,Beam=End
|Bar
|Note|Dur:4th|Pos:3
|Bar|Style:MasterRepeatClose|XBarCnt:Y
|Bar|XBarCnt:Y|Visibility:Never
|Bar|XBarCnt:Y|Visibility:Never
|Bar|Style:MasterRepeatOpen
|Dynamic|Style:mf|Pos:-8
|Note|Dur:8th,Staccato|Pos:3|Opts:Stem=Down,Beam=First
|Note|Dur:8th,Staccato|Pos:4|Opts:Stem=Down,Beam=End
|Bar
|Chord|Dur:8th,Staccato|Pos:3,5|Opts:Stem=Down,Beam=First
|Chord|Dur:8th|Pos:3,5|Opts:Stem=Down,Beam=End
|Note|Dur:16th,Slur|Pos:6|Opts:Stem=Down,Beam=First
|Note|Dur:16th,Slur|Pos:5|Opts:Stem=Down,Beam
|Note|Dur:16th,Slur|Pos:4|Opts:Stem=Down,Beam
|Note|Dur:16th|Pos:3|Opts:Stem=Down,Beam=End
!NoteWorthyComposerClip-End

The opening repeat is numbered 65536

I plays 'Bones, crumpets, coronets, floosgals, youfonymums 'n tubies.


Re: Bug in measure bar count

Reply #14
Confirmed as a bug. The exclude option should not have any effect on a bar line that is already ignored in the measure count. This will be corrected.