[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Beamed Tremolo + Fermata
From: |
Thomas Morley |
Subject: |
Re: Beamed Tremolo + Fermata |
Date: |
Mon, 28 Dec 2015 23:47:56 +0100 |
2015-12-28 22:41 GMT+01:00 Kieren MacMillan <address@hidden>:
> 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