lilypond-devel
[Top][All Lists]
Advanced

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

Re: Incipits - not alignment, but help with bug fixes


From: David Kastrup
Subject: Re: Incipits - not alignment, but help with bug fixes
Date: Fri, 22 Aug 2014 18:18:10 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux)

Phil Holmes <address@hidden> writes:

> There are currently two problems (alignment discussion notwithstanding and 
> which I'm not ignoring, but would prefer to park temporarily) with my 
> proposed incipit code.  1) If indent is not set explicitly in the \layout 
> block, it throws an error; 2) If instrumentName is not set explicitly in 
> the score containing the incipit, no incipit is output.
>
> For 1), the optimum answer would apppear to be to check whether indent has 
> been set, and if it hasn't, set it to the value of indent-default which is 
> set in paper-defaults-init.ly as "indent-default = 15\mm".  However, 
> trying to access that variable fails: "test = \indent-default" results 
> in "error: unknown escaped string: `\indent-default'".  Does anyone know 
> why this is and whether there's an alternative way to access that variable 
> value?
>
> If it's not possible to get the value, we could set a variable to what we 
> know its value to be, and then use that.  The following code works:
>
> indent-incipit-default = 15\mm
> line-width = #(primitive-eval
>   '(or (false-if-exception (* 1.0 indent))
>   (* 1.0 indent-incipit-default)))
>
> But all those (* 1.0 variable) lines aren't pretty, but I don't know 
> better syntax.  Would appreciate help here.

Just indent and indent-incipit-default (strip the parens off) should
work actually.

> For 2), the only solution I know is that we would have to add 'Note that 
> instrumentName must be set in the music for the incipit to be produced.  
> If no instrument name is required then use \set Staff.instrumentName = 
> #""' in the documentation.  Is there a better solution?

This is so much a royal pain to get stuff passed properly.  How do we
fare when things like choir brackets get involved?  If that would result
in unacceptable output, it would be a good excuse to rework
Instrument_name_engraver or whatever else is needed on the C++ level to
get a saner hook of incipits into the code.

-- 
David Kastrup



reply via email to

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