Hi everybody!

There is a discussion on lilypond-user with the target to allow automated lyric 
extenders
to lilypond. One part of that is a patch to clean and extend lyric_extender.cc.

To allow automated creation of lyric extenders a helper function is needed. 
Putting the
following code into a lilypond score does the job:

#(define autoextenders (define-music-function (lyrics) (ly:music?)
   (music-map
     (lambda (event)
       (if (and (eq? (ly:music-property event 'name) 'LyricEvent)
          (not (let* ((art (ly:music-property event 'articulations))
                      (is-hyphen? (lambda (ev) (eq? (ly:music-property ev 
'name) 'HyphenEvent))))
               (find is-hyphen? art)))
          (not (string=? (ly:music-property event 'text) " ")))
          (ly:music-set-property! event 'articulations
             (append (ly:music-property event 'articulations) (list (make-music 
(quote ExtenderEvent))))) event )
     event)
   lyrics)))

Q1: Where should a definition of \autoextenders reside? scm/music-functions.scm?

Q2: Obviously the definition of \autoextenders does not match the coding style 
used in scm/*. It does not even
work if it is added to music-functions.scm. Some advice is needed ... the 
extending-manual is not a real help in
this case.

Cheers,
 Knut

_______________________________________________
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel

Reply via email to