NoteWorthy Composer Forum

Forums => General Discussion => Topic started by: bersyl91 on 2006-12-31 05:52 pm

Title: Bug in measure bar count
Post by: bersyl91 on 2006-12-31 05:52 pm
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
Title: Re: Bug in measure bar count
Post by: David Palmquist on 2006-12-31 06:05 pm
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
 
Title: Re: Bug in measure bar count
Post by: NoteWorthy Online on 2006-12-31 11:49 pm
The measure count only increments when the bar contains notes.
Title: Re: Bug in measure bar count
Post by: fitzclan on 2007-01-02 01:05 pm
...or time in the form of rests.
Title: Re: Bug in measure bar count
Post by: bersyl91 on 2007-01-02 02:30 pm
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?
Title: Re: Bug in measure bar count
Post by: Lawrie Pardy on 2007-01-02 03:08 pm
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.
Title: Re: Bug in measure bar count
Post by: NoteWorthy Online on 2007-01-02 05:54 pm
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.
Title: Re: Bug in measure bar count
Post by: David Palmquist on 2007-01-02 06:17 pm
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.
Title: Re: Bug in measure bar count
Post by: kahman on 2007-01-02 06:31 pm
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.
No, you can't get an extra count:
The measure count only increments when the bar contains notes.
Title: Re: Bug in measure bar count
Post by: NoteWorthy Online on 2007-01-02 06:34 pm
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.
Title: Re: Bug in measure bar count
Post by: David Palmquist on 2007-01-02 07:54 pm
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

Title: Re: Bug in measure bar count
Post by: kahman on 2007-01-02 09:20 pm
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 (https://forum.noteworthycomposer.com/?topic=5827.msg38132#msg38132), fourth paragraph
Title: Re: Bug in measure bar count
Post by: Lawrie Pardy on 2007-01-02 09:56 pm
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

Title: Re: Bug in measure bar count
Post by: kahman on 2007-01-02 10:02 pm
Confirmed.

It would seem there's something special about the number 65536...googled it.
Apparently Microsoft Excel has problems with 65536, too:
http://support.microsoft.com/kb/120596 (http://support.microsoft.com/kb/120596)

Here's some more reading on 65536:
http://primes.utm.edu/curios/page.php/65536.html (http://primes.utm.edu/curios/page.php/65536.html)
Title: Re: Bug in measure bar count
Post by: NoteWorthy Online on 2007-01-03 03:23 am
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.