lilypond-user
[Top][All Lists]
Advanced

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

upgrading a songbook from 2.14 to 2.18


From: Maurits Lamers
Subject: upgrading a songbook from 2.14 to 2.18
Date: Wed, 2 Sep 2020 11:22:19 +0200

Hi all,

In order to have my braille generator not have to support Lilypond 2.14 I tried to upgrade my music library I am building this braille generator on.

However, because of (a lot of) specific "hacks" on the layout, simply running convert-ly on the entire library doesn't completely finish the job.
These overrides use a specific syntax to distinguish between the scheme part and the lilypond part, also inside function definitions.
The following function is an example of this. It is defined as a scheme function, but uses Lilypond syntax inside which is put between #{ and #}.

These kind of definitions seem to cause all kinds of issues. 
One of these issues can be found in a piece of code taken from the lilypond-user mailing list (https://lists.gnu.org/archive/html/lilypond-user/2011-03/msg00270.html) of which I will only include the start:

====

alignGrob =
#(define-music-function (parser location grob-to-align reference-grob dir corr) (string? symbol? integer? number?)
  #{
     \overrideProperty  $grob-to-align #'after-line-breaking
     #(lambda (grob)
        (let* ((sys (ly:grob-system grob))


====

The lambda _expression_ on the fifth line of this definition causes a "warning: ignoring non-musical _expression_".

Another example is in the function below.

====

stanza = #
(define-music-function (parser location str)
  (string?)
  #{ 
    \set stanza = #
     (markup #:stanza-number 
       (string-append $str "")) #})
====

In this function, the line with '\set stanza causes an GUILE error: "unbound variable str" wherever this function is applied.


So, I see two options here: either something changed around the use of the #{ and #} and any embedded scheme between 2.14 and 2.18, or the define-music-function argument list is incorrect. If I remember correctly, the last one only changed between 2.18 and 2.20.
Are there options that I missed?

cheers and thanks in advance!

Maurits


reply via email to

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