denemo-devel
[Top][All Lists]
Advanced

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

Re: [Denemo-devel] Assembling a book of pieces from a set of Denemo scor


From: Richard Shann
Subject: Re: [Denemo-devel] Assembling a book of pieces from a set of Denemo scores
Date: Mon, 22 Jul 2019 17:06:48 +0100

I've made some refinements to the script I gave for making a book of
pieces from a directory full of Denemo scores. The script now can make
a title page for the book, collecting together titles and incipits for
all the scores.
I attach the bash script that does this. As an example of what you can
do look at this book:

https://imslp.org/wiki/12_Recorder_Sonatas,_Op.3_(Valentine,_Robert)#IMSLP582304

this was created by running the script DenemoBook with these
parameters:

DenemoBook "12 Sonatas" "Robert Valentine" "Op. 3" "\"Edited by Richard 
Shann\"" "Source code at www.denemo.org" "0.8" "0.6"

They are mostly self-explanatory, the last two are scaling to apply to
the list of titles of the pieces as if there are too many they will run
off the page. (This example has twelve sonatas).

Richard


On Mon, 2019-07-01 at 16:28 +0100, Richard Shann wrote:
> If you have a set of pieces saved as Denemo scores and want to create
> full score and parts for them and put them all into a single pdf then
> you may like to tinker with this script:
> 
> 8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><
> 8>
> 
> #!/bin/bash
> find . -name "*.denemo" -exec gzip -f '{}' \;
> mkdir DenemoPDFoutput
> rm DenemoBook.pdf
> (IFS=$'\n'; for f in *.denemo.gz ; do denemo -n -a "(d-
> SelectDefaultLayout)(d-ExportPDF \""`pwd`/DenemoPDFoutput/"$f-
> Ascore.pdf\")(d-MoveToMovementBeginning)(d-LilyPondForPart)(d-
> ExportPDF \""`pwd`/DenemoPDFoutput/"$f-Bpart.pdf\")" $f ; done )
> (IFS=$'\n'; gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite
> -sOutputFile=DenemoBook.pdf DenemoPDFoutput/*.pdf)
> rm -rf DenemoPDFoutput
> 
> 8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><
> 8>
> 
> It creates the Default Score Layout and the Solo part (from the
> topmost
> part) for all Denemo scores in the current directory and generates a
> pdf DenemoBook.pdf which contains all those pdfs.
> 
> This version assumes a single solo part in the topmost staff. In case
> anyone may want to adjust it for their own use the relevant bit to
> change is the Scheme script which is run on all the Denemo scores (*)
> Here I give a guide to that bit of Scheme:
> 
> ;;; select the default layout - the full score
> (d-SelectDefaultLayout) 
> 
> ;;; exports that layout as PDF to a temporary directory
> DenemoPDFoutput
> ;;; the name is made from the file name with "-Ascore" appended
> ;;; where the A is just to force the alphabetical ordering
> (d-ExportPDF \""`pwd`/DenemoPDFoutput/"$f-Ascore.pdf\") 
> 
> ;;; create the score layout for the topmost part
> (d-MoveToMovementBeginning)
> (d-LilyPondForPart)
> 
> ;;; export that to PDF using B to make it come after the full score
> (d-ExportPDF \""`pwd`/DenemoPDFoutput/"$f-Bpart.pdf\")
> 
> the script then uses Ghostscript (gs must be in the path) to
> concatenate all the PDFs and then deletes the temporary files.
> 
> Richard
> 
> (*)The scores are all compressed first to save having to deal with
> both
> compressed and uncompressed scores in the script - Denemo is quite
> happy to open compressed scores.
> 
> 
> _______________________________________________
> Denemo-devel mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/denemo-devel

Attachment: DenemoBook
Description: application/shellscript


reply via email to

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