lilypond-user
[Top][All Lists]
Advanced

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

Re: applyOutput Lyrics.LyricText not working?


From: David Kastrup
Subject: Re: applyOutput Lyrics.LyricText not working?
Date: Sun, 03 Jul 2016 00:19:15 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)

Thomas Morley <address@hidden> writes:

> Hi,
>
> consider the following two snippets:
>
> \version "2.19.44"
>
> \new ChordNames
>   \chordmode {
>    \applyOutput ChordNames.ChordName
>      #(lambda (g ctx p)
>        (write-me "\ng" g)
>        (write-me "ctx" ctx)
>        (write-me "p" p)
>        )
>     c
>   }
>
> \new Lyrics
>   \lyricmode {
>    \applyOutput Lyrics.LyricText
>      #(lambda (g ctx p)
>        (write-me "\ng" g)
>        (write-me "ctx" ctx)
>        (write-me "p" p)
>        )
>     foo
>   }
>
> I get terminal-output as requested from the first example but none
> from the second.
>
> Am I doing something wrong?
> Is there a limitation I'm not aware?
> Or simply a bug?

Well, call it what you want...

\version "2.19.44"

\new ChordNames
  \chordmode {
   \applyOutput ChordNames.ChordName
     #(lambda (g ctx p)
       (write-me "\ng" g)
       (write-me "ctx" ctx)
       (write-me "p" p)
       )
    c
  }

\new Lyrics \with { \consists "Output_property_engraver" }
  \lyricmode {
   \applyOutput Lyrics.LyricText
     #(lambda (g ctx p)
       (write-me "\ng" g)
       (write-me "ctx" ctx)
       (write-me "p" p)
       )
    foo
  }
Two possible ways to fix this:

1) add the Output_property_engraver on all possibly interesting
Bottom(?) contexts
2) Move the Output_property_engraver to Score level only and change it
so that it sends the respective grob starting from the originating
engraver context to the first (all?) context in the parentage of that
context that matches the alias.

The second solution is more work but also more likely to work as
expected without further thinking.

-- 
David Kastrup

reply via email to

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