Skip to main content
Topic: PageTxtMaestro.nw (Read 46443 times) previous topic - next topic

PageTxtMaestro.nw

PageTxtMaestro makes it easy to add a variety of page text elements to the printed page in two simple steps:

  • Add an object of type PageTxtMaestro.nw into the front of your top staff. This object does all of the printing work, so you need to add it first. Note that your top staff must contain at least one note before PageTxtMaestro can do its job.

  • Add PageTxt.nw objects as needed into the top staff. You can start with the predefined styles, then add custom styles for special situations.



Each PageTxt object can be defined such that it displays information found in the current file. This is done by using variables, which are enclosed in % characters. For example, %Author% will show the author text set from File, Info. The following variables can be used inside a PageTxt object:

brThis is adds a line break in the text
TitleThis is the title from File, Info
AuthorThis is the author from File, Info
LyricistThis is the lyricist from File, Info
Copyright1This is the first copyright line from File, Info
Copyright2This is the second copyright line from File, Info
StaffNameThis is the staff name from Staff Properties
StaffLabelThis is the staff label from Staff Properties
StaffLabelAbbrThis is the abbreviated staff label from Staff Properties
StaffGroupThis is the staff group from Staff Properties
PageNum
PageNum,1
This is a special case variable. You can use %PageNum% by itself, or add a comma and starting page number, such as %PageNum,7%, which starts numbering from 7.
Comment,Label
This is a special case variable. It is used to access custom variables set in the comments section of File, Info.

Re: PageTxtMaestro.nw

Reply #1
Excellent, thanks Eric.  This is sooo encouraging :D

Now....  Can "PageTxt" be modified so that it can also use data already stored in the file?

E.G. the title, and the staff label?

Thank you again :D
I plays 'Bones, crumpets, coronets, floosgals, youfonymums 'n tubies.

Re: PageTxtMaestro.nw

Reply #2
In version 2.75, an object plugin cannot see the file info, so you have to define your own custom text. You only have to do it once at the start of the staff.

Update: Mike found a bug in one of the api functions, so this provided an opportunity for additional api methods. Object plugins now have access to file info when drawing.

Re: PageTxtMaestro.nw

Reply #3
Thanks, this plugin will be very useful, but I think multiple instances would be a good idea, I mean, it lets you set (as you say) only "one for each predefined position". Multiple instances for each position would be good for making several page sub-tittles, several (and separated) composers or over-tittle dedicatons.
[...] y el mayor bien es pequeño: que toda la vida es sueño, y los sueños, sueños son.

Re: PageTxtMaestro.nw

Reply #4
A very useful plugin, thanks Eric.

One small point for those that go down into the minutia of printing positions.
If you have any form of staff labels activated, even if you don't have a staff label defined, then the title (defined as Top-Center) on page one is slightly adjusted in comparison with the positions of the same top-center titles on other pages.

Rich.

Re: PageTxtMaestro.nw

Reply #5
In version 2.75, an object plugin cannot see the file info, so you have to define your own custom text. You only have to do it once at the start of the staff.
Fair Enough - this is already streets ahead of manually placing text, Thank you
I plays 'Bones, crumpets, coronets, floosgals, youfonymums 'n tubies.

Re: PageTxtMaestro.nw

Reply #6
This looks very useful. I can think of a few enhancements to this object pair:

  • Allow a particular text element to be more than one line of text, perhaps separated by \n. Alternately, allow for multiple elements at each of the 6 locations (with appropriate offsets) as @lloyd has suggested.
  • Substitution of the current page number into an element (check for # or some other character?)
  • A way to make a particular PageTxt element conditional for even/odd page numbers.

Thanks,
Mike

Re: PageTxtMaestro.nw

Reply #7
I am looking at substantially changing this mechanism in order to support:

  • classifying page text independent of its page boundary location
  • multiple instances of page text using the same page boundary location
  • size adjustments to the built-in font styles
  • re-use of size and position for updated text sharing the same class

The down side is that these changes will inevitably complicate the objects. I will post an update soon.

Re: PageTxtMaestro.nw

Reply #8
  • classifying page text independent of its page boundary location
  • multiple instances of page text using the same page boundary location
  • size adjustments to the built-in font styles
  • re-use of size and position for updated text sharing the same class

Update completed, and I believe all of these objectives have been met. In addition, you can now use File Info variables, and specify that text should only appear on Odd or Even pages.

Re: PageTxtMaestro.nw

Reply #9
Great improvements!
Nevertheless, I miss 1 option: I'd also like to set Page Display Control to 'first page only'
And please can you define 'PageNumRaw'  and 'PageNumFrom,1 ? When I use these, there value = the value of 'PageNum'.
Always look on the bright side of life!

Re: PageTxtMaestro.nw

Reply #10
I'd also like to set Page Display Control to 'first page only'


You can do this by copying your original instruction to Page 2 and setting the visibility to "Never" . Or if you want to turn off all PageTxtMaestro instructions, the copy the PageTxtMaestro object to page 2 and set the visibility of this to never.
Rich.

Re: PageTxtMaestro.nw

Reply #11
IMO, a centered title ought to be centered on the page:
Code: (nwc) [Select · Download]
!NoteWorthyComposer(2.75)
|PgSetup|TitlePage:N|StaffLabels:First System
|AddStaff|Name:"Staff"|Label:"Vocal"
|StaffProperties|EndingBar:Open (hidden)
|User|PageTxtMaestro.nw|Pos:7|Class:StaffSig
|User|PageTxt.nw|Pos:10|PgStyle:main|Fnt:PageTitleText|XLoc:Center|YLoc:Top|Text:Title
|RestMultiBar|NumBars:32|PrintOnce:N|WhenHidden:ShowBars,ShowRests|Visibility:Never
|Bar|Style:Double
!NoteWorthyComposer-End
Registered user since 1996



Re: PageTxtMaestro.nw

Reply #14
If you have any form of staff labels activated, even if you don't have a staff label defined, then the title (defined as Top-Center) on page one is slightly adjusted in comparison with the positions of the same top-center titles on other pages.

I am looking into this.

You can do this by copying your original instruction to Page 2 and setting the visibility to "Never" .

You don't even need to find page 2. You can add a new instruction in the 2nd bar, and it will be applied starting in page 2.

You can also use this same technique in reverse. You can hide the first instance in order to skip the first page, then add a second instance in the second bar.


Re: PageTxtMaestro.nw

Reply #16
Updated with:

  • fix for Center location (thanks Mike)
  • allow negative number with %PageNumFrom,1% variable

Re: PageTxtMaestro.nw

Reply #17
I've noticed one other anomaly, that limits the usefulness of having both PageNum and PageNumRaw. Namely, unless you check the Page Numbering checkbox in Page Setup > Options, the From: number will always be set to 1. Therefore, when the printing of page numbers is suppressed (as it will probably be when PageTxtMaestro is being used), PageNum and PageNumRaw will always be the same value.

PageNumFrom,X does seem to provide the necessary numbering function when offset page numbers are needed.

Mike

Re: PageTxtMaestro.nw

Reply #18
The PageNumFrom,X is probably the only one that is needed. Perhaps the other two should just be removed.


Re: PageTxtMaestro.nw

Reply #19
A new update which uses only %PageNum% for page numbering. Simply add a comma and page number, like %PageNum,2%, when needed.


Re: PageTxtMaestro.nw

Reply #21
A new update which adds:

  • support for multiple lines of page text (use the %br% variable to add line breaks)
  • a predefined set of text styles (Author, Lyricist, Title, Copyright, and PageNumber)
  • support for extracting labelled text from the comments section of File, Info

Re: PageTxtMaestro.nw

Reply #22
Updated. You can now control multi-line text block alignment.

Re: PageTxtMaestro.nw

Reply #23
I may be missing something, but I don't find a way to indicate that a text object should be used only once.  One can, of course, enter a copy of the "PageTxt" object on the next page with no text in it, but that's awkward. I'd like to see the "Page Display Control" drop-down box include a "this page only" option.

Re: PageTxtMaestro.nw

Reply #24
I may be missing something, but I don't find a way to indicate that a text object should be used only once.  One can, of course, enter a copy of the "PageTxt" object on the next page with no text in it, but that's awkward. I'd like to see the "Page Display Control" drop-down box include a "this page only" option.
Your observation is correct. There does not appear to be a way to do this without a second PageTxt object, either with no text or with its Visibility is set to Never.

I agree that having a "This page only" choice would be a nice feature.

(Message edited - what I meant to say originally)

Re: PageTxtMaestro.nw

Reply #25
Actually, visibility doesn't have to be set to "never": all you need is a second instance of the same style you want to turn off, but with no text in it. I'd already done that. Wasn't trying to solve a problem, just make an observation that might lead to an improvement.

Re: PageTxtMaestro.nw

Reply #26
I'd like to see the "Page Display Control" drop-down box include a "this page only" option.

Thanks for the suggestion. I did an initial review, and this looks technically feasible, albeit non-trivial. I'll do some experiments later today. Will posts the results later...

Re: PageTxtMaestro.nw

Reply #27
Would "Just once" be easier? It would have pretty much the same effect.

Re: PageTxtMaestro.nw

Reply #28
New option, Once, has been added to the Page Display Control types.

All text configured as Once text will be shown exactly once, on the page that contains the item. Unlike other text control types, Once text fully implements the Visibility control.

[See Source Changes]

Re: PageTxtMaestro.nw

Reply #29
Two questions:

1. Regarding all these standard objects: How do I know whether the version that came with the 2.75 upgrade is the one that has been discussed here lately? Or, more constructively: I would like to see a version numbering for the standard objects - otherwise, I have to get all the objects from github and overwrite my current one, wouldn't I? (and I wonder whether for average end users, going to github is an option at all - is there some "bulk update mechanism" for objects?

2. Regarding this object: I want to use it to print the copyright info on each page (see https://forum.noteworthycomposer.com/?topic=9138.0). Now, if I add PageTxtMaestro and PageTxt at the very beginning of my score, the copyright notice is printed twice on the first page (even if I put a bar between the two). Of course, I could put the PageTxt "a little later" (in the second measure) - but I'd like to add the two objects into all my templates, and there, of course, are not yet any measures - so I would have to remember to move the PageTxt to a later measure lateron. So either (a) can I put the PageTxt in a template so that it will show up only from page 2 onwards; or, alternatively, (b) could I somehow disable the "standard" printing of the copyright notice on page 1 even if a I add Copyright 1 and 2?

Thx a lot for any enlightenments!
Harald M.

Re: PageTxtMaestro.nw

Reply #30
You should turn off the built-in title page info from File, Page Setup, Options.

Tools, Manage Objects is the easiest way to ensure that all of your installed objects are up to date.

Re: PageTxtMaestro.nw

Reply #31
Thank you.

Re "turning off title info" - I assume that's now the suggested way: Create all the standard text with PageTxt objects.
Now, there's one problem - for which I have a solution, but is it the best one?: I print different scores from one NWC file controlled via "Page Setup / Contents" - e.g., conductor's score, choir's score, piano score (sometimes with soprano voice - where I'd like to have that small staff  :) ) etc. So that the title and copyright and author and lyricist appear on all these scores, I add the 1+4 objects to each staff and mark them as "Visibility: Top Staff Only". That works out quite nice ... (except that the title seems not to claim as much place as the "old title" did and hence sometimes moves too near to the top staff ... so be it).

Re "Manage Objects" - I admit that I overlooked this; and it took me a while to find out that right-clicking opens the important menu where you can install a new download (some text to this end would have been helpful). But this is exactly the feature needed - sorry that I implied you'd have overlooked that!!

Thanks a lot!
Harald M.

Re: PageTxtMaestro.nw

Reply #32
The trick to adding spacing is boundary objects. Put something like this in the first bar:

Code: (nwc) [Select · Download]
!NoteWorthyComposerClip(2.75,Single)
|Boundary|Style:NewSize|Upper:20|Visibility:TopStaff
!NoteWorthyComposerClip-End

In the second bar, you can restore the lesser spacing with another shorter boundary object.

While in Manage Objects, you can also double-click each updated object plugin entry to initiate an update.

Re: PageTxtMaestro.nw

Reply #33
Spacing ... oh yes. So the final result is that I start each staff in all my templates with this one (the dummy bar is there to force the first boundary to take effect):

Code: (nwc) [Select · Download]
|User|PageTxtMaestro.nw|Pos:0|Class:StaffSig|Visibility:TopStaff
|Boundary|Style:NewSize|Upper:25|Lower:6|Visibility:TopStaff
|Bar|XBarCnt:Y|Visibility:Never
|Boundary|Style:Reset|Visibility:TopStaff
|User|PageTxt.nw|Pos:0|PgStyle:Title|Text:%Title%|Fnt:PageTitleText|YLoc:Top|XLoc:Center|PgCtrl:Once|Visibility:TopStaff
|User|PageTxt.nw|Pos:0|PgStyle:Author|Text:%Author%|Fnt:PageText|YLoc:Top|XLoc:Right|CY:10
|User|PageTxt.nw|Pos:0|PgStyle:Lyricist|Text:%Lyricist%|Fnt:PageText|YLoc:Top|CY:10|XLoc:Left
|User|PageTxt.nw|Pos:0|PgStyle:Copyright|Text:%Copyright1%%br%%Copyright2%|Fnt:PageSmallText|YLoc:Bottom|XLoc:Center|Visibility:TopStaff

This should work ... thanks a lot!
Harald M.

Re: PageTxtMaestro.nw

Reply #34
(the dummy bar is there to force the first boundary to take effect):
A hidden grace rest will also work. I find them preferable to bar lines (which sometimes affect printing in strange ways).
Registered user since 1996

Re: PageTxtMaestro.nw

Reply #35
Thx! - I'll modify my templates once more :)

Re: PageTxtMaestro.nw

Reply #36
... I tried the hidden grace rest, but this creates, for me, a bad problem. When I start my staffs as follows ...

Code: (nwc) [Select · Download]
!NoteWorthyComposerClip(2.75,Single)
|Clef|Type:Treble
|Key|Signature:F#,C#,G#,D#|Tonic:E
|User|PageTxtMaestro.nw|Pos:0|Class:StaffSig|Visibility:TopStaff
|Boundary|Style:NewSize|Upper:25|Lower:6|Visibility:TopStaff
|Rest|Dur:8th,Grace
|Boundary|Style:Reset|Visibility:TopStaff
|User|PageTxt.nw|Pos:0|PgStyle:Title|Text:%Title%|Fnt:PageTitleText|YLoc:Top|XLoc:Center|PgCtrl:Once
|User|PageTxt.nw|Pos:0|PgStyle:Author|Text:%Author%|Fnt:PageText|YLoc:Top|XLoc:Right|CY:10|PgCtrl:Once
|User|PageTxt.nw|Pos:0|PgStyle:Lyricist|Text:%Lyricist%|Fnt:PageText|YLoc:Top|CY:10|XLoc:Left|PgCtrl:Once
|User|PageTxt.nw|Pos:0|PgStyle:Copyright|Text:%Copyright1%%br%%Copyright2%|Fnt:PageSmallText|YLoc:Bottom|XLoc:Center|Visibility:TopStaff
|User|Acciaccatura.ms|Pos:0|Class:StaffSig
|TimeSig|Signature:3/8
|PerformanceStyle|Style:Legato|Pos:7.5
|Rest|Dur:Whole
|Bar
!NoteWorthyComposerClip-End

... then that first whole rest does not come out as a 3/8 rest, but as a 4/4 rest! :( ... Do you put some things (clefs, time signature, key, objects) at other places to circumvent this?

Harald


Re: PageTxtMaestro.nw

Reply #37
Noteworthy does not like any additional music item in the measure if you are using a whole note rest as a measure rest and the time sig is less than 4/4 even if it is a grace note that does not take up time. For a 3/8 time sig, if you use a dotted quarter for a measure rest, then it will work (I think).
Rich.

Re: PageTxtMaestro.nw

Reply #38
Ah ... right. I think that right now, I'll stay with my hidden and eXcluded bar, until I find the troubles it might create myself.

Thanks
Harald

Re: PageTxtMaestro.nw

Reply #39
I need some congratulations. I have successfully put in my first subtitle after years of wishing I had them but not knowing how to do it.

It took a lot of tweaking back and forth to get the settings right. What I used was:

y offset at 15 and font size at .5

Is there a better way to do this?

Thanks for your help!

Re: PageTxtMaestro.nw

Reply #40
Font size percentage will differ by which font you use and how big you have it set on the "fonts" tab of the Page Setup dialogue box, but yeah, that sounds about right.

Re: PageTxtMaestro.nw

Reply #41
I have another question that might belong in this topic.

I want to put performance suggestions at the bottom of the page. Can I set that up as a default setting with all the parameters already defined rather than having to put it in each time.

Also, if I wanted to make an entire separate front page of text with performance notes and background info, what would be the best way to go about it? (Not necessarily with this plug in if there is an easier way to do it within NWC.)

I apologize if this question has been answered already but I have a hard time finding answers for some reason! Plus my eyes glaze over if there is too much techno-babble....

Thanks for any help you can give me!
SEBC

Re: PageTxtMaestro.nw

Reply #42
...
Also, if I wanted to make an entire separate front page of text with performance notes and background info, what would be the best way to go about it? (Not necessarily with this plug in if there is an easier way to do it within NWC.)
Like what I did in the PDF linked in that posting?

I do not use NWC for this, but write separate documents and combine them to a single PDF with free PDFCreator (a common and standard tool for creating PDF files).
In that case, I wrote the first page separately (in Microsoft Word) and then used the "Merge" feature of PDFCreator to first print the front page, then do "Merge", then print the NWC score (from NWC to PDFCreator as printer), and then "Merge All" to create a single PDF from it.

H.M.

Re: PageTxtMaestro.nw

Reply #43
Like what I did in the PDF linked in that posting?

I do not use NWC for this, but write separate documents and combine them to a single PDF with free PDFCreator (a common and standard tool for creating PDF files).
In that case, I wrote the first page separately (in Microsoft Word) and then used the "Merge" feature of PDFCreator to first print the front page, then do "Merge", then print the NWC score (from NWC to PDFCreator as printer), and then "Merge All" to create a single PDF from it.

H.M.


Yes, exactly! It would be great to be able to do this within NWC. Is it possible? Could one of our talented developers or forum users come up with a tool or modification to make it happen? (You know who you are!!)

I also have a question about getting a line break. At the top is says to use br. Where, when, and how? When I put in br in the text line...it just shows up as br... ( you can all stop rolling your eyes).

Also, I am getting some subtitle collisions with the lyrcist, composer lines generated from the file information box. Is there a way to adjust that box instead of having to create 2 additional page text objects for each time this happens? I think I just need it to be about two lines further down on the page. Or maybe that will cause other collisions, like with the top stave?
One more question about performance notes. Where should they generally appear? At the top before the piece starts? At the bottom of the first page? At the point of performance? But I am having some issues with having them inserted as a txt object using  "x" as sometimes they go off the side of the page if they are too long, or if I change by staff font size then it might up in the middle o the page instead of at the bottom of that page. Is there a way to insert it using page text maestro and only have it show up on a certain specified page?
 
Thanks for helping me! I apologize if that question has already been asked and answered. Just point me in the right direction.




Re: PageTxtMaestro.nw

Reply #44
I'll answer the easy question. When you want to create a break, you need to use %br%. This applies to the other "special variables" also.

I think it might be noted in the discussion that when you are using PageTxtMaestro.nw, it's best to suppress the regular title, author and copyright fields. Perhaps that will help avoid the collisions you are seeing.

Mike

 

Re: PageTxtMaestro.nw

Reply #45
Well I thought about suppressing them but that seems like it is more work to put in all those different objects rather than dealing with it in the one big file information box. Is there another way around it? Or is it a case of choose one or the other based on the situation?

And thank you for the clarification on my bad use of BR!

Re: PageTxtMaestro.nw

Reply #46
Yes, exactly! It would be great to be able to do this within NWC.
But why? ??? - it would certainly be much more work than doing it with your favorite document editor (be it OpenOffice or Microsoft Office or whatever) and PDFCreator.

Why it could be attractive to put this into NWC:

a) "NWC should be the one-stop solution for everything with music scores" --> I think that would be very wrong: We should prefer dedicated tools for separate things. This is, on the one hand, a "philosophical" question, but on the other hand a commercial one: For the price of NWC, you cannot expect "everything".

b) "I want some score pieces in the introductory text" --> it is easy to place such pieces into office documents.

c) "I want only one file per score" --> there is probably always more than one file for a finished score: NWC file, setup file for instruments (e.g. sound font assignment) for acceptable playback, resulting PDFs for conductor and players/singers, NWCs for multiple movements etc. Therefore, it is useful anyway to organize scores either in (*) a separate directory per score or (*) with a good naming convention or (*) by placing the files of a score in a ZIP file and only extracting them to a working directory when working with them - and then, it is no problem to have more than one file for a score.

Therefore, I, personally, would not spend any time on putting work into a "new (NWC-affine) solution" for this already easily and nicely achieved feature ... I hope that's understandable now.

H.M.

// Edits in case c) ...

Re: PageTxtMaestro.nw

Reply #47
Well I thought about suppressing them but that seems like it is more work to put in all those different objects rather than dealing with it in the one big file information box.
First, there seems to be a misunderstanding: You can and do still enter all the score information in that "big file info box", even if you use PageTxt objects to place the information on the printed score. There is no difference here! - as the PageTxt objects pull the information from exactly that file info box.

Therefore, what you should do: Set up the templates you use so that they contain everything you need - either by modifying NWC's templates, or- preferably - creating new templates in a separate folder (and then point Tools-->Options-->Folders-->Templates to that folder).

The best way is to write a score and add all the necessary objects as you like them; then, afterwards, copy this score to the template folder and, there, delete everything after the first clef - but not all the carefully set-up objects at the staffs' beginnings. As an example, I have attached one of my smaller templates (for piano+violin) - as you can see, it has a few objects already predefined on each staff; and the "Title Page Info" unchecked in "File-->Page Setup-->Options" (and I would say that, as of now, there is no longer a need for this method of printing file info; rather, all the NWC standard templates should be updated to use the much more versatile PageTxt objects).

H.M.


Re: PageTxtMaestro.nw

Reply #49
Thank you for your discussion of the topic (and creative ideas for Excel!!!!!!!)

I am going to try to make some templates. I need to get organized and save time. This will help for sure. The more I learn, the more I realize that I don't know. I started with version 1. something and have upgraded through the years but I have been too busy to really learn more nwc skills, but that is changing now.

Thank you all again for your patience and willingness to help with things are obvious to the rest of the world.