NoteWorthy Composer Forum

Forums => Tips & Tricks => Object Plugins => Topic started by: hmmueller on 2018-09-23 05:02 pm

Title: BarCounter.hmm 0.5
Post by: hmmueller on 2018-09-23 05:02 pm
This is my replacement for the original BarCounter.nw (https://forum.noteworthycomposer.com/?topic=9198.0) object, with a few extended features I found necessary on large scores. I'm very grateful to NWC for the initial code for this plugin, which I only extended at a few places:


The first attached file shows a few demo cases and explains them. However, the real use of these feature can only be seen in larger scores. If someone is interested in such examples, please let me know. The second file shows the effect of a numbering error.

H.M.
Title: Re: BarCounter.hmm 0.1
Post by: Mike Shawaluk on 2018-09-24 01:48 pm
Nice work! I have one small suggestion that would make the object even more versatile: rather than have a "Use Lyrics Font" checkbox, why not just add a "Font" dropdown, which defaults to StaffBold but can be set to any of the available fonts? And if you want to really go whole hog, you could add a "Text Scale (%)" parameter.

Keep up the great work!

Mike
Title: Re: BarCounter.hmm 0.2
Post by: hmmueller on 2018-09-25 07:59 am
Thanks Mike - I have rewritten it per your suggestion; and also (hopefully) fixed a numbering bug when a bar has both "Force System Break" and "Exclude From Bar Count" checked.

H.M.
Title: Re: BarCounter.hmm 0.3
Post by: hmmueller on 2018-09-25 06:53 pm
The plugin needed a tiny correction because of a bug; and the example score needed an update because it had some old fields in it. These changes bumped the version to 0.3.

H.M.
Title: Re: BarCounter.hmm 0.3
Post by: EdFranks on 2019-02-08 08:01 pm
I have encountered a small bug.  I insert a "Boundary Change" to drop the start of the staff on the page.  This is followed a couple measures in with a "Boundary Change Reset" to return to the staff default.  The BarCounter is inserted as you would think, at the beginning.  Occasionally, a measure number is skipped over, eg, the measure count goes form 7 to 9.  It doesn't seem to be predictable.  When I scroll slowly to find where the problem lies, everything looks normal until one final scroll arrow click causes all the measure numbers to vanish momentarily and then reset to the +1 values.

As a workaround, I found that if I immediately follow the "Boundary Change reset" with an additional instance of BarCounter, everything works perfectly.  [Version 0.3}
Title: Re: BarCounter.hmm 0.3
Post by: hmmueller on 2019-02-08 08:38 pm
"Mhm" - yes, I think I have seen something like that, but only once or twice. Do you have a score that has this problem so that I can look into it? Thanks for the workaround, in any case!

H.M:
Title: Re: BarCounter.hmm 0.3
Post by: EdFranks on 2019-02-12 10:10 pm
Hello there, HM.  I've stripped down the score to just one failing instrument (the tuba, of course).
It's pretty straightforward. Hopefully, it will reliably fail for you, too.

Thanks,
Ed
Title: Re: BarCounter.hmm 0.3
Post by: EdFranks on 2019-03-09 05:22 pm
I found an instance where the "workaround" also fails.  BarCounter absolutely does not like to precede the MMR plugin in a measure.  To correct the problem, I added an instance of BarCounter after each measure containing MMR (which worked).  Experimenting, I moved the "workaround" back one measure (to avoid the MMR).  Problem also went away.  I adjusted the previous-posted failing score for illustration.
Title: Re: BarCounter.hmm 0.4
Post by: hmmueller on 2019-12-11 08:35 pm
For a choral piece with string quartet, I usually need seven different scores: conductor's score, choral score, rehearsal score (with piano instead of strings), and four voices for the strings. Each one needs bar numbers, and I use my BarCounter.hmm object extensively to number every other measure. However, I make errors - mainly by having additional bars from some edit experiment; or forgetting to mark some in-measure bar line with "Exclude From Bar Count".

After three years of distributing not only one score with one-off errors, I finally added a simple flag that checks whether the numbers are consecutive at a next BarCounter object.

Typically, one would add a BarCounter object in the final measure of each staff that shows numbering in some score, and set its starting number to the expected last bar number. If the bar count is not correct there, an error message is shown above it - see the example score attached to the initial posting. I finally hope to have flawless numbers in the years to come.

H.M.
Title: Re: BarCounter.hmm 0.4
Post by: hmmueller on 2019-12-11 08:36 pm
I found an instance where the "workaround" also fails.  BarCounter absolutely does not like to precede the MMR plugin in a measure.  To correct the problem, I added an instance of BarCounter after each measure containing MMR (which worked).  Experimenting, I moved the "workaround" back one measure (to avoid the MMR).  Problem also went away.  I adjusted the previous-posted failing score for illustration.

Thanks for this tip! Bar counting (like some other objects) does not work nicely with MMR, unfortunately. But I have no good idea how to repair this.

H.M.
Title: Re: BarCounter.hmm 0.4
Post by: fathafluff on 2020-01-24 04:08 am
I'm not sure if this the same bug reported above. I've noticed with a couple of scores, the measure numbers in the edit screen (with viewer mode on or off) change as I scroll the screen (from Image1 to Image2). They seem to always be correct in the Print Preview, so it's not all that serious. It does seem to be related to MMRs. If I scroll further right, the problem goes away.
Title: Re: BarCounter.hmm 0.4
Post by: hmmueller on 2020-01-24 07:20 am
Thanks again - I have just confirmed that it is a bug in my code - but I do not yet know what the problem is. I'll try to find it out!

H.M.
Title: Re: BarCounter.hmm 0.5
Post by: hmmueller on 2020-01-30 10:10 pm
I have uploaded version 0.5 in the initial posting, which should be without the MMR bugs. If anyone still finds problems with it, please let me know!

H.M.
Title: Re: BarCounter.hmm 0.5
Post by: fathafluff on 2023-01-20 05:29 am
After 3 years I rediscovered this object, and it is really nice. One thing I noticed, comparing my nwc version to the original (which had similar bar numbers): For numbers starting at the beginning of a line, the original placed them immediately after the key signature (and time signature, if present). This object placed them under (and conflicting with) the clef. Would that be an option you might consider adding?
Title: Re: BarCounter.hmm 0.5
Post by: hmmueller on 2023-01-20 11:45 am
Hu - thanks for suggestion - I'd have to look into it. I use the object extensively (also the checking option, after having delivered voice prints with "slightly differing" measure numbers - all hell broke loose  >:( ), so I should have enough test cases. But may take a few weeks, as ... too much to do.

H.M.