lilypond-user
[Top][All Lists]
Advanced

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

Re: Combined marks (rehearsal mark, fermata) + break


From: Thomas Morley
Subject: Re: Combined marks (rehearsal mark, fermata) + break
Date: Sat, 14 Nov 2015 00:41:19 +0100

2015-11-13 6:47 GMT+01:00 Jay Anderson <address@hidden>:
> I know I can do this to combine marks:
>
>   \mark \markup { \override #'(baseline-skip . 3) \center-column {
>     \line { \box \bold "P" }
>     \line { \musicglyph #"scripts.ufermata" }
>   } }
>
> This produces a rehearsal mark over a fermata over a bar line. However
> when this occurs at a line break I want the fermata over the barline
> before the break and the rehearsal mark at the beginning of the line
> after the break. Is there a good way to do this currently? (the
> lilypond web site appears unreachable again so I haven't done my
> usually scouring there.)

You could do something at the lines of:

\version "2.19.29"

#(define (combine-marks mrkup)
  (lambda (grob)
    (let* ((default-stencil (ly:grob-property grob 'stencil))
           (mrkp-stencil (grob-interpret-markup grob mrkup))
           (break-dir (ly:item-break-dir grob)))

      (ly:grob-set-property! grob 'stencil
           (case break-dir
            ((0)
             (ly:stencil-combine-at-edge
               (ly:stencil-aligned-to mrkp-stencil X CENTER)
               Y
               UP
               (ly:stencil-aligned-to default-stencil X CENTER)
               1 ;; padding
               ))
            ((1)
             default-stencil)
            ((-1)
             mrkp-stencil))))))

rM =
#(define-music-function (mark mrkp)(ly:music? markup?)
  #{
    \once \override Score.RehearsalMark #'break-visibility = #'#(#t #t #t)
    \once \override Score.RehearsalMark #'before-line-breaking =
      #(combine-marks mrkp)
    $mark
  #})

\relative {
  c'1
  \mark \default
  d
  %\break
  \rM
  \mark \default \markup { \musicglyph #"scripts.ufermata" }
  e
  \mark \default
  f
}

Which will cause different behaviour at line-start/middle/end.
Neil's engraver can't do this, iirc.
Though, with this approach fermatas above _and_ below are not easily settable...

>
> If there's not a good way to do this today, one feature that I think
> would solve this cleanly is adding a fermata barline type. So the
> above would be:
>
> \bar "(|"
> \mark \markup { \box \bold "P" }
>
> Where '(' in the bar means a fermata above the bar. We could include
> "(|", "|)", and "(|)" for fermatas above, below, and above and below
> (and of course variations with different actual bar types). What do
> you think? Is it too strange to put this as part of the bar line?


Adding fermata to a bar-line will display the fermata at the barlines
of every Staff of a StaffGroup.
Not what we would want.

Cheers,
  Harm



reply via email to

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