Skip to main content
Topic: A user object request - oversize time signatures. (Read 9107 times) previous topic - next topic

A user object request - oversize time signatures.

Hi you guys that have skills in user objects.  A couple of years ago (forum isn't telling me the exact date :( ) I made a request for a decoration enhancement for master repeat bar lines.  https://forum.noteworthycomposer.com/?topic=9261.msg66135#msg66135

Lloyd graciously came up with a wonderful solution I've been using regularly ever since.

Now I have another request: oversize time signatures.

Occasionally the scores I play for musicals have a time signature that is significantly larger than you would normally expect.  They extend from the centre line the same way that a normal time signature does, but instead of being completely enclosed in the staff (I.E. each number is 2 spaces high), they extend above and below by approximately an additional space to space and a half.  Think scaled by 150% to 175%.  This can be really, really helpful.  Especially if the score is busy.

Ideally the object would detect a time signature, make sure it's been made "invisible" and overlay it with the same characters but scaled by 150% to 175% (scaling perhaps able to be specified).  It may need to default to preserving width too...

See the example attached for an excerpt from a real world score I'm currently rehearsing.
I plays 'Bones, crumpets, coronets, floosgals, youfonymums 'n tubies.

Re: A user object request - oversize time signatures.

Reply #1
Uhmmmm.... I haven't scripted nothing in about a year, but I think I'll try it for a couple of days... If I can't script something good I'll leave it to some other user  :))
[...] y el mayor bien es pequeño: que toda la vida es sueño, y los sueños, sueños son.

Re: A user object request - oversize time signatures.

Reply #2
Ok friends, I've been working on it for a little and I've found some "problems" with this plugin...

Lawrie said:
Quote
[...]Ideally the object would detect a time signature,[...]
Ok, no problem... next,  8)

Quote
[...]make sure it's been made "invisible"[...]
Everything's ok for now... next,  ::)

Quote
[...]and overlay it with[...]
Wooops stop!  :o 
After making a little tests I saw that I can't make that the plugin overlays an "item" which is not present in the staff... When the "original time signature" becomes invisible, it disapears from the (print) score and the position it was at will be occupied with the next "item" (maybe a note, maybe a bar...)

It can be "solved" in two ways:
a) with spacers and/or some other easy tricks, but it means to manually review EACH TIME SIGNATURE (to correct width for each)
b) giving the plugin an option for working in 'Standard' class, which means to manually review EACH TIME SIGNATURE (to insert a new plugin for each)

Both "solutions" are very very poor, I know... but they are the only ones I have for now. If some other user has some other solution it will be welcome.
If some other user developes some other (better) plugin/tool it will be welcome too  :D

I've added to this post a .zip file with a early testing version of the script and a demo NWC file (Version 2.75a Beta9). In the first page there's a sample without oversizing and in the second the same sample oversized (with a couple of notations/hints).
Place the file OversizeTimeSig.fso.nwcuser.lua in your User Object folder manually, and then open the demo NWC file. Try it deeply and if it works well for you then report any bug and I'll make a post under UserObjects section in the forum.  ;)

I'll wait for any answer
Lloyd.
[...] y el mayor bien es pequeño: que toda la vida es sueño, y los sueños, sueños son.

Re: A user object request - oversize time signatures.

Reply #3
Update: Post and attachment removed; replaced by TimeSigScaler.nw.

Re: A user object request - oversize time signatures.

Reply #4
Uhmmm... I've found some interesting ideas on this new code. Tomorrow (or maybe the day after tomorrow) I'll try to improve the script  ;D
Be patient for a couple of days  ;)
[...] y el mayor bien es pequeño: que toda la vida es sueño, y los sueños, sueños son.

Re: A user object request - oversize time signatures.

Reply #5
Hi Lloyd,
great start mate - looks really good.  Looking forward to your next iteration.  :)

One observation - What I meant by "make sure it's been made invisible" was that the object would modify the existing time signature to make it invisible, not detect one that is already invisible...  I don't know if the API's will allow for this.

Eric, I notice with your version that the time sig. gets placed on every new system... (see the print preview noting the 32 bar rest)

My preference is to only add the object once to the staff (at the beginning) and have it affect every time sig. on the staff...

If it MUST be added before every time sig. then maybe there needs to be an associated user tool...

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

Re: A user object request - oversize time signatures.

Reply #6
Good evening Lawrie,
as far as I know, the API can't modify an existing Time Signature (feel free to correct me if I'm wrong, Eric ;)), BUT you can: select all the staff, edit > filtered properties and then select Time Signature. After that you can hide all Time Signature marks at once. Then applying the User object at the start of the staff will insert a XXL Time Signature over the hidden ones.

By the moment you will need to adjust width one by one on every time signature using spacers (boooooring), but be patient, this is what I'll try to fix in a few days.
Anyway, I'll try to improve it to make it as easy to use as possible.
[...] y el mayor bien es pequeño: que toda la vida es sueño, y los sueños, sueños son.

Re: A user object request - oversize time signatures.

Reply #7
One observation - What I meant by "make sure it's been made invisible" was that the object would modify the existing time signature to make it invisible, not detect one that is already invisible...  I don't know if the API's will allow for this.

They don't.

Eric, I notice with your version that the time sig. gets placed on every new system...

Not exactly. It has to accompany any actual time signature that is placed. The plugin code could be enhanced to support standard sizes on new printed systems after its first appearance.


Re: A user object request - oversize time signatures.

Reply #8
RE: Time sig. gets placed on every system:
Not exactly. It has to accompany any actual time signature that is placed. The plugin code could be enhanced to support standard sizes on new printed systems after its first appearance.
Perhaps I didn't explain it well.  Please see the attached image from print preview.  Note the 9/8 on every system of the 32 bar rest.
I plays 'Bones, crumpets, coronets, floosgals, youfonymums 'n tubies.

Re: A user object request - oversize time signatures.

Reply #9
Yeah, sorry, I should have understood what you meant. Just turn off the StaffSig:

Code: (nwc) [Select · Download]
!NoteWorthyComposerClip(2.75,Single)
|Bar
|User|OversizeTimeSig.test|Pos:0|Scale:175
|TimeSig|Signature:9/8|Visibility:Never
|RestMultiBar|NumBars:32|PrintOnce:N|WhenHidden:ShowBars,ShowRests|Visibility:Never
!NoteWorthyComposerClip-End

You can remove this line from the plugin:

Code: (lua) [Select · Download]
t.Class = 'StaffSig'

A user tool that adds an OversizeTimeSig object to every time signature is pretty straight forward. As far as a single object instance that redraws all instances of a time signature, Lloyd's original solution is about as good as it will get.

Re: A user object request - oversize time signatures.

Reply #10
Cool, thanks Eric.

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

Re: A user object request - oversize time signatures.

Reply #11
I went ahead and posted a plugin that formalizes the example from earlier in the topic. The plugin includes a user tool that will apply the scaling to every time signature in a file. Some manual cleanup will likely still be required.

This object can be used to draw a scaled version of a prior, usually hidden, time signature. This object should always be placed after the real time signature.

Re: A user object request - oversize time signatures.

Reply #12
Good job Eric!   :D
I'm almost done with mine too. It works in the way that Lawrie asked, with only one instance at the begining of the staff...
It will be uploaded tomorrow ^_^
[...] y el mayor bien es pequeño: que toda la vida es sueño, y los sueños, sueños son.

Re: A user object request - oversize time signatures.

Reply #13
As I promised, here it is.  :))
Since the new User Object TimeSigScaler.nw does exactly the same thing (oversize the Time Signatures) I've decided to post it here (for testing) before making a new topic in the User Objects forum... If there's no need of two plugins for oversizing Time Sig I will not upload it, but if you like it (and if you want it) then just tell me and I'll make a new topic for this User Object.

And now how it works:
This plugin will oversize any existing Time Signature but only in certain conditions:
- Set one of the custom colors to white (that's because is the background color, of course... I usually use the last one -Highlight 7-, but it can be any of them).
- Change the color settings of the Time Signature objects from "default" to the custom color changed in the step before.
- Insert a new instance of the plugin at the beginning of the staff.
- Tell the plugin the number of bars of your score, which custom color you've applied to your Time Signatures and the oversizing percent.

The plugin now will oversize any Time Signature with the custom color you've chosen... very quick, very easy!.
You can change the oversizing percent with +/- keys.

That's all. Try it deeply and tell me if you want it on the User Objects forum. ;)
[...] y el mayor bien es pequeño: que toda la vida es sueño, y los sueños, sueños son.

Re: A user object request - oversize time signatures.

Reply #14
Looks good Lloyd.  thanks mate.

Just curious though - why the need to enter the number of bars???  And does it matter if you put too many in?
I plays 'Bones, crumpets, coronets, floosgals, youfonymums 'n tubies.

Re: A user object request - oversize time signatures.

Reply #15
jejeje I knew someone will ask.... xD

Short answer:
for Span reasons.

Long answer:
Plugins with "StaffSig" class will be autoinserted on evey new system, but if the plugin is inserted at the beginning of the staff it means that it will be rendered before the existing Time Signatures (it means that the "white ones" would be on top) . Plugins with 'Span' class will render the XXL TimeSig after all non-span items, but the Span must be long enought (for this plugin I thought it could be at least for all the score)... The SpanTypes supported by the API are notes, syllables, bars, ticks and items, so I thought it's easier to know how many bars are in your score (at least easier than notes/syllables/ticks/items). Thats because it needs the number of bars. Another option was let the script to calculate it automatically, but of course that code needs to be written and I feel a little lazy (sorry...) xDD

If you put too many bars.... well, give a try. The max number are 2048 ^__^
[...] y el mayor bien es pequeño: que toda la vida es sueño, y los sueños, sueños son.

Re: A user object request - oversize time signatures.

Reply #16
Ahh, fair enough.  However, given there is a known max of 2048 why not just stick this in the code and forget about making it an adjustable parameter?  I can't think of any reason why it would be necessary to actually reduce it...  Especially given that if I'm using this object, then it's pretty certain I want it in every time signature instance.  And for the exceptions I just don't make 'em white.
I plays 'Bones, crumpets, coronets, floosgals, youfonymums 'n tubies.

Re: A user object request - oversize time signatures.

Reply #17
Yep, you are right Lawrie... Updated.  ;)
Now the Object always spans for 2048 bars. If you wanna try it re-download.
[...] y el mayor bien es pequeño: que toda la vida es sueño, y los sueños, sueños son.

Re: A user object request - oversize time signatures.

Reply #18
Ni-ice mate.  Now to play with both yours and Erics versions and see which ends up most convenient.
Thank you :D
I plays 'Bones, crumpets, coronets, floosgals, youfonymums 'n tubies.

Re: A user object request - oversize time signatures.

Reply #19
Nice one Lloyd. Your scheme works well. Redrawing the staff lines is a nice touch.

One question though...where did you get the 2048 bar limit?

Re: A user object request - oversize time signatures.

Reply #20
well, it's only the limit I decided for this plugin...  ;) I suposed it's high enought for almost every work... (I know... you've always said that "suposing" things is not a good practice... sorry  O:) ) I think it would be better if the script finds the exact number of bars in the score, but anyway... if someone asks for it on the "user objects forum" I'll review this setting on the script  :))
[...] y el mayor bien es pequeño: que toda la vida es sueño, y los sueños, sueños son.

Re: A user object request - oversize time signatures.

Reply #21
If your object only appears once in the staff, then a vary large span is reasonable. You can use 16384 as a reasonable large number.

However, if a user places multiple instances of your object on the staff, then this can cause problems. It will trigger every instance of your object to be placed at the front of later systems. You could avoid this issue in your span method:

Code: (lua) [Select · Download]
local function do_span(t)
if nwc.ntnidx:find('next','user',userObjTypeName) then
return nwc.ntnidx:indexOffset()-1,'items'
end

return 16384,'bars'
end

This has the potential to impact NWC performance for very large staffs. If you don't want to allow multiple instances at all, then you could use an audit method to turn off the Span class for later object instances on a staff.

Code: (lua) [Select · Download]
local function do_audit(t)
t.Class = nwc.ntnidx:find('prior','user',userObjTypeName) and 'Standard' or 'Span'
end

 

Re: A user object request - oversize time signatures.

Reply #22
Thanks a lot Eric  ;D  ;D
every (wise) tip is always welcome. I've updated the script with your new lines and tonight I'll upload to the forum.
[...] y el mayor bien es pequeño: que toda la vida es sueño, y los sueños, sueños son.