denemo-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Printing a full score & parts


From: Richard Shann
Subject: Re: Printing a full score & parts
Date: Mon, 02 Dec 2019 13:09:23 +0000

On Sun, 2019-12-01 at 22:06 +0000, Joe Wilkinson wrote:
> Thanks,
> 
> I'll get my head round using a bat file to script denemo sometime!
> But 
> the idea of conditional directives is neat.

Thinking about this, there is a way within Denemo to export score and
parts for the current score, but it is rather strange: you tell Denemo
to export each PDF at intervals, allowing time for the typesetting to
be done before the next one fires off. Here's a script that does that

8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8>

(let ((filename (d-Open "query=filename"))(numstaffs (d-GetStaffsInMovement)))
    (if filename
        (let ((incr (d-GetUserInput (_ "Export PDF score and parts") (_ "Give 
estimated time for typesetting (secs): ") "5")))
            (if (and incr (string->number incr))
                (begin
                    (set! incr (* 1000 (string->number incr)))
                    (set! filename (substring filename 0 (- (string-length 
filename) 7))) ;strip .denemo extension
                    (d-SelectDefaultLayout)
                    (d-ExportPDF (string-append filename "-Score.pdf"))        
                    (let loop ((time incr)(num 1))
                        (define name (string-append filename "-part-" 
(number->string num) ".pdf"))
                        (d-GoToPosition 1 num 1 1)
                        (if (not (d-IsVoice))
                            (d-OneShotTimer time (string-append 
"(d-GoToPosition 1 " (number->string num) " 1 1) 
(d-LilyPondForPart)(d-ExportPDF \"" name "\")"))
                            (set! time (- time incr)))
                        (if (< num numstaffs)
                            (loop (+ time incr) (1+ num)))))))
        (d-WarningDialog  (_ "The score does not have a file name. Save the 
score first."))))
    
8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8>

If you put this in a command, or a palette button you could add the
following refinement: before each typeset *execute any scheme in the
Scheme Window*. The point of doing that would be to do things like
changing the score size for the Default Score Layout.

The code to execute the script in the Scheme Window is this:

(eval-string (d-GetSchemeText))

however you will cause an infinite loop if you put this into the above
script and execute it from the Scheme Window, so put the script into a
command or button before executing it if you add that expression to the
script.

HTH

Richard




> 
> Joe
> 
> 
> On 01/12/2019 17:11, Richard Shann wrote:
> > On Sat, 2019-11-30 at 18:53 +0000, Joe Wilkinson wrote:
> > > Hi Richard,
> > > 
> > > Again, I have probably missed something, but if I have a score
> > > with
> > > 6
> > > parts and want to produce a pdf with the separate parts followed
> > > by
> > > the
> > > full score, is this possible within denemo.
> > 
> > Within Denemo this is not trivial to script, because the PDF
> > generation
> > is asynchronous, so when you loop over the staffs you end up with
> > just
> > the last PDF. It is easy from outside Denemo - calling Denemo to
> > create
> > each PDF you want. So you need a bash script or a Windows .bat
> > file.
> > 
> > > Ideally, with the piece I am working on at present,  I'd want the
> > > score
> > > smaller than the parts to make the conductors job easier - less
> > > page
> > > turns - but give the players as full a page of dots as practical.
> > 
> > That at least is easy enough, especially if one of the two font
> > sizes
> > you want happens to be the default. In that case you set the Print
> > View
> > to create the full score at the size you want it and then go to the
> > Score Editor and look down the Denemo Directives for the Score Size
> > one
> > - it's in the Paper Directives, called Overall Score Size. You
> > click on
> > "Conditional" and make it "Only for xxxx layout" where xxx is the
> > one
> > you have typeset, e.g. the Default Score Layout. Now it will be
> > ignored
> > for other typesets (e.g. for the parts) which will use the default.
> > 
> > If you want another custom score size for the parts you click
> > "Create
> > Duplicate" on the Overall Score Size directive. This creates a
> > duplicate which is tagged with a name you gave it on creation. You
> > make
> > *that* directive conditional on the Default Score Layout and then
> > return to the Main window and execute Overall Score Size again
> > giving
> > the size you want for the parts. In practice, that's all you would
> > need
> > - the overall score size directive is earlier and so is eclipsed by
> > your conditional one when it is active.
> > 
> > HTH
> > 
> > Richard



reply via email to

[Prev in Thread] Current Thread [Next in Thread]