lilypond-user
[Top][All Lists]
Advanced

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

Re: Incipit troubles in 2.14


From: Stefan Waler
Subject: Re: Incipit troubles in 2.14
Date: Wed, 29 Feb 2012 09:42:37 +0100
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2

Am 28.02.2012 18:44, schrieb James:


http://lists.gnu.org/archive/html/lilypond-user/2012-02/msg00210.html

might be useful.

While I am certainly no expert at this I picked a random .ly file from
the referenced website in the thread and was able to compile this with
2.14.1 - there were some minor syntax issue with the \header block (as
these are actually 2.11.x ly files) but it seems that they produce
incipits but just in a different way.


Sorry, but the example in the thread you reffered to uses an approach for incipits that has some shortcomings and is kind of "out-dated". We have had a lot of discussions about this and finally somebody who I don't remember came up - several years ago - with a much better solution which produced a very smart output.

Now it seems that this does not work anymore in version 2.14. None of my ancient music scores compiles in 2.14.2 at this time.

Is there anybody around who can make a diagnosis why this function does not work anymore?

Is there anybody currently working on support for incipits and/or ancient music in lilypond? As I remember, there were some attempts to develop a sustainable solution?

Thanks!!
Stefan


incipit =
#(define-music-function (parser location incipit-music) (ly:music?)
   #{
     \once \override Staff.InstrumentName #'self-alignment-X = #RIGHT
     \once \override Staff.InstrumentName #'self-alignment-Y = #UP
     \once \override Staff.InstrumentName #'Y-offset = #4
     \once \override Staff.InstrumentName #'padding = #0.3
     \once \override Staff.InstrumentName #'stencil =
     #(lambda (grob)
        (let* ((instrument-name (ly:grob-property grob 'long-text))
               (layout (ly:output-def-clone (ly:grob-layout grob)))
               (music (make-music 'SequentialMusic
                       'elements (list (make-music 'ContextSpeccedMusic
                                         'context-type 'MensuralStaff
                                         'element (make-music 'PropertySet
                                                    'symbol 'instrumentName
'value instrument-name))
                                       $incipit-music)))
               (score (ly:make-score music))
               (mm (ly:output-def-lookup layout 'mm))
               (indent (ly:output-def-lookup layout 'indent))
               (width (ly:output-def-lookup layout 'incipit-width))
               (incipit-width (if (number? width)
                                  (* width mm)
                                  (* indent 0.5))))
          (ly:output-def-set-variable! layout 'indent (- indent
incipit-width))
          (ly:output-def-set-variable! layout 'line-width indent)
          (ly:output-def-set-variable! layout 'ragged-right #f)
          (ly:output-def-set-variable! layout 'ragged-last #f)
          (ly:output-def-set-variable! layout 'system-count 1)
          (ly:score-add-output-def! score layout)
          (set! (ly:grob-property grob 'long-text)
                (markup #:score score))
          (ly:system-start-text::print grob)))
   #})




reply via email to

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