2015-12-28 22:41 GMT+01:00 Kieren MacMillan <kieren_macmil...@sympatico.ca>:
> Harm,
>
>> How about overriding TupletNumber?
>
> #BOOM or #FTW or whatever the kids would say nowadays.  =)
> Nicely done!
>
> Although it’s a [tiny] pimple on the ‘Pond that these kind of [incredibly 
> elegant] hacks must be done, it’s a [giant] shiny platinum crown on the ‘Pond 
> that it’s so easy.
>
> Best,
> Kieren.


Glad you like it.
Here a little more sophisticated code, with optional setting of
'outside-staff-priority

\version "2.19.32"

%\paper { ragged-right = ##f }

fermataOverTremolo =
#(define-music-function (outside-staff-priority? mus)((boolean? #t) ly:music?)
"Returns @code{fermata} over tremolo-beam.
If the optional @var{outside-staff-priority?} is set @code{#f}, the value of
@code{outside-staff-priority} is disregarded."
(if (eq? (ly:music-property mus 'name) 'TremoloRepeatedMusic)
    #{
      \once \omit TupletBracket
      %% maybe add this?
      #(if outside-staff-priority?
           #{ \once \override TupletNumber.outside-staff-priority = 100 #})
      \once \override TupletNumber.text =
      #(lambda (grob)
        (let ((dir (ly:grob-property grob 'direction)))
          (markup
            #:musicglyph
            (format #f "scripts.~afermata" (if (= dir 1) "u" "d")))))
      \times 1/1
      $mus
    #}
    mus))

\relative c''
{
  %\voiceOne
  %\voiceTwo
  \fermataOverTremolo
    \repeat tremolo 16 { c32 a }
  \fermataOverTremolo ##f
    \repeat tremolo 16 { c32 a }
}

Though, we don't do all nicely with tremolo. Look at the terrible output from:

\repeat tremolo 16 { c''32 ais' }

https://sourceforge.net/p/testlilyissues/issues/3143/

Cheers,
  Harm

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

Reply via email to