lilypond-user
[Top][All Lists]
Advanced

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

Re: \mark and slur


From: David Kastrup
Subject: Re: \mark and slur
Date: Sat, 16 Sep 2017 19:05:29 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)

Thomas Morley <address@hidden> 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



reply via email to

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