Thomas Morley <[email protected]> writes:
> If I understand correctly, with this patch [issue 5581] things like
> below are now possible:
>
> xxx = c4
> { \xxx -- }
Yes.
> and
>
> foo =
> #(define-music-function (mus)(ly:music?)
> (music-map
> (lambda (m)
> (if (music-is-of-type? m 'note-event)
> #{ $m -. #}
Yes. #m -. should be fine as well.
> m))
> mus)
> #{
> \new ChordNames {
> \tweak self-alignment-X #LEFT
> \mark "This function is a limited demo, don't use it for any
> other stuff."
> }
> $mus
> #})
>
> \foo \new Staff \relative c' { c d e f g a b c }
>
> Which is a big, big goody!
Well, it's mostly convenience that allows using LilyPond syntax instead
of Scheme.
> (3)
> In the light of your explanations above I was afraid the following
> would fail (meaning the displayed expression wouldn't be complete):
Why?
> buzz =
> #(define-music-function (mus)(ly:music?)
> (music-map
> (lambda (m)
> (if (music-is-of-type? m 'note-event)
> (begin
> (display-scheme-music (ly:music-property m 'articulations))
> m)
> m))
> mus)
> #{
> \new ChordNames {
> \tweak self-alignment-X #LEFT
> \mark "This function is a limited demo, don't use it for any
> other stuff."
> }
> $mus
> #})
>
> yyy = c4
>
> \buzz \new Staff { \yyy -\single \dynamicUp \f }
Try { \buzz \yyy -\single \dynamicUp \f } or even { \buzz \yyy \f }
\buzz \yyy will be interpreted _before_ \single \dynamicUp \f is
combined with c4 .
> But as far as I can tell, all works.
No. You just used input where { } could already reattach the
post-events that did not make it at first try.
> So I can live with the problem of
>
> xxx = c4
> { \void \displayLilyMusic \xxx \f }
It's more extensive than that, but the problem can be contained using
sequential music.
--
David Kastrup
_______________________________________________
lilypond-user mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-user