lilypond-user
[Top][All Lists]
Advanced

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

Re: Overriding tie-configuration & \shape breaks custom Scheme function


From: Malte Meyn
Subject: Re: Overriding tie-configuration & \shape breaks custom Scheme function since 2.19.24
Date: Sun, 10 Jan 2016 09:44:38 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0


Am 10.01.2016 um 02:50 schrieb Peter Crighton:
>                       (if (or (music-is-of-type? mus 'rest-event)
>                               (music-is-of-type? mus 'multi-measure-rest))

The overrides fall into the ‘else’ case and then the tweaks are applied.
I’m not sure why this is changing all of the following note heads (bug?)
but I have a solution for your problem: Just tweak only if there is a
rhythmic-event.

\version "2.19.35"

bgr =
#(define-music-function (music) (ly:music?)
   (music-map
    (lambda (mus)
      (cond
       ((or (music-is-of-type? mus 'rest-event)
            (music-is-of-type? mus 'multi-measure-rest))
        (make-music 'SkipEvent mus))
       ((music-is-of-type? mus 'rhythmic-event)
        #{
          \tweak NoteHead.font-size #-2
          \tweak Accidental.font-size #-2
          #mus
        #})
       (else
        mus)))
    music))

\new Staff <<
  \new Voice <<
    \relative c' {
      <<
        {
          c4 d e f~
          f g a b
        }

        \bgr {
          g a b c~
          \once \override TieColumn.tie-configuration = #'((0 . 1) (0 . -1))
          c d e f
        }
      >>
    }
  >>
>>



reply via email to

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