Home
Random
Log in
Settings
About LilyPond wiki
LilyPond wiki
Search
Editing
Tremolo slash at the stem midpoint
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
Some editions place the tremolo slash in the middle of the stem, between the notes. Here is a way to achieve that. <lilypond version="2.24"> % Contributed by V.V. on % https://lists.gnu.org/archive/html/lilypond-user-fr/2020-03/msg00091.html slashStemsOn = { \override StemTremolo.stencil = #(lambda (grob) (let* ((dir (ly:grob-property grob 'direction)) (stem (ly:grob-parent grob X)) (stem-stil (ly:stem::print stem)) (stem-Y (ly:stencil-extent stem-stil Y)) (stem-len (- (cdr stem-Y) (car stem-Y)))) (ly:grob-set-property! grob 'beam-width (* 1.33 (ly:stem-tremolo::calc-width grob))) (ly:stencil-translate (ly:stem-tremolo::print grob) (cons (* -.33 dir) (* stem-len -.6 dir))))) } slashStemsOff = { \revert StemTremolo.stencil } { \slashStemsOn \stemUp <c' c''>2:8 <d' d''>: <e' e''>: <f' f''>: <g' g''>: <a' a''>: <b' b''>: <c'' c'''>: \stemDown <c' c''>2:8 <d' d''>: <e' e''>: <f' f''>: <g' g''>: <a' a''>: <b' b''>: <c'' c'''>: \stemUp <c' c'''>2:8 <d' d'''>: <e' e'''>: <f' f'''>: <g' g'''>: <a' a'''>: <b' b'''>: <c'' c''''>: \stemDown <c' c'''>2:8 <d' d'''>: <e' e'''>: <f' f'''>: <g' g'''>: <a' a'''>: <b' b'''>: <c'' c''''>: } </lilypond> [[Category:Rhythms]] [[Category:Tweaks and overrides]] [[Category:Scheme]] [[Category:Snippet]]
Summary:
Please note that all contributions to LilyPond wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Meta:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)