Re: Conditional Complilation

2023-11-15 Thread Ken Ledeen
THanks to all who have offered ideas.  I think the "bookpart" approach will
be quite effective for me.

I sincerely appreciate both the competence and the willingness to share of
this fantastic community.

Ken Ledeen

Mobile:   617-817-3183

www.nevo.com
www.bitsbook.com
tiny.cc/KenLedeen 


On Wed, Nov 15, 2023 at 10:50 AM Knute Snortum  wrote:

> On Tue, Nov 14, 2023 at 9:21 PM Vaughan McAlley 
> wrote:
>
>> On Wed, 15 Nov 2023 at 12:09, Ken Ledeen  wrote:
>>
>>> Hi All,
>>>
>>> From time to time I would like to include / exclude portions of the
>>> total score.
>>>
>>>  ...
>
>>
>> Hi Ken,
>>
>> For big projects I use something like this. You change a string set at
>> the top of the file, and it compiles the movements you ask for. My Requiem
>> was in 7 movements. It was fiddly to set up, but once that was done, it was
>> easy to just work on one movement.
>>
>
> [code excluded] ...
>
> This is a really nice solution to compiling multiple movements, thanks!
> One thing I noticed is that you get warnings about zero duration scores
> when compiling less than the full piece.  To avoid this, you could add a
> spacer rest to your EmptyBookpart variable like this:
>
> EmptyBookpart = { s4 }
>
> That gets rid of the warnings, but it also creates little scores with just
> a clef and time signature.  It's a trade-off.  Personally, I don't want
> spurious warnings in my LilyPond log, so I choose the spacer rest solution.
>
> --
> Knute Snortum
>
>
>


Re: Emacs Mode Problem with includes

2023-11-15 Thread Laurie Savage
That worked perfectly:

Emacs > Options > Customize Emacs > Options Matching > Lilypond > Lilypond
Lilypond Command > /usr/bin/lilypond
--include=/home/laurie/Lilypond/includes "${@}"

Thanks
Laurie Savage
https://www.queensofthewest.com/

The Latest Queens of The West clips
https://www.youtube.com/playlist?list=PLgkDbfgWIb8_tQgEZRKeRWVSukoM2xoC_


On Thu, 16 Nov 2023 at 02:41, Torsten Krueger  wrote:

> Laurie Savage wrote on 13.11.2023:
>
> > Still I get errors like this:
> > /home/laurie/Documents/Charts/Transpositions/Dear Old
> > Stockholm/Dear-Old-Stockhom_Traditional.ly:3:10: error: cannot find file:
> > `/home/Laurie/Lilypond/includes/jazzchords.ily'
>
> >
> > ...
> >
> > Any ideas?
>
> I am not calling lilypond directly from emacs, but a short script which
> itself runs:
>
> /usr/local/lilypond/current/bin/lilypond
> --include=/home/torsten/.lilypond/include "${@}"
>
>
> Have fuun!
> Torsten
>
>
>


Re: FYI: recent MacPorts ghostscript upgrade causes Lilypond 2.24.2 warning from Guile

2023-11-15 Thread Kenneth Wolcott
Thanks, Jean, I wasn't sure that this was a different thing with
ghostscript or not, just thought I'd mention it.  Yes, I am using the
Lilypond tarball now in place of the MacPorts Lilypond.  I am looking
forward to the new Lilypond release...

Thanks,
Ken

On Wed, Nov 15, 2023 at 11:41 AM Jean Abou Samra  wrote:
>
> Thanks, but we already know about this. See 
> https://gitlab.com/lilypond/lilypond/-/issues/6675 and the various recent 
> threads about Homebrew on this list.
>
> We are unfortunately unlikely to convince package maintainers to downgrade 
> Ghostscript to 10.02.0 since the change that broke LilyPond was a security 
> fix.
>
> LilyPond 2.24.3 is going to be released quite soon with a workaround on our 
> side that should fix this issue. Meanwhile, it's best to use binaries from 
> lilypond.org.



Re: FYI: recent MacPorts ghostscript upgrade causes Lilypond 2.24.2 warning from Guile

2023-11-15 Thread Jean Abou Samra
Thanks, but we already know about this.
See https://gitlab.com/lilypond/lilypond/-/issues/6675 and the various recent
threads about Homebrew on this list.

We are unfortunately unlikely to convince package maintainers to downgrade
Ghostscript to 10.02.0 since the change that broke LilyPond was a security fix.

LilyPond 2.24.3 is going to be released quite soon with a workaround on our side
that should fix this issue. Meanwhile, it's best to use binaries from
lilypond.org.


signature.asc
Description: This is a digitally signed message part


FYI: recent MacPorts ghostscript upgrade causes Lilypond 2.24.2 warning from Guile

2023-11-15 Thread Kenneth Wolcott
FYI:

gs --version
10.02.1

GNU LilyPond 2.24.2 (running Guile 2.2)
Changing working directory to: `[redacted]/tmp/lilypond/target'
Processing `low_organ_notes.ly'
Parsing...
Interpreting music...
Preprocessing graphical objects...
Interpreting music...
MIDI output to `low_organ_notes.midi'...
Finding the ideal number of pages...
Fitting music on 1 page...
Drawing systems...
Converting to `low_organ_notes.pdf'...
warning: `(gs -q -dNODISPLAY -dNOSAFER -dNOPAUSE -dBATCH
-dAutoRotatePages=/None -dPrinted=false
/var/folders/w6/y2gky19s1mbcg5cgwj4512q4gn/T//lilypond-tmp-4188220)'
failed (256)

/opt/local/share/lilypond/2.24.2/ly/init.ly:65:2: error: Guile
signaled an error for the expression beginning here
#
 (let ((book-handler (if (defined? 'default-toplevel-book-handler)
Throw to key `ly-file-failed' with args `()'.

Ken Wolcott



Re: Conditional Complilation

2023-11-15 Thread Knute Snortum
On Tue, Nov 14, 2023 at 9:21 PM Vaughan McAlley 
wrote:

> On Wed, 15 Nov 2023 at 12:09, Ken Ledeen  wrote:
>
>> Hi All,
>>
>> From time to time I would like to include / exclude portions of the total
>> score.
>>
>>  ...

>
> Hi Ken,
>
> For big projects I use something like this. You change a string set at the
> top of the file, and it compiles the movements you ask for. My Requiem was
> in 7 movements. It was fiddly to set up, but once that was done, it was
> easy to just work on one movement.
>

[code excluded] ...

This is a really nice solution to compiling multiple movements, thanks!
One thing I noticed is that you get warnings about zero duration scores
when compiling less than the full piece.  To avoid this, you could add a
spacer rest to your EmptyBookpart variable like this:

EmptyBookpart = { s4 }

That gets rid of the warnings, but it also creates little scores with just
a clef and time signature.  It's a trade-off.  Personally, I don't want
spurious warnings in my LilyPond log, so I choose the spacer rest solution.

--
Knute Snortum


Re: init.ly Error Making PDF

2023-11-15 Thread Ernie Braganza
Thank you!

On Wed, Nov 15, 2023 at 1:46 AM William Rehwinkel <
will...@williamrehwinkel.net> wrote:

> yes, it is a known bug due to a ghostscript security patch. Try using
> the pre-built binary for lilypond instead of homebrew.
>
> -William
>
> On 11/15/23 01:13, Ernie Braganza wrote:
> > I just updated my Mac using Homebrew and I now get this error when I run
> > lilypond. It compiles fine if I create a PostScript file using the --ps
> > option.
> >
> >
> > My ghostscript was updated to version 10.02.1 Is there a known bug? I
> > get this when I run lilypond with the -V switch:
> >
> > GPL Ghostscript 10.02.1: Unrecoverable error, exit code 1
> >
> >
> > I checked permissions and those are correct for ghostscript
> >
> >
> > Here's the error message I get:
> >
> > -
> >
> > Drawing systems...
> > Converting to `basic.pdf'...
> > warning: `(gs -q -dNODISPLAY -dNOSAFER -dNOPAUSE -dBATCH
> > -dAutoRotatePages=/None -dPrinted=false
> > /var/folders/lc/_0_zmjsx06l7gd97v8qpxz14gp/T//lilypond-tmp-3593263)'
> > failed (256)
> >
> > /usr/local/Cellar/lilypond/2.24.2/share/lilypond/2.24.2/ly/init.ly:65:2:
>
> > error: Guile signaled an error for the expression beginning here
> > #
> >   (let ((book-handler (if (defined? 'default-toplevel-book-handler)
> > Throw to key `ly-file-failed' with args `()'.
> > Exited with return code 1.
> >
> > -
> >
> > I am using LilyPond 2.24.2 (running Guile 3.0) on macOS Monterey
> > (ver.12.6.8)
> >
> > I installed lilypond using Homebrew (4.1.20)
> >
>
> --
> William Rehwinkel - Oberlin College and Conservatory '24
>
> will...@williamrehwinkel.net
>
> PGP key: https://ftp.williamrehwinkel.net/pubkey.txt
>


Re: Emacs Mode Problem with includes

2023-11-15 Thread Torsten Krueger
Laurie Savage wrote on 13.11.2023:

> Still I get errors like this:
> /home/laurie/Documents/Charts/Transpositions/Dear Old
> Stockholm/Dear-Old-Stockhom_Traditional.ly:3:10: error: cannot find file:
> `/home/Laurie/Lilypond/includes/jazzchords.ily'

>
> ...
>
> Any ideas?

I am not calling lilypond directly from emacs, but a short script which
itself runs:

/usr/local/lilypond/current/bin/lilypond 
--include=/home/torsten/.lilypond/include "${@}"


Have fuun!
Torsten




Re: Conditional Complilation

2023-11-15 Thread Kevin Cole
On Tue, Nov 14, 2023 at 8:09 PM Ken Ledeen  wrote:

> Hi All,
>
> From time to time I would like to include / exclude portions of the total
> score. For now, in the crudest of ways, I just comment out the parts I
> don't want (%{ . %}).  That works, of course, but I was wondering if
> there was a more elegant way.
>
> Ideally I would have some variable that I set to boolean #t or #f to
> indicate what I want included.  Then, instead of the  %{  %} if would
> be something like
>
> if includeFlag {   ...   }
>
> Then I wouldn't have to search around for where I'd included the comment
> start and end brackets.
>
> I found the scheme if function but it didn't seem like an option.
>
> Many thanks in advance
>

Ooh, ooh! A chance to share something that I've been taught here! ;-) Not
quite what you're looking for but it may give you ideas...

In my case, I have a lot of LilyPond files that I recompile too often --
mostly because I learn some more clever way of doing something and then go
back and change all of the old files. But, sometimes I want PDFs with a set
page size for printing, and sometimes I want SVGs with infinitely
long pages for the web. So a conditional based on an environment variable
which is set based on an argument to the Bash script. So, a conditional
expression and an include based on the value of the variable constructed:

%%%

% Use environment variable to decide if discrete pagination (PDF) or
% continuous pagination (SVG). Default to SVG if none defined.
%
pageBreaking = #(string-append (getenv "HOME") "/.local/lib/lilypond/"
(if (getenv "PAGE_BREAKING") (getenv "PAGE_BREAKING")
"svg") ".ily")
\include \pageBreaking

%%%