lilypond-user
[Top][All Lists]
Advanced

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

Re: Discern post-event in music function


From: caagr98
Subject: Re: Discern post-event in music function
Date: Thu, 20 Apr 2017 17:25:50 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.0

There's a `post-event?` predicate defined in scm/define-music-display-methods.scm. I don't think that one's easily accessible outside that module, but you can copy it:

(define (post-event? m)
  (music-is-of-type? m 'post-event))


On 04/20/17 16:59, Simon Albrecht wrote:
Hello,

I currently use this implementation of the \after function:

after =
#(define-music-function (t e m) (ly:duration? ly:music? ly:music?)
    #{
      \context Bottom <<
        #m
        { \skip $t <> -\tweak extra-spacing-width #empty-interval $e }
      >>
    #})

Unfortunately, it doesn’t allow using it with e.g. \tempo expressions, since it expects a post-event. So I need the music function to do different things depending on whether the second argument is a post-event or not. How could one implement a ‘post-event?’ predicate?

Best, Simon


_______________________________________________
lilypond-user mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/lilypond-user



reply via email to

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