lilypond-devel
[Top][All Lists]
Advanced

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

Incipits - not alignment, but help with bug fixes


From: Phil Holmes
Subject: Incipits - not alignment, but help with bug fixes
Date: Fri, 22 Aug 2014 09:26:13 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

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.

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?




reply via email to

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