<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.lilypond.community/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Lemzwerg</id>
	<title>LilyPond wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.lilypond.community/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Lemzwerg"/>
	<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/wiki/Special:Contributions/Lemzwerg"/>
	<updated>2026-06-16T06:24:43Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.44.2</generator>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=Talk:SemiChoirStaff_is_a_ChoirStaff_with_SpanBars_for_special_bar_lines&amp;diff=6572</id>
		<title>Talk:SemiChoirStaff is a ChoirStaff with SpanBars for special bar lines</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=Talk:SemiChoirStaff_is_a_ChoirStaff_with_SpanBars_for_special_bar_lines&amp;diff=6572"/>
		<updated>2026-05-25T19:54:54Z</updated>

		<summary type="html">&lt;p&gt;Lemzwerg: /* Title Change */ Reply&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Title Change ==&lt;br /&gt;
&lt;br /&gt;
I believe that “non-” in the current page title is a typo; the title should instead read “… with SpanBars for special bar lines.” @[[User:Lemzwerg|Lemzwerg]] [[User:Gabriel Ellsworth|Gabriel Ellsworth]] ([[User talk:Gabriel Ellsworth|talk]]) 18:39, 25 May 2026 (UTC)&lt;br /&gt;
&lt;br /&gt;
:Agreed – and moved -- [[User:Lemzwerg|Lemzwerg]] ([[User talk:Lemzwerg|talk]]) 19:54, 25 May 2026 (UTC)&lt;/div&gt;</summary>
		<author><name>Lemzwerg</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=LSR_299&amp;diff=6571</id>
		<title>LSR 299</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=LSR_299&amp;diff=6571"/>
		<updated>2026-05-25T19:54:24Z</updated>

		<summary type="html">&lt;p&gt;Lemzwerg: Changed redirect target from SemiChoirStaff is a ChoirStaff with SpanBars for non-special bar lines to SemiChoirStaff is a ChoirStaff with SpanBars for special bar lines&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[SemiChoirStaff is a ChoirStaff with SpanBars for special bar lines]]&lt;/div&gt;</summary>
		<author><name>Lemzwerg</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=Talk:SemiChoirStaff_is_a_ChoirStaff_with_SpanBars_for_special_bar_lines&amp;diff=6570</id>
		<title>Talk:SemiChoirStaff is a ChoirStaff with SpanBars for special bar lines</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=Talk:SemiChoirStaff_is_a_ChoirStaff_with_SpanBars_for_special_bar_lines&amp;diff=6570"/>
		<updated>2026-05-25T19:54:04Z</updated>

		<summary type="html">&lt;p&gt;Lemzwerg: Lemzwerg moved page Talk:SemiChoirStaff is a ChoirStaff with SpanBars for non-special bar lines to Talk:SemiChoirStaff is a ChoirStaff with SpanBars for special bar lines without leaving a redirect&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Title Change ==&lt;br /&gt;
&lt;br /&gt;
I believe that “non-” in the current page title is a typo; the title should instead read “… with SpanBars for special bar lines.” @[[User:Lemzwerg|Lemzwerg]] [[User:Gabriel Ellsworth|Gabriel Ellsworth]] ([[User talk:Gabriel Ellsworth|talk]]) 18:39, 25 May 2026 (UTC)&lt;/div&gt;</summary>
		<author><name>Lemzwerg</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=SemiChoirStaff_is_a_ChoirStaff_with_SpanBars_for_special_bar_lines&amp;diff=6569</id>
		<title>SemiChoirStaff is a ChoirStaff with SpanBars for special bar lines</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=SemiChoirStaff_is_a_ChoirStaff_with_SpanBars_for_special_bar_lines&amp;diff=6569"/>
		<updated>2026-05-25T19:54:04Z</updated>

		<summary type="html">&lt;p&gt;Lemzwerg: Lemzwerg moved page SemiChoirStaff is a ChoirStaff with SpanBars for non-special bar lines to SemiChoirStaff is a ChoirStaff with SpanBars for special bar lines without leaving a redirect&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;If you wish to typeset &amp;lt;code&amp;gt;|.&amp;lt;/code&amp;gt; and friends as connected in a &amp;lt;code&amp;gt;ChoirStaff&amp;lt;/code&amp;gt; while ordinary bar lines stay unconnected, you can add the &amp;lt;code&amp;gt;Span_bar_engraver&amp;lt;/code&amp;gt; and instruct it to omit the &amp;lt;code&amp;gt;|&amp;lt;/code&amp;gt;-style bars.&lt;br /&gt;
&lt;br /&gt;
In this example a new context, &amp;lt;code&amp;gt;SemiChoirStaff&amp;lt;/code&amp;gt;, is created to achieve this.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lilypond version=&amp;quot;2.24&amp;quot;&amp;gt;&lt;br /&gt;
mus = {&lt;br /&gt;
  \clef F&lt;br /&gt;
  c4 d e f | c d e f \bar &amp;quot;||&amp;quot;&lt;br /&gt;
  c4 d e f | c d e f \bar &amp;quot;|.&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
\layout {&lt;br /&gt;
  \context {&lt;br /&gt;
    \ChoirStaff&lt;br /&gt;
    \name &amp;quot;SemiChoirStaff&amp;quot;&lt;br /&gt;
    \consists &amp;quot;Span_bar_engraver&amp;quot;&lt;br /&gt;
    \override SpanBar.stencil =&lt;br /&gt;
      #(lambda (grob)&lt;br /&gt;
        (if (string=? (ly:grob-property grob &#039;glyph-name) &amp;quot;|&amp;quot;)&lt;br /&gt;
            (set! (ly:grob-property grob &#039;glyph-name) &amp;quot;&amp;quot;))&lt;br /&gt;
        (ly:span-bar::print grob))&lt;br /&gt;
  }&lt;br /&gt;
  \context {&lt;br /&gt;
    \Score&lt;br /&gt;
    \accepts SemiChoirStaff&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
\score {&lt;br /&gt;
  \new SemiChoirStaff {&lt;br /&gt;
    &amp;lt;&amp;lt;&lt;br /&gt;
      \new Staff \mus&lt;br /&gt;
      \new Staff \mus&lt;br /&gt;
    &amp;gt;&amp;gt;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lilypond&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Contexts and engravers]]&lt;br /&gt;
[[Category:Scheme]]&lt;br /&gt;
[[Category:Workaround]]&lt;br /&gt;
[[Category:Snippet]]&lt;/div&gt;</summary>
		<author><name>Lemzwerg</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=Magnetic_lyrics:_snap_syllables_together_if_the_hyphen_inbetween_is_too_short&amp;diff=6566</id>
		<title>Magnetic lyrics: snap syllables together if the hyphen inbetween is too short</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=Magnetic_lyrics:_snap_syllables_together_if_the_hyphen_inbetween_is_too_short&amp;diff=6566"/>
		<updated>2026-05-19T05:11:08Z</updated>

		<summary type="html">&lt;p&gt;Lemzwerg: Make it an official snippet&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The current code that LilyPond uses to handle lyric hyphens (i.e., &amp;lt;code&amp;gt;LyricHyphen&amp;lt;/code&amp;gt; grobs) often leads to very short hyphens or even small gaps between syllables with no hyphen visible. This snippet merges adjacent syllables into one string in such cases, also taking care of ligatures as if the string was not hyphenated.&lt;br /&gt;
&lt;br /&gt;
It supersedes previous implementations of “magnetic snap” engravers that were in circulation via the lilypond-user mailing list.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lilypond version=&amp;quot;2.24&amp;quot;&amp;gt;&lt;br /&gt;
% magnetic-lyrics.ily&lt;br /&gt;
%&lt;br /&gt;
%   written by&lt;br /&gt;
%     Jean Abou Samra &amp;lt;jean@abou-samra.fr&amp;gt;&lt;br /&gt;
%     Werner Lemberg &amp;lt;wl@gnu.org&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#(define (Left_hyphen_pointer_engraver context)&lt;br /&gt;
   &amp;quot;Collect syllable-hyphen-syllable occurrences in lyrics and store&lt;br /&gt;
them in properties.  This engraver only looks to the left.  For&lt;br /&gt;
example, if the lyrics input is &#039;foo -- bar&#039;, it does the&lt;br /&gt;
following.&lt;br /&gt;
&lt;br /&gt;
* Set the `text` property of the `LyricHyphen` grob between &#039;foo&#039; and&lt;br /&gt;
  &#039;bar&#039; to &#039;foo&#039;.&lt;br /&gt;
&lt;br /&gt;
* Set the `left-hyphen` property of the `LyricText` grob with text&lt;br /&gt;
  &#039;foo&#039; to the `LyricHyphen` grob between &#039;foo&#039; and &#039;bar&#039;.&lt;br /&gt;
&lt;br /&gt;
Use this auxiliary engraver in combination with the&lt;br /&gt;
`lyric-text::apply-magnetic-offset!` hook.&amp;quot;&lt;br /&gt;
   (let ((hyphen #f)&lt;br /&gt;
         (text #f))&lt;br /&gt;
     (make-engraver&lt;br /&gt;
      (acknowledgers&lt;br /&gt;
       ((lyric-syllable-interface engraver grob source-engraver)&lt;br /&gt;
        (set! text grob)))&lt;br /&gt;
      (end-acknowledgers&lt;br /&gt;
       ((lyric-hyphen-interface engraver grob source-engraver)&lt;br /&gt;
        (when (not (grob::has-interface grob &#039;lyric-space-interface))&lt;br /&gt;
          (set! hyphen grob))))&lt;br /&gt;
      ((stop-translation-timestep engraver)&lt;br /&gt;
       (when (and text hyphen)&lt;br /&gt;
         (ly:grob-set-object! text &#039;left-hyphen hyphen))&lt;br /&gt;
       (set! text #f)&lt;br /&gt;
       (set! hyphen #f)))))&lt;br /&gt;
&lt;br /&gt;
#(define (lyric-text::apply-magnetic-offset! grob)&lt;br /&gt;
   &amp;quot;If the space between two syllables is less than the value in&lt;br /&gt;
property `LyricText.details.squash-threshold`, move the right syllable&lt;br /&gt;
to the left so that it gets concatenated with the left syllable.&lt;br /&gt;
&lt;br /&gt;
Use this function as a hook for `LyricText.after-line-breaking` if the&lt;br /&gt;
`Left_hyphen_pointer_engraver} is active.&amp;quot;&lt;br /&gt;
   (let ((hyphen (ly:grob-object grob &#039;left-hyphen #f)))&lt;br /&gt;
     (when hyphen&lt;br /&gt;
       (let ((left-text (ly:spanner-bound hyphen LEFT)))&lt;br /&gt;
         (when (grob::has-interface left-text &#039;lyric-syllable-interface)&lt;br /&gt;
           (let* ((common (ly:grob-common-refpoint grob left-text X))&lt;br /&gt;
                  (this-x-ext (ly:grob-extent grob common X))&lt;br /&gt;
                  (left-x-ext&lt;br /&gt;
                   (begin&lt;br /&gt;
                     ;; Trigger magnetism for left-text.&lt;br /&gt;
                     (ly:grob-property left-text &#039;after-line-breaking)&lt;br /&gt;
                     (ly:grob-extent left-text common X)))&lt;br /&gt;
                  ;; `delta` is the gap width between two syllables.&lt;br /&gt;
                  (delta (- (interval-start this-x-ext)&lt;br /&gt;
                            (interval-end left-x-ext)))&lt;br /&gt;
                  (details (ly:grob-property grob &#039;details))&lt;br /&gt;
                  (threshold (assoc-get &#039;squash-threshold details 0.2)))&lt;br /&gt;
             (when (&amp;lt; delta threshold)&lt;br /&gt;
               (let* (;; We have to manipulate the input text so that&lt;br /&gt;
                      ;; ligatures crossing syllable boundaries are not&lt;br /&gt;
                      ;; disabled.  For languages based on the Latin&lt;br /&gt;
                      ;; script this is essentially a beautification.&lt;br /&gt;
                      ;; However, for non-Western scripts it can be a&lt;br /&gt;
                      ;; necessity.&lt;br /&gt;
                      (lt (ly:grob-property left-text &#039;text))&lt;br /&gt;
                      (rt (ly:grob-property grob &#039;text))&lt;br /&gt;
                      ;; Append new syllable.&lt;br /&gt;
                      (ltrt (if (and (string? lt) (string? rt))&lt;br /&gt;
                                (string-append lt rt)&lt;br /&gt;
                                (make-concat-markup (list lt rt))))&lt;br /&gt;
                      ;; Right-align `ltrt` to the right side.&lt;br /&gt;
                      (markup (grob-interpret-markup&lt;br /&gt;
                               grob&lt;br /&gt;
                               (make-translate-markup&lt;br /&gt;
                                (cons (interval-length this-x-ext) 0)&lt;br /&gt;
                                (make-right-align-markup ltrt)))))&lt;br /&gt;
                 ;; Don&#039;t print `left-text`.&lt;br /&gt;
                 (ly:grob-set-property! left-text &#039;stencil #f)&lt;br /&gt;
                 ;; Set text and stencil (which holds all collected&lt;br /&gt;
                 ;; syllables so far) and shift it to the left.&lt;br /&gt;
                 (ly:grob-set-property! grob &#039;text ltrt)&lt;br /&gt;
                 (ly:grob-set-property! grob &#039;stencil markup)&lt;br /&gt;
                 (ly:grob-translate-axis! grob (- delta) X)))))))))&lt;br /&gt;
&lt;br /&gt;
#(define (lyric-hyphen::displace-bounds-first grob)&lt;br /&gt;
   ;; Make very sure this callback isn&#039;t triggered too early.&lt;br /&gt;
   (let ((left (ly:spanner-bound grob LEFT))&lt;br /&gt;
         (right (ly:spanner-bound grob RIGHT)))&lt;br /&gt;
     (ly:grob-property left &#039;after-line-breaking)&lt;br /&gt;
     (ly:grob-property right &#039;after-line-breaking)&lt;br /&gt;
     (ly:lyric-hyphen::print grob)))&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
%% demonstration&lt;br /&gt;
&lt;br /&gt;
music = {&lt;br /&gt;
  &amp;lt;&amp;lt;&lt;br /&gt;
    { d&#039;4 4 4 4 |&lt;br /&gt;
      r4 4 4 4 }&lt;br /&gt;
    \addlyrics { suf -- fice  baff -- ling&lt;br /&gt;
                 car -- fuff -- ling }&lt;br /&gt;
  &amp;gt;&amp;gt;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
\markup &amp;quot;Without magnetic lyrics:&amp;quot;&lt;br /&gt;
&lt;br /&gt;
\score {&lt;br /&gt;
  \music&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
\markup &amp;quot;With magnetic lyrics:&amp;quot;&lt;br /&gt;
&lt;br /&gt;
\score {&lt;br /&gt;
  \music&lt;br /&gt;
&lt;br /&gt;
  \layout {&lt;br /&gt;
    \context {&lt;br /&gt;
      \Lyrics&lt;br /&gt;
      \consists #Left_hyphen_pointer_engraver&lt;br /&gt;
      \override LyricText.after-line-breaking =&lt;br /&gt;
        #lyric-text::apply-magnetic-offset!&lt;br /&gt;
      \override LyricHyphen.stencil =&lt;br /&gt;
        #lyric-hyphen::displace-bounds-first&lt;br /&gt;
      \override LyricText.details.squash-threshold = 0.4&lt;br /&gt;
      \override LyricHyphen.minimum-distance = 0&lt;br /&gt;
      \override LyricHyphen.minimum-length = 0.4&lt;br /&gt;
      \override LyricSpace.minimum-distance = 1&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
\paper {&lt;br /&gt;
  line-width = 83\mm&lt;br /&gt;
  ragged-last = ##f&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lilypond&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Vocal music]]&lt;br /&gt;
[[Category:Spacing]]&lt;br /&gt;
[[Category:Included in the official documentation]]&lt;br /&gt;
[[Category:Snippet]]&lt;/div&gt;</summary>
		<author><name>Lemzwerg</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=Magnetic_lyrics:_snap_syllables_together_if_the_hyphen_inbetween_is_too_short&amp;diff=6565</id>
		<title>Magnetic lyrics: snap syllables together if the hyphen inbetween is too short</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=Magnetic_lyrics:_snap_syllables_together_if_the_hyphen_inbetween_is_too_short&amp;diff=6565"/>
		<updated>2026-05-19T05:07:31Z</updated>

		<summary type="html">&lt;p&gt;Lemzwerg: Don&amp;#039;t use Texinfo markup in documentation strings&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The current code that LilyPond uses to handle lyric hyphens (i.e., &amp;lt;code&amp;gt;LyricHyphen&amp;lt;/code&amp;gt; grobs) often leads to very short hyphens or even small gaps between syllables with no hyphen visible. This snippet merges adjacent syllables into one string in such cases, also taking care of ligatures as if the string was not hyphenated.&lt;br /&gt;
&lt;br /&gt;
It supersedes previous implementations of “magnetic snap” engravers that were in circulation via the lilypond-user mailing list.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lilypond version=&amp;quot;2.24&amp;quot;&amp;gt;&lt;br /&gt;
% magnetic-lyrics.ily&lt;br /&gt;
%&lt;br /&gt;
%   written by&lt;br /&gt;
%     Jean Abou Samra &amp;lt;jean@abou-samra.fr&amp;gt;&lt;br /&gt;
%     Werner Lemberg &amp;lt;wl@gnu.org&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#(define (Left_hyphen_pointer_engraver context)&lt;br /&gt;
   &amp;quot;Collect syllable-hyphen-syllable occurrences in lyrics and store&lt;br /&gt;
them in properties.  This engraver only looks to the left.  For&lt;br /&gt;
example, if the lyrics input is &#039;foo -- bar&#039;, it does the&lt;br /&gt;
following.&lt;br /&gt;
&lt;br /&gt;
* Set the `text` property of the `LyricHyphen` grob between &#039;foo&#039; and&lt;br /&gt;
  &#039;bar&#039; to &#039;foo&#039;.&lt;br /&gt;
&lt;br /&gt;
* Set the `left-hyphen` property of the `LyricText` grob with text&lt;br /&gt;
  &#039;foo&#039; to the `LyricHyphen` grob between &#039;foo&#039; and &#039;bar&#039;.&lt;br /&gt;
&lt;br /&gt;
Use this auxiliary engraver in combination with the&lt;br /&gt;
`lyric-text::apply-magnetic-offset!` hook.&amp;quot;&lt;br /&gt;
   (let ((hyphen #f)&lt;br /&gt;
         (text #f))&lt;br /&gt;
     (make-engraver&lt;br /&gt;
      (acknowledgers&lt;br /&gt;
       ((lyric-syllable-interface engraver grob source-engraver)&lt;br /&gt;
        (set! text grob)))&lt;br /&gt;
      (end-acknowledgers&lt;br /&gt;
       ((lyric-hyphen-interface engraver grob source-engraver)&lt;br /&gt;
        (when (not (grob::has-interface grob &#039;lyric-space-interface))&lt;br /&gt;
          (set! hyphen grob))))&lt;br /&gt;
      ((stop-translation-timestep engraver)&lt;br /&gt;
       (when (and text hyphen)&lt;br /&gt;
         (ly:grob-set-object! text &#039;left-hyphen hyphen))&lt;br /&gt;
       (set! text #f)&lt;br /&gt;
       (set! hyphen #f)))))&lt;br /&gt;
&lt;br /&gt;
#(define (lyric-text::apply-magnetic-offset! grob)&lt;br /&gt;
   &amp;quot;If the space between two syllables is less than the value in&lt;br /&gt;
property `LyricText.details.squash-threshold`, move the right syllable&lt;br /&gt;
to the left so that it gets concatenated with the left syllable.&lt;br /&gt;
&lt;br /&gt;
Use this function as a hook for `LyricText.after-line-breaking` if the&lt;br /&gt;
`Left_hyphen_pointer_engraver} is active.&amp;quot;&lt;br /&gt;
   (let ((hyphen (ly:grob-object grob &#039;left-hyphen #f)))&lt;br /&gt;
     (when hyphen&lt;br /&gt;
       (let ((left-text (ly:spanner-bound hyphen LEFT)))&lt;br /&gt;
         (when (grob::has-interface left-text &#039;lyric-syllable-interface)&lt;br /&gt;
           (let* ((common (ly:grob-common-refpoint grob left-text X))&lt;br /&gt;
                  (this-x-ext (ly:grob-extent grob common X))&lt;br /&gt;
                  (left-x-ext&lt;br /&gt;
                   (begin&lt;br /&gt;
                     ;; Trigger magnetism for left-text.&lt;br /&gt;
                     (ly:grob-property left-text &#039;after-line-breaking)&lt;br /&gt;
                     (ly:grob-extent left-text common X)))&lt;br /&gt;
                  ;; `delta` is the gap width between two syllables.&lt;br /&gt;
                  (delta (- (interval-start this-x-ext)&lt;br /&gt;
                            (interval-end left-x-ext)))&lt;br /&gt;
                  (details (ly:grob-property grob &#039;details))&lt;br /&gt;
                  (threshold (assoc-get &#039;squash-threshold details 0.2)))&lt;br /&gt;
             (when (&amp;lt; delta threshold)&lt;br /&gt;
               (let* (;; We have to manipulate the input text so that&lt;br /&gt;
                      ;; ligatures crossing syllable boundaries are not&lt;br /&gt;
                      ;; disabled.  For languages based on the Latin&lt;br /&gt;
                      ;; script this is essentially a beautification.&lt;br /&gt;
                      ;; However, for non-Western scripts it can be a&lt;br /&gt;
                      ;; necessity.&lt;br /&gt;
                      (lt (ly:grob-property left-text &#039;text))&lt;br /&gt;
                      (rt (ly:grob-property grob &#039;text))&lt;br /&gt;
                      ;; Append new syllable.&lt;br /&gt;
                      (ltrt (if (and (string? lt) (string? rt))&lt;br /&gt;
                                (string-append lt rt)&lt;br /&gt;
                                (make-concat-markup (list lt rt))))&lt;br /&gt;
                      ;; Right-align `ltrt` to the right side.&lt;br /&gt;
                      (markup (grob-interpret-markup&lt;br /&gt;
                               grob&lt;br /&gt;
                               (make-translate-markup&lt;br /&gt;
                                (cons (interval-length this-x-ext) 0)&lt;br /&gt;
                                (make-right-align-markup ltrt)))))&lt;br /&gt;
                 ;; Don&#039;t print `left-text`.&lt;br /&gt;
                 (ly:grob-set-property! left-text &#039;stencil #f)&lt;br /&gt;
                 ;; Set text and stencil (which holds all collected&lt;br /&gt;
                 ;; syllables so far) and shift it to the left.&lt;br /&gt;
                 (ly:grob-set-property! grob &#039;text ltrt)&lt;br /&gt;
                 (ly:grob-set-property! grob &#039;stencil markup)&lt;br /&gt;
                 (ly:grob-translate-axis! grob (- delta) X)))))))))&lt;br /&gt;
&lt;br /&gt;
#(define (lyric-hyphen::displace-bounds-first grob)&lt;br /&gt;
   ;; Make very sure this callback isn&#039;t triggered too early.&lt;br /&gt;
   (let ((left (ly:spanner-bound grob LEFT))&lt;br /&gt;
         (right (ly:spanner-bound grob RIGHT)))&lt;br /&gt;
     (ly:grob-property left &#039;after-line-breaking)&lt;br /&gt;
     (ly:grob-property right &#039;after-line-breaking)&lt;br /&gt;
     (ly:lyric-hyphen::print grob)))&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
%% demonstration&lt;br /&gt;
&lt;br /&gt;
music = {&lt;br /&gt;
  &amp;lt;&amp;lt;&lt;br /&gt;
    { d&#039;4 4 4 4 |&lt;br /&gt;
      r4 4 4 4 }&lt;br /&gt;
    \addlyrics { suf -- fice  baff -- ling&lt;br /&gt;
                 car -- fuff -- ling }&lt;br /&gt;
  &amp;gt;&amp;gt;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
\markup &amp;quot;Without magnetic lyrics:&amp;quot;&lt;br /&gt;
&lt;br /&gt;
\score {&lt;br /&gt;
  \music&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
\markup &amp;quot;With magnetic lyrics:&amp;quot;&lt;br /&gt;
&lt;br /&gt;
\score {&lt;br /&gt;
  \music&lt;br /&gt;
&lt;br /&gt;
  \layout {&lt;br /&gt;
    \context {&lt;br /&gt;
      \Lyrics&lt;br /&gt;
      \consists #Left_hyphen_pointer_engraver&lt;br /&gt;
      \override LyricText.after-line-breaking =&lt;br /&gt;
        #lyric-text::apply-magnetic-offset!&lt;br /&gt;
      \override LyricHyphen.stencil =&lt;br /&gt;
        #lyric-hyphen::displace-bounds-first&lt;br /&gt;
      \override LyricText.details.squash-threshold = 0.4&lt;br /&gt;
      \override LyricHyphen.minimum-distance = 0&lt;br /&gt;
      \override LyricHyphen.minimum-length = 0.4&lt;br /&gt;
      \override LyricSpace.minimum-distance = 1&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
\paper {&lt;br /&gt;
  line-width = 83\mm&lt;br /&gt;
  ragged-last = ##f&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lilypond&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Vocal music]]&lt;br /&gt;
[[Category:Spacing]]&lt;br /&gt;
[[Category:Snippet]]&lt;/div&gt;</summary>
		<author><name>Lemzwerg</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=User_talk:Ksnortum&amp;diff=6564</id>
		<title>User talk:Ksnortum</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=User_talk:Ksnortum&amp;diff=6564"/>
		<updated>2026-05-18T04:40:52Z</updated>

		<summary type="html">&lt;p&gt;Lemzwerg: /* Templates for convert-ly */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Please be careful while using &#039;Edit&#039; ==&lt;br /&gt;
&lt;br /&gt;
Hello Knute!  There is currently a bug in the &#039;Edit&#039; mode: If you only change some details in the description (i.e., not touching the LilyPond code), the &amp;lt;code&amp;gt;&amp;lt;lilypond&amp;gt;&amp;lt;/code&amp;gt; block gets ‘destroyed’ and is no longer rendered as an image.  Please use &#039;Edit source&#039; instead for the time being to avoid that. -- [[User:Lemzwerg|Lemzwerg]] ([[User talk:Lemzwerg|talk]]) 17:26, 8 April 2026 (UTC)&lt;br /&gt;
&lt;br /&gt;
:Got it, thanks. [[User:Ksnortum|Ksnortum]] ([[User talk:Ksnortum|talk]]) 19:34, 8 April 2026 (UTC)&lt;br /&gt;
:...and thanks for cleaning up the mess! [[User:Ksnortum|Ksnortum]] ([[User talk:Ksnortum|talk]]) 14:58, 10 April 2026 (UTC)&lt;br /&gt;
::You&#039;re welcome! -- [[User:Lemzwerg|Lemzwerg]] ([[User talk:Lemzwerg|talk]]) 15:44, 10 April 2026 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Templates for convert-ly ==&lt;br /&gt;
&lt;br /&gt;
I noticed that there are templates for convert-ly-stable (pointing to 2.24) and convery-ly-devel (pointing to 2.25).  Should these be changed to 2.26 and 2.27 respectively?  The template for convert-ly-devel is only used in a handful of places and convert-ly-stable doesn&#039;t look like it&#039;s used at all. --[[User:Ksnortum|Ksnortum]] ([[User talk:Ksnortum|talk]]) 19:05, 17 May 2026 (UTC)&lt;br /&gt;
&lt;br /&gt;
: In the long run, yes.  I suggest we wait for 2.26.1, then the transition to 2.26 could start in the Wiki for all snippets. -- [[User:Lemzwerg|Lemzwerg]] ([[User talk:Lemzwerg|talk]]) 04:40, 18 May 2026 (UTC)&lt;/div&gt;</summary>
		<author><name>Lemzwerg</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=Time_signature_with_alternate_in_parentheses&amp;diff=6541</id>
		<title>Time signature with alternate in parentheses</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=Time_signature_with_alternate_in_parentheses&amp;diff=6541"/>
		<updated>2026-04-15T04:35:44Z</updated>

		<summary type="html">&lt;p&gt;Lemzwerg: Aaand another improvement.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In polymetric music, a composer may indicate beat structure by following one time signature with another in parenthesis, for example, ‘3/4 (6/8)’ indicating a 6/8 beat in a 3/4 measure, or ‘6/4 (6/8)’ indicating a 6/8 beat in a 6/4 measure.&lt;br /&gt;
&lt;br /&gt;
This snippet provides a music function &amp;lt;code&amp;gt;\timeP&amp;lt;/code&amp;gt; that is a small Scheme wrapper around the &amp;lt;code&amp;gt;\compound-meter&amp;lt;/code&amp;gt; markup function.  It overrides the &amp;lt;code&amp;gt;TimeSignature&amp;lt;/code&amp;gt; stencil once to display both a regular and an alternate time signature.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lilypond version=&amp;quot;2.24&amp;quot;&amp;gt;&lt;br /&gt;
timeP =&lt;br /&gt;
#(define-music-function (t tp) (list? list?)&lt;br /&gt;
   (define ((time-parenthesized-time t tp) grob)&lt;br /&gt;
     (let ((m1 (grob-interpret-markup&lt;br /&gt;
                grob (markup #:compound-meter t)))&lt;br /&gt;
           (m2 (grob-interpret-markup&lt;br /&gt;
                grob (markup #:compound-meter tp))))&lt;br /&gt;
       (ly:stencil-combine-at-edge&lt;br /&gt;
        m1 X RIGHT&lt;br /&gt;
        (parenthesize-stencil m2 0.1 0.4 0.4 0.1)&lt;br /&gt;
        0.3)))&lt;br /&gt;
   #{&lt;br /&gt;
     \once \override Timing.TimeSignature.stencil =&lt;br /&gt;
       #(time-parenthesized-time t tp)&lt;br /&gt;
   #})&lt;br /&gt;
&lt;br /&gt;
\relative c&#039; {&lt;br /&gt;
  \timeP #&#039;(3 4) #&#039;(6 8) \time 3/4&lt;br /&gt;
    b8 b8 gis8 gis4 gis8 |&lt;br /&gt;
  \timeP #&#039;(4 4) #&#039;(3 2 3 8) \time 4/4&lt;br /&gt;
    b4. b4 b4.&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lilypond&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Rhythms]]&lt;br /&gt;
[[Category:Scheme]]&lt;br /&gt;
[[Category:Snippet]]&lt;/div&gt;</summary>
		<author><name>Lemzwerg</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=Time_signature_with_alternate_in_parentheses&amp;diff=6540</id>
		<title>Time signature with alternate in parentheses</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=Time_signature_with_alternate_in_parentheses&amp;diff=6540"/>
		<updated>2026-04-15T04:10:29Z</updated>

		<summary type="html">&lt;p&gt;Lemzwerg: Improve more.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In polymetric music, a composer may indicate beat structure by following one time signature with another in parenthesis, for example, ‘3/4 (6/8)’ indicating a 6/8 beat in a 3/4 measure, or ‘6/4 (6/8)’ indicating a 6/8 beat in a 6/4 measure.&lt;br /&gt;
&lt;br /&gt;
This snippet provides a small Scheme wrapper around the &amp;lt;code&amp;gt;\compound-meter&amp;lt;/code&amp;gt; markup function that can be used to override the &amp;lt;code&amp;gt;TimeSignature&amp;lt;/code&amp;gt; stencil, displaying both a regular and an alternate time signature.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lilypond version=&amp;quot;2.24&amp;quot;&amp;gt;&lt;br /&gt;
#(define ((time-parenthesized-time t tp) grob)&lt;br /&gt;
   (let ((m1 (grob-interpret-markup&lt;br /&gt;
              grob (markup #:compound-meter t)))&lt;br /&gt;
         (m2 (grob-interpret-markup&lt;br /&gt;
              grob (markup #:compound-meter tp))))&lt;br /&gt;
     (ly:stencil-combine-at-edge&lt;br /&gt;
      m1 X RIGHT&lt;br /&gt;
      (parenthesize-stencil m2 0.1 0.4 0.4 0.1)&lt;br /&gt;
      0.3)))&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
\relative c&#039; {&lt;br /&gt;
  \once \override Staff.TimeSignature.stencil =&lt;br /&gt;
    #(time-parenthesized-time &#039;(3 4) &#039;(6 8))&lt;br /&gt;
  \time 3/4 b8 b8 gis8 gis4 gis8 |&lt;br /&gt;
  \once \override Staff.TimeSignature.stencil =&lt;br /&gt;
    #(time-parenthesized-time &#039;(4 4) &#039;(3 2 3 8))&lt;br /&gt;
  \time 4/4 b4. b4 b4.&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lilypond&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Rhythms]]&lt;br /&gt;
[[Category:Scheme]]&lt;br /&gt;
[[Category:Snippet]]&lt;/div&gt;</summary>
		<author><name>Lemzwerg</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=Time_signature_with_alternate_in_parentheses&amp;diff=6539</id>
		<title>Time signature with alternate in parentheses</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=Time_signature_with_alternate_in_parentheses&amp;diff=6539"/>
		<updated>2026-04-14T20:42:54Z</updated>

		<summary type="html">&lt;p&gt;Lemzwerg: Improved&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In polymetric music, a composer may indicate beat structure by following one time signature with another in parenthesis, for example: 3/4 (6/8) indicating a 6/8 beat in a 3/4 measure, or 6/4 (6/8) indicating a 6/8 beat in a 6/4 measure.&lt;br /&gt;
&lt;br /&gt;
This snippet uses a small Scheme function that overrides the &amp;lt;code&amp;gt;TimeSignature&amp;lt;/code&amp;gt; stencil once to display both the regular and the alternate time signature.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lilypond version=&amp;quot;2.24&amp;quot;&amp;gt;&lt;br /&gt;
#(define ((time-parenthesized-time up down upp downp) grob)&lt;br /&gt;
   (let ((m1 (grob-interpret-markup&lt;br /&gt;
              grob&lt;br /&gt;
              (markup #:override &#039;(baseline-skip . 0)&lt;br /&gt;
                      #:number (#:center-column&lt;br /&gt;
                                ((number-&amp;gt;string up)&lt;br /&gt;
                                 (number-&amp;gt;string down))))))&lt;br /&gt;
         (m2 (grob-interpret-markup&lt;br /&gt;
              grob&lt;br /&gt;
              (markup #:override &#039;(baseline-skip . 0)&lt;br /&gt;
                      #:number (#:center-column&lt;br /&gt;
                                ((number-&amp;gt;string upp)&lt;br /&gt;
                                 (number-&amp;gt;string downp)))))))&lt;br /&gt;
     (ly:stencil-combine-at-edge&lt;br /&gt;
      m1 X RIGHT&lt;br /&gt;
      (parenthesize-stencil m2 0.1 0.4 0.4 0.1)&lt;br /&gt;
      0.3)))&lt;br /&gt;
&lt;br /&gt;
\relative c&#039; {&lt;br /&gt;
  \once \override Staff.TimeSignature.stencil =&lt;br /&gt;
    #(time-parenthesized-time 3 4 6 8)&lt;br /&gt;
  \time 3/4 b8 b8 gis8 gis4 gis8 |&lt;br /&gt;
  \time 4/4 b4 b b b&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lilypond&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Rhythms]]&lt;br /&gt;
[[Category:Scheme]]&lt;br /&gt;
[[Category:Snippet]]&lt;/div&gt;</summary>
		<author><name>Lemzwerg</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=User_talk:Ksnortum&amp;diff=6537</id>
		<title>User talk:Ksnortum</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=User_talk:Ksnortum&amp;diff=6537"/>
		<updated>2026-04-10T15:44:01Z</updated>

		<summary type="html">&lt;p&gt;Lemzwerg: /* Please be careful while using &amp;#039;Edit&amp;#039; */ Reply&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Please be careful while using &#039;Edit&#039; ==&lt;br /&gt;
&lt;br /&gt;
Hello Knute!  There is currently a bug in the &#039;Edit&#039; mode: If you only change some details in the description (i.e., not touching the LilyPond code), the &amp;lt;code&amp;gt;&amp;lt;lilypond&amp;gt;&amp;lt;/code&amp;gt; block gets ‘destroyed’ and is no longer rendered as an image.  Please use &#039;Edit source&#039; instead for the time being to avoid that. -- [[User:Lemzwerg|Lemzwerg]] ([[User talk:Lemzwerg|talk]]) 17:26, 8 April 2026 (UTC)&lt;br /&gt;
&lt;br /&gt;
:Got it, thanks. [[User:Ksnortum|Ksnortum]] ([[User talk:Ksnortum|talk]]) 19:34, 8 April 2026 (UTC)&lt;br /&gt;
:...and thanks for cleaning up the mess! [[User:Ksnortum|Ksnortum]] ([[User talk:Ksnortum|talk]]) 14:58, 10 April 2026 (UTC)&lt;br /&gt;
::You&#039;re welcome! -- [[User:Lemzwerg|Lemzwerg]] ([[User talk:Lemzwerg|talk]]) 15:44, 10 April 2026 (UTC)&lt;/div&gt;</summary>
		<author><name>Lemzwerg</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=Clef_change_at_the_beginning_of_a_piece_(alternative)&amp;diff=6534</id>
		<title>Clef change at the beginning of a piece (alternative)</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=Clef_change_at_the_beginning_of_a_piece_(alternative)&amp;diff=6534"/>
		<updated>2026-04-08T17:29:32Z</updated>

		<summary type="html">&lt;p&gt;Lemzwerg: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;When changing the clef at the beginning of the first measure, Lilypond just changes the clef for the staff. This is how to keep the staff clef and add an extra clef after the time signature and before the first note.  See also [[Initial clef change]] and [[Clef change at the beginning of a piece]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lilypond version=&amp;quot;2.24&amp;quot;&amp;gt;&lt;br /&gt;
\relative c&#039; {&lt;br /&gt;
  %%  Start with a bass clef :&lt;br /&gt;
  \clef bass&lt;br /&gt;
  %%  Use a hidden grace note:&lt;br /&gt;
  \once\hideNotes\grace c64&lt;br /&gt;
  %%  Adjust the clef spacing:&lt;br /&gt;
  \once\override Staff.Clef.X-extent = #&#039;(1 . 2)&lt;br /&gt;
  %%  Put in the treble clef:&lt;br /&gt;
  \clef treble&lt;br /&gt;
  c4 c c c | c1&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lilypond&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Staff notation]]&lt;br /&gt;
[[Category:Pitches]]&lt;br /&gt;
[[Category:Tweaks and overrides]]&lt;br /&gt;
[[Category:Snippet]]&lt;/div&gt;</summary>
		<author><name>Lemzwerg</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=Clef_change_at_the_beginning_of_a_piece_(alternative)&amp;diff=6533</id>
		<title>Clef change at the beginning of a piece (alternative)</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=Clef_change_at_the_beginning_of_a_piece_(alternative)&amp;diff=6533"/>
		<updated>2026-04-08T17:29:02Z</updated>

		<summary type="html">&lt;p&gt;Lemzwerg: Reverted edit by Ksnortum (talk) to last revision by Jean Abou Samra&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;When changing the clef at the beginning of the first measure, Lilypond just changes the clef for the staff. This is how to keep the staff clef and add an extra clef after the time signature and before the first note.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lilypond version=&amp;quot;2.24&amp;quot;&amp;gt;&lt;br /&gt;
\relative c&#039; {&lt;br /&gt;
  %%  Start with a bass clef :&lt;br /&gt;
  \clef bass&lt;br /&gt;
  %%  Use a hidden grace note:&lt;br /&gt;
  \once\hideNotes\grace c64&lt;br /&gt;
  %%  Adjust the clef spacing:&lt;br /&gt;
  \once\override Staff.Clef.X-extent = #&#039;(1 . 2)&lt;br /&gt;
  %%  Put in the treble clef:&lt;br /&gt;
  \clef treble&lt;br /&gt;
  c4 c c c | c1&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lilypond&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Staff notation]]&lt;br /&gt;
[[Category:Pitches]]&lt;br /&gt;
[[Category:Tweaks and overrides]]&lt;br /&gt;
[[Category:Snippet]]&lt;/div&gt;</summary>
		<author><name>Lemzwerg</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=Clef_change_at_the_beginning_of_a_piece&amp;diff=6532</id>
		<title>Clef change at the beginning of a piece</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=Clef_change_at_the_beginning_of_a_piece&amp;diff=6532"/>
		<updated>2026-04-08T17:28:29Z</updated>

		<summary type="html">&lt;p&gt;Lemzwerg: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;When changing the clef at the beginning of the first measure, Lilypond just changes the clef for the staff. This is how to keep the staff clef and add an extra clef after the time signature and before the first note.  See also [[Clef change at the beginning of a piece (alternative)]] and [[Initial clef change]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lilypond version=&amp;quot;2.24&amp;quot;&amp;gt;&lt;br /&gt;
%% http://lsr.di.unimi.it/LSR/Item?id=792&lt;br /&gt;
%% see also http://lilypond.org/doc/stable/Documentation/notation/displaying-pitches&lt;br /&gt;
&lt;br /&gt;
% Append markup in the text property to the grob&lt;br /&gt;
#(define (append-markup grob old-stencil)&lt;br /&gt;
  (ly:stencil-combine-at-edge&lt;br /&gt;
    old-stencil X RIGHT (ly:text-interface::print grob)))&lt;br /&gt;
&lt;br /&gt;
trebleToBass = {&lt;br /&gt;
  \clef bass&lt;br /&gt;
  % Fake staff clef appearance&lt;br /&gt;
  \once \override Staff.Clef.glyph-name = #&amp;quot;clefs.G&amp;quot;&lt;br /&gt;
  \once \override Staff.Clef.Y-offset = #-1&lt;br /&gt;
  % Make sure any key signatures will printed with respect to&lt;br /&gt;
  % correct middle c position expected for treble clef&lt;br /&gt;
  \once \set Staff.middleCClefPosition = -6&lt;br /&gt;
  % Append change clef to the time signature&lt;br /&gt;
  \once \override Staff.TimeSignature.text = \markup {&lt;br /&gt;
    \hspace #1.2&lt;br /&gt;
    \raise #1&lt;br /&gt;
    \musicglyph &amp;quot;clefs.F_change&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
  \once \override Staff.TimeSignature.stencil = #(lambda (grob)&lt;br /&gt;
    (append-markup grob (ly:time-signature::print grob)))&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
bassToTreble = {&lt;br /&gt;
  \clef treble&lt;br /&gt;
  % Fake staff clef appearance&lt;br /&gt;
  \once \override Staff.Clef.glyph-name = #&amp;quot;clefs.F&amp;quot;&lt;br /&gt;
  \once \override Staff.Clef.Y-offset = #1&lt;br /&gt;
  % Make sure any key signatures will printed with respect to&lt;br /&gt;
  % correct middle c position expected for bass clef&lt;br /&gt;
  \once \set Staff.middleCClefPosition = 6&lt;br /&gt;
  % Append change clef to the time signature&lt;br /&gt;
  \once \override Staff.TimeSignature.text = \markup {&lt;br /&gt;
    \hspace #1.2&lt;br /&gt;
    \lower #1&lt;br /&gt;
    \musicglyph &amp;quot;clefs.G_change&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
  \once \override Staff.TimeSignature.stencil = #(lambda (grob)&lt;br /&gt;
    (append-markup grob (ly:time-signature::print grob)))&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
\relative c {&lt;br /&gt;
  \trebleToBass&lt;br /&gt;
  \key f \major&lt;br /&gt;
  c4 d e f&lt;br /&gt;
  % This should not be visible&lt;br /&gt;
  \clef bass&lt;br /&gt;
  g a b c&lt;br /&gt;
  % This should be visible&lt;br /&gt;
  \clef treble&lt;br /&gt;
  d e f g&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lilypond&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Staff notation]]&lt;br /&gt;
[[Category:Staff notation]]&lt;br /&gt;
[[Category:Pitches]]&lt;br /&gt;
[[Category:Tweaks and overrides]]&lt;br /&gt;
[[Category:Snippet]]&lt;/div&gt;</summary>
		<author><name>Lemzwerg</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=Clef_change_at_the_beginning_of_a_piece&amp;diff=6531</id>
		<title>Clef change at the beginning of a piece</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=Clef_change_at_the_beginning_of_a_piece&amp;diff=6531"/>
		<updated>2026-04-08T17:27:58Z</updated>

		<summary type="html">&lt;p&gt;Lemzwerg: Reverted edit by Ksnortum (talk) to last revision by Lemzwerg&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;When changing the clef at the beginning of the first measure, Lilypond just changes the clef for the staff. This is how to keep the staff clef and add an extra clef after the time signature and before the first note.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lilypond version=&amp;quot;2.24&amp;quot;&amp;gt;&lt;br /&gt;
%% http://lsr.di.unimi.it/LSR/Item?id=792&lt;br /&gt;
%% see also http://lilypond.org/doc/stable/Documentation/notation/displaying-pitches&lt;br /&gt;
&lt;br /&gt;
% Append markup in the text property to the grob&lt;br /&gt;
#(define (append-markup grob old-stencil)&lt;br /&gt;
  (ly:stencil-combine-at-edge&lt;br /&gt;
    old-stencil X RIGHT (ly:text-interface::print grob)))&lt;br /&gt;
&lt;br /&gt;
trebleToBass = {&lt;br /&gt;
  \clef bass&lt;br /&gt;
  % Fake staff clef appearance&lt;br /&gt;
  \once \override Staff.Clef.glyph-name = #&amp;quot;clefs.G&amp;quot;&lt;br /&gt;
  \once \override Staff.Clef.Y-offset = #-1&lt;br /&gt;
  % Make sure any key signatures will printed with respect to&lt;br /&gt;
  % correct middle c position expected for treble clef&lt;br /&gt;
  \once \set Staff.middleCClefPosition = -6&lt;br /&gt;
  % Append change clef to the time signature&lt;br /&gt;
  \once \override Staff.TimeSignature.text = \markup {&lt;br /&gt;
    \hspace #1.2&lt;br /&gt;
    \raise #1&lt;br /&gt;
    \musicglyph &amp;quot;clefs.F_change&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
  \once \override Staff.TimeSignature.stencil = #(lambda (grob)&lt;br /&gt;
    (append-markup grob (ly:time-signature::print grob)))&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
bassToTreble = {&lt;br /&gt;
  \clef treble&lt;br /&gt;
  % Fake staff clef appearance&lt;br /&gt;
  \once \override Staff.Clef.glyph-name = #&amp;quot;clefs.F&amp;quot;&lt;br /&gt;
  \once \override Staff.Clef.Y-offset = #1&lt;br /&gt;
  % Make sure any key signatures will printed with respect to&lt;br /&gt;
  % correct middle c position expected for bass clef&lt;br /&gt;
  \once \set Staff.middleCClefPosition = 6&lt;br /&gt;
  % Append change clef to the time signature&lt;br /&gt;
  \once \override Staff.TimeSignature.text = \markup {&lt;br /&gt;
    \hspace #1.2&lt;br /&gt;
    \lower #1&lt;br /&gt;
    \musicglyph &amp;quot;clefs.G_change&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
  \once \override Staff.TimeSignature.stencil = #(lambda (grob)&lt;br /&gt;
    (append-markup grob (ly:time-signature::print grob)))&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
\relative c {&lt;br /&gt;
  \trebleToBass&lt;br /&gt;
  \key f \major&lt;br /&gt;
  c4 d e f&lt;br /&gt;
  % This should not be visible&lt;br /&gt;
  \clef bass&lt;br /&gt;
  g a b c&lt;br /&gt;
  % This should be visible&lt;br /&gt;
  \clef treble&lt;br /&gt;
  d e f g&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lilypond&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Staff notation]]&lt;br /&gt;
[[Category:Staff notation]]&lt;br /&gt;
[[Category:Pitches]]&lt;br /&gt;
[[Category:Tweaks and overrides]]&lt;br /&gt;
[[Category:Snippet]]&lt;/div&gt;</summary>
		<author><name>Lemzwerg</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=User_talk:Ksnortum&amp;diff=6530</id>
		<title>User talk:Ksnortum</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=User_talk:Ksnortum&amp;diff=6530"/>
		<updated>2026-04-08T17:26:25Z</updated>

		<summary type="html">&lt;p&gt;Lemzwerg: /* Please be careful while using &amp;#039;Edit&amp;#039; */ new section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Please be careful while using &#039;Edit&#039; ==&lt;br /&gt;
&lt;br /&gt;
Hello Knute!  There is currently a bug in the &#039;Edit&#039; mode: If you only change some details in the description (i.e., not touching the LilyPond code), the &amp;lt;code&amp;gt;&amp;lt;lilypond&amp;gt;&amp;lt;/code&amp;gt; block gets ‘destroyed’ and is no longer rendered as an image.  Please use &#039;Edit source&#039; instead for the time being to avoid that. -- [[User:Lemzwerg|Lemzwerg]] ([[User talk:Lemzwerg|talk]]) 17:26, 8 April 2026 (UTC)&lt;/div&gt;</summary>
		<author><name>Lemzwerg</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=Initial_clef_change&amp;diff=6529</id>
		<title>Initial clef change</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=Initial_clef_change&amp;diff=6529"/>
		<updated>2026-04-08T17:22:41Z</updated>

		<summary type="html">&lt;p&gt;Lemzwerg: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This snippet handles initial clef changes with a custom engraver. This engraver checks whether there is a difference between the initial clef (as given by &amp;lt;code&amp;gt;\with { \clef ... }&amp;lt;/code&amp;gt; and the clef at the first timestep. If any difference is encountered a new clef (spaced like a cue clef) is created, while the original clef and any key signatures are modified to look like the initial clef values.  See also the snippets [[Clef change at the beginning of a piece]] and [[Clef change at the beginning of a piece (alternative)]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lilypond version=&amp;quot;2.24&amp;quot;&amp;gt;&lt;br /&gt;
%%% This engraver records the initial clef properties (e.g. what is set by \with { \clef ... })&lt;br /&gt;
%%% If in the first timestep these changed, engrave the original clef, and change formatting and break&lt;br /&gt;
%%% alignment of the actual clef to mimic a clef change clef. Duplicates some procedure from clef engraver&lt;br /&gt;
%%% and could easily be integrated.&lt;br /&gt;
#(define (initial-clef-change-engraver context)&lt;br /&gt;
   (let ((initial-clef-properties #f) (cclef #f) (keysigs &#039;()))&lt;br /&gt;
     ; macro for checking if any clef property has changed&lt;br /&gt;
     (define (clef-changed)&lt;br /&gt;
       (&amp;gt;&lt;br /&gt;
        (length initial-clef-properties)&lt;br /&gt;
        (length&lt;br /&gt;
         (filter&lt;br /&gt;
          (lambda (x) (equal? (cdr x) (ly:context-property context (car x))))&lt;br /&gt;
          initial-clef-properties))))&lt;br /&gt;
     (make-engraver&lt;br /&gt;
      ; Record initials propertis&lt;br /&gt;
      ((initialize engraver)&lt;br /&gt;
       (set!&lt;br /&gt;
        initial-clef-properties&lt;br /&gt;
        `((clefGlyph . ,(ly:context-property context &#039;clefGlyph))&lt;br /&gt;
          (clefPosition  . ,(ly:context-property context &#039;clefPosition))&lt;br /&gt;
          (middleCClefPosition . ,(ly:context-property context &#039;middleCClefPosition))&lt;br /&gt;
          (clefTransposition  . ,(ly:context-property context &#039;clefTransposition)))))&lt;br /&gt;
      ; Record the actual clef to adjust. Use details.muted to not acknowledge clef created by this engraver.&lt;br /&gt;
      (acknowledgers&lt;br /&gt;
       ((clef-interface engraver grob source-engraver)&lt;br /&gt;
        (if (not (assoc-get &#039;muted (ly:grob-property grob &#039;details) #f))&lt;br /&gt;
            (set! cclef grob)))&lt;br /&gt;
       ((key-signature-interface engraver grob source-engraver)&lt;br /&gt;
        (set! keysigs (cons grob keysigs))))&lt;br /&gt;
      ; Create a clef if necessary&lt;br /&gt;
      ((process-music engraver)&lt;br /&gt;
       (if (and initial-clef-properties (clef-changed))&lt;br /&gt;
           (let ((clef (ly:engraver-make-grob engraver &#039;Clef &#039;())))&lt;br /&gt;
             (ly:grob-set-property! clef &#039;staff-position (assoc-get &#039;clefPosition initial-clef-properties))&lt;br /&gt;
             (ly:grob-set-property! clef &#039;glyph (assoc-get &#039;clefGlyph initial-clef-properties))&lt;br /&gt;
             (ly:grob-set-nested-property! clef &#039;(details muted) #t)&lt;br /&gt;
             (if ((lambda (x) (and (number? x) (not (= 0 x))))&lt;br /&gt;
                  (assoc-get &#039;clefTransposition initial-clef-properties 0))&lt;br /&gt;
                 (let ((mod (ly:engraver-make-grob engraver &#039;ClefModifier &#039;()))&lt;br /&gt;
                       (formatter (ly:context-property context &#039;clefTranspositionFormatter))&lt;br /&gt;
                       (style (ly:context-property context &#039;clefTranspositionStyle))&lt;br /&gt;
                       (dir (sign (assoc-get &#039;clefTransposition initial-clef-properties 0)))&lt;br /&gt;
                       (abs_trans (1+ (abs (assoc-get &#039;clefTransposition initial-clef-properties 0)))))&lt;br /&gt;
                   (if (procedure? formatter)&lt;br /&gt;
                       (ly:grob-set-property! mod &#039;text (formatter (number-&amp;gt;string abs_trans) style)))&lt;br /&gt;
                   (ly:grob-set-object! mod &#039;side-support-elements (ly:grob-list-&amp;gt;grob-array (list clef)))&lt;br /&gt;
                   (ly:grob-set-parent! mod X clef)&lt;br /&gt;
                   (ly:grob-set-parent! mod Y clef)&lt;br /&gt;
                   (ly:grob-set-property! mod &#039;direction dir))))))&lt;br /&gt;
      ; Adjust the actual clef and key signatures&lt;br /&gt;
      ((process-acknowledged engraver)&lt;br /&gt;
       (if (and cclef initial-clef-properties (clef-changed))&lt;br /&gt;
           (begin&lt;br /&gt;
&lt;br /&gt;
            ; Key signatures need to be handled if they appear before the cue-clef&lt;br /&gt;
            ; This requires the break alignment information, so this only sets a&lt;br /&gt;
            ; hook which will be processed during `before-line-breaking` of the&lt;br /&gt;
            ; BreakAlignGroups&lt;br /&gt;
            (for-each&lt;br /&gt;
             (lambda (keysig)&lt;br /&gt;
               (let ((det (ly:grob-property keysig &#039;details))&lt;br /&gt;
                     (initial-clef-properties initial-clef-properties))&lt;br /&gt;
                 (ly:grob-set-property!&lt;br /&gt;
                  keysig&lt;br /&gt;
                  &#039;details&lt;br /&gt;
                  (acons&lt;br /&gt;
                   &#039;break-alignment-handler&lt;br /&gt;
                   (lambda (grob break-alignment)&lt;br /&gt;
                     (let ((start-of-line&lt;br /&gt;
                            (vector-ref&lt;br /&gt;
                             (ly:grob-property break-alignment &#039;break-align-orders)&lt;br /&gt;
                             2)))&lt;br /&gt;
                       (if (member &#039;cue-clef (or (member &#039;key-signature start-of-line) &#039;()))&lt;br /&gt;
                           (ly:grob-set-property!&lt;br /&gt;
                            grob &#039;c0-position&lt;br /&gt;
                            (assoc-get &#039;middleCClefPosition initial-clef-properties)))))&lt;br /&gt;
                   det))))&lt;br /&gt;
             keysigs)&lt;br /&gt;
&lt;br /&gt;
            (ly:grob-set-property! cclef &#039;non-default #t)&lt;br /&gt;
            (ly:grob-set-property! cclef &#039;break-align-symbol &#039;cue-clef)&lt;br /&gt;
            (if (not (eq? #t (ly:grob-property cclef &#039;full-size-change)))&lt;br /&gt;
                (ly:grob-set-property! cclef &#039;glyph-name&lt;br /&gt;
                                      (format #f &amp;quot;~a_change&amp;quot; (ly:grob-property cclef &#039;glyph)))))))&lt;br /&gt;
      ; Unset parameters&lt;br /&gt;
      ((stop-translation-timestep engraver)&lt;br /&gt;
       (set! initial-clef-properties #f)&lt;br /&gt;
       (set! clef #f)&lt;br /&gt;
       (set! keysigs &#039;())))))&lt;br /&gt;
&lt;br /&gt;
\layout {&lt;br /&gt;
  \context {&lt;br /&gt;
    \Staff&lt;br /&gt;
    \consists #initial-clef-change-engraver&lt;br /&gt;
  }&lt;br /&gt;
  \context {&lt;br /&gt;
    \Score&lt;br /&gt;
    \override BreakAlignGroup.before-line-breaking =&lt;br /&gt;
    #(lambda (grob)&lt;br /&gt;
       (let ((grobs (ly:grob-object grob &#039;elements))&lt;br /&gt;
             (break-alignment (ly:grob-parent grob X)))&lt;br /&gt;
         (if (not (null? grobs))&lt;br /&gt;
             (set! grobs (ly:grob-array-&amp;gt;list grobs)))&lt;br /&gt;
         (for-each&lt;br /&gt;
          (lambda (grob)&lt;br /&gt;
            (let* ((det (ly:grob-property grob &#039;details))&lt;br /&gt;
                   (handler (assoc-get &#039;break-alignment-handler det)))&lt;br /&gt;
              (if (procedure? handler)&lt;br /&gt;
                  (handler grob break-alignment))))&lt;br /&gt;
          grobs)))&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
\new Staff \with { \clef &amp;quot;bass^15&amp;quot; } {&lt;br /&gt;
  \key bes\major&lt;br /&gt;
  \clef &amp;quot;treble_8&amp;quot;&lt;br /&gt;
  c&#039;1 c&#039;1&lt;br /&gt;
  \clef bass&lt;br /&gt;
  c&#039;1&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
\score {&lt;br /&gt;
  \layout {&lt;br /&gt;
    \context {&lt;br /&gt;
      \Score&lt;br /&gt;
      \override BreakAlignment.break-align-orders =&lt;br /&gt;
      ##((staff-ellipsis&lt;br /&gt;
          left-edge&lt;br /&gt;
          cue-end-clef&lt;br /&gt;
          ambitus&lt;br /&gt;
          breathing-sign&lt;br /&gt;
          optional-material-end-bracket&lt;br /&gt;
          signum-repetitionis&lt;br /&gt;
          clef&lt;br /&gt;
          cue-clef&lt;br /&gt;
          staff-bar&lt;br /&gt;
          key-cancellation&lt;br /&gt;
          key-signature&lt;br /&gt;
          time-signature&lt;br /&gt;
          optional-material-start-bracket&lt;br /&gt;
          custos)&lt;br /&gt;
         (staff-ellipsis&lt;br /&gt;
          left-edge&lt;br /&gt;
          optional-material-end-bracket&lt;br /&gt;
          cue-end-clef&lt;br /&gt;
          ambitus&lt;br /&gt;
          breathing-sign&lt;br /&gt;
          signum-repetitionis&lt;br /&gt;
          clef&lt;br /&gt;
          cue-clef&lt;br /&gt;
          staff-bar&lt;br /&gt;
          key-cancellation&lt;br /&gt;
          key-signature&lt;br /&gt;
          time-signature&lt;br /&gt;
          optional-material-start-bracket&lt;br /&gt;
          custos)&lt;br /&gt;
         (staff-ellipsis&lt;br /&gt;
          left-edge&lt;br /&gt;
          optional-material-end-bracket&lt;br /&gt;
          ambitus&lt;br /&gt;
          breathing-sign&lt;br /&gt;
          signum-repetitionis&lt;br /&gt;
          clef&lt;br /&gt;
          cue-clef&lt;br /&gt;
          key-cancellation&lt;br /&gt;
          key-signature&lt;br /&gt;
          time-signature&lt;br /&gt;
          staff-bar&lt;br /&gt;
          optional-material-start-bracket&lt;br /&gt;
          custos))&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
  \new Staff \with { \clef &amp;quot;bass^15&amp;quot; } {&lt;br /&gt;
    \key bes\major&lt;br /&gt;
    \clef &amp;quot;treble_8&amp;quot;&lt;br /&gt;
    c&#039;1 c&#039;1&lt;br /&gt;
    \clef bass&lt;br /&gt;
    c&#039;1&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
% Basic usage:&lt;br /&gt;
\score {&lt;br /&gt;
  &amp;lt;&amp;lt;&lt;br /&gt;
    % Just the treble clef&lt;br /&gt;
    \new Staff {&lt;br /&gt;
      \key bes \major&lt;br /&gt;
      c&#039;&#039;1&lt;br /&gt;
    }&lt;br /&gt;
      &lt;br /&gt;
    % Just the bass clef&lt;br /&gt;
    \new Staff \with { \clef bass  } {&lt;br /&gt;
      \key bes \major&lt;br /&gt;
      c1&lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    % Initial treble clef, then bass clef&lt;br /&gt;
    \new Staff {&lt;br /&gt;
      \key bes \major&lt;br /&gt;
      \clef bass &lt;br /&gt;
      c1&lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    % Initial bass clef, then treble clef&lt;br /&gt;
    \new Staff \with { \clef bass  } {&lt;br /&gt;
      \key bes \major&lt;br /&gt;
      \clef treble &lt;br /&gt;
      c&#039;&#039;1&lt;br /&gt;
    }&lt;br /&gt;
  &amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  \layout {&lt;br /&gt;
    \context {&lt;br /&gt;
      \Staff&lt;br /&gt;
      \consists #initial-clef-change-engraver&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lilypond&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Contexts and engravers]]&lt;br /&gt;
[[Category:Scheme]]&lt;br /&gt;
[[Category:Staff notation]]&lt;br /&gt;
[[Category:Snippet]]&lt;/div&gt;</summary>
		<author><name>Lemzwerg</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=Initial_clef_change&amp;diff=6528</id>
		<title>Initial clef change</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=Initial_clef_change&amp;diff=6528"/>
		<updated>2026-04-08T17:21:45Z</updated>

		<summary type="html">&lt;p&gt;Lemzwerg: Reverted edit by Ksnortum (talk) to last revision by Lemzwerg&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This snippet handles initial clef changes with a custom engraver. This engraver checks whether there is a difference between the initial clef (as given by &amp;lt;code&amp;gt;\with { \clef ... }&amp;lt;/code&amp;gt; and the clef at the first timestep. If any difference is encountered a new clef (spaced like a cue clef) is created, while the original clef and any key signatures are modified to look like the initial clef values.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lilypond version=&amp;quot;2.24&amp;quot;&amp;gt;&lt;br /&gt;
%%% This engraver records the initial clef properties (e.g. what is set by \with { \clef ... })&lt;br /&gt;
%%% If in the first timestep these changed, engrave the original clef, and change formatting and break&lt;br /&gt;
%%% alignment of the actual clef to mimic a clef change clef. Duplicates some procedure from clef engraver&lt;br /&gt;
%%% and could easily be integrated.&lt;br /&gt;
#(define (initial-clef-change-engraver context)&lt;br /&gt;
   (let ((initial-clef-properties #f) (cclef #f) (keysigs &#039;()))&lt;br /&gt;
     ; macro for checking if any clef property has changed&lt;br /&gt;
     (define (clef-changed)&lt;br /&gt;
       (&amp;gt;&lt;br /&gt;
        (length initial-clef-properties)&lt;br /&gt;
        (length&lt;br /&gt;
         (filter&lt;br /&gt;
          (lambda (x) (equal? (cdr x) (ly:context-property context (car x))))&lt;br /&gt;
          initial-clef-properties))))&lt;br /&gt;
     (make-engraver&lt;br /&gt;
      ; Record initials propertis&lt;br /&gt;
      ((initialize engraver)&lt;br /&gt;
       (set!&lt;br /&gt;
        initial-clef-properties&lt;br /&gt;
        `((clefGlyph . ,(ly:context-property context &#039;clefGlyph))&lt;br /&gt;
          (clefPosition  . ,(ly:context-property context &#039;clefPosition))&lt;br /&gt;
          (middleCClefPosition . ,(ly:context-property context &#039;middleCClefPosition))&lt;br /&gt;
          (clefTransposition  . ,(ly:context-property context &#039;clefTransposition)))))&lt;br /&gt;
      ; Record the actual clef to adjust. Use details.muted to not acknowledge clef created by this engraver.&lt;br /&gt;
      (acknowledgers&lt;br /&gt;
       ((clef-interface engraver grob source-engraver)&lt;br /&gt;
        (if (not (assoc-get &#039;muted (ly:grob-property grob &#039;details) #f))&lt;br /&gt;
            (set! cclef grob)))&lt;br /&gt;
       ((key-signature-interface engraver grob source-engraver)&lt;br /&gt;
        (set! keysigs (cons grob keysigs))))&lt;br /&gt;
      ; Create a clef if necessary&lt;br /&gt;
      ((process-music engraver)&lt;br /&gt;
       (if (and initial-clef-properties (clef-changed))&lt;br /&gt;
           (let ((clef (ly:engraver-make-grob engraver &#039;Clef &#039;())))&lt;br /&gt;
             (ly:grob-set-property! clef &#039;staff-position (assoc-get &#039;clefPosition initial-clef-properties))&lt;br /&gt;
             (ly:grob-set-property! clef &#039;glyph (assoc-get &#039;clefGlyph initial-clef-properties))&lt;br /&gt;
             (ly:grob-set-nested-property! clef &#039;(details muted) #t)&lt;br /&gt;
             (if ((lambda (x) (and (number? x) (not (= 0 x))))&lt;br /&gt;
                  (assoc-get &#039;clefTransposition initial-clef-properties 0))&lt;br /&gt;
                 (let ((mod (ly:engraver-make-grob engraver &#039;ClefModifier &#039;()))&lt;br /&gt;
                       (formatter (ly:context-property context &#039;clefTranspositionFormatter))&lt;br /&gt;
                       (style (ly:context-property context &#039;clefTranspositionStyle))&lt;br /&gt;
                       (dir (sign (assoc-get &#039;clefTransposition initial-clef-properties 0)))&lt;br /&gt;
                       (abs_trans (1+ (abs (assoc-get &#039;clefTransposition initial-clef-properties 0)))))&lt;br /&gt;
                   (if (procedure? formatter)&lt;br /&gt;
                       (ly:grob-set-property! mod &#039;text (formatter (number-&amp;gt;string abs_trans) style)))&lt;br /&gt;
                   (ly:grob-set-object! mod &#039;side-support-elements (ly:grob-list-&amp;gt;grob-array (list clef)))&lt;br /&gt;
                   (ly:grob-set-parent! mod X clef)&lt;br /&gt;
                   (ly:grob-set-parent! mod Y clef)&lt;br /&gt;
                   (ly:grob-set-property! mod &#039;direction dir))))))&lt;br /&gt;
      ; Adjust the actual clef and key signatures&lt;br /&gt;
      ((process-acknowledged engraver)&lt;br /&gt;
       (if (and cclef initial-clef-properties (clef-changed))&lt;br /&gt;
           (begin&lt;br /&gt;
&lt;br /&gt;
            ; Key signatures need to be handled if they appear before the cue-clef&lt;br /&gt;
            ; This requires the break alignment information, so this only sets a&lt;br /&gt;
            ; hook which will be processed during `before-line-breaking` of the&lt;br /&gt;
            ; BreakAlignGroups&lt;br /&gt;
            (for-each&lt;br /&gt;
             (lambda (keysig)&lt;br /&gt;
               (let ((det (ly:grob-property keysig &#039;details))&lt;br /&gt;
                     (initial-clef-properties initial-clef-properties))&lt;br /&gt;
                 (ly:grob-set-property!&lt;br /&gt;
                  keysig&lt;br /&gt;
                  &#039;details&lt;br /&gt;
                  (acons&lt;br /&gt;
                   &#039;break-alignment-handler&lt;br /&gt;
                   (lambda (grob break-alignment)&lt;br /&gt;
                     (let ((start-of-line&lt;br /&gt;
                            (vector-ref&lt;br /&gt;
                             (ly:grob-property break-alignment &#039;break-align-orders)&lt;br /&gt;
                             2)))&lt;br /&gt;
                       (if (member &#039;cue-clef (or (member &#039;key-signature start-of-line) &#039;()))&lt;br /&gt;
                           (ly:grob-set-property!&lt;br /&gt;
                            grob &#039;c0-position&lt;br /&gt;
                            (assoc-get &#039;middleCClefPosition initial-clef-properties)))))&lt;br /&gt;
                   det))))&lt;br /&gt;
             keysigs)&lt;br /&gt;
&lt;br /&gt;
            (ly:grob-set-property! cclef &#039;non-default #t)&lt;br /&gt;
            (ly:grob-set-property! cclef &#039;break-align-symbol &#039;cue-clef)&lt;br /&gt;
            (if (not (eq? #t (ly:grob-property cclef &#039;full-size-change)))&lt;br /&gt;
                (ly:grob-set-property! cclef &#039;glyph-name&lt;br /&gt;
                                      (format #f &amp;quot;~a_change&amp;quot; (ly:grob-property cclef &#039;glyph)))))))&lt;br /&gt;
      ; Unset parameters&lt;br /&gt;
      ((stop-translation-timestep engraver)&lt;br /&gt;
       (set! initial-clef-properties #f)&lt;br /&gt;
       (set! clef #f)&lt;br /&gt;
       (set! keysigs &#039;())))))&lt;br /&gt;
&lt;br /&gt;
\layout {&lt;br /&gt;
  \context {&lt;br /&gt;
    \Staff&lt;br /&gt;
    \consists #initial-clef-change-engraver&lt;br /&gt;
  }&lt;br /&gt;
  \context {&lt;br /&gt;
    \Score&lt;br /&gt;
    \override BreakAlignGroup.before-line-breaking =&lt;br /&gt;
    #(lambda (grob)&lt;br /&gt;
       (let ((grobs (ly:grob-object grob &#039;elements))&lt;br /&gt;
             (break-alignment (ly:grob-parent grob X)))&lt;br /&gt;
         (if (not (null? grobs))&lt;br /&gt;
             (set! grobs (ly:grob-array-&amp;gt;list grobs)))&lt;br /&gt;
         (for-each&lt;br /&gt;
          (lambda (grob)&lt;br /&gt;
            (let* ((det (ly:grob-property grob &#039;details))&lt;br /&gt;
                   (handler (assoc-get &#039;break-alignment-handler det)))&lt;br /&gt;
              (if (procedure? handler)&lt;br /&gt;
                  (handler grob break-alignment))))&lt;br /&gt;
          grobs)))&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
\new Staff \with { \clef &amp;quot;bass^15&amp;quot; } {&lt;br /&gt;
  \key bes\major&lt;br /&gt;
  \clef &amp;quot;treble_8&amp;quot;&lt;br /&gt;
  c&#039;1 c&#039;1&lt;br /&gt;
  \clef bass&lt;br /&gt;
  c&#039;1&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
\score {&lt;br /&gt;
  \layout {&lt;br /&gt;
    \context {&lt;br /&gt;
      \Score&lt;br /&gt;
      \override BreakAlignment.break-align-orders =&lt;br /&gt;
      ##((staff-ellipsis&lt;br /&gt;
          left-edge&lt;br /&gt;
          cue-end-clef&lt;br /&gt;
          ambitus&lt;br /&gt;
          breathing-sign&lt;br /&gt;
          optional-material-end-bracket&lt;br /&gt;
          signum-repetitionis&lt;br /&gt;
          clef&lt;br /&gt;
          cue-clef&lt;br /&gt;
          staff-bar&lt;br /&gt;
          key-cancellation&lt;br /&gt;
          key-signature&lt;br /&gt;
          time-signature&lt;br /&gt;
          optional-material-start-bracket&lt;br /&gt;
          custos)&lt;br /&gt;
         (staff-ellipsis&lt;br /&gt;
          left-edge&lt;br /&gt;
          optional-material-end-bracket&lt;br /&gt;
          cue-end-clef&lt;br /&gt;
          ambitus&lt;br /&gt;
          breathing-sign&lt;br /&gt;
          signum-repetitionis&lt;br /&gt;
          clef&lt;br /&gt;
          cue-clef&lt;br /&gt;
          staff-bar&lt;br /&gt;
          key-cancellation&lt;br /&gt;
          key-signature&lt;br /&gt;
          time-signature&lt;br /&gt;
          optional-material-start-bracket&lt;br /&gt;
          custos)&lt;br /&gt;
         (staff-ellipsis&lt;br /&gt;
          left-edge&lt;br /&gt;
          optional-material-end-bracket&lt;br /&gt;
          ambitus&lt;br /&gt;
          breathing-sign&lt;br /&gt;
          signum-repetitionis&lt;br /&gt;
          clef&lt;br /&gt;
          cue-clef&lt;br /&gt;
          key-cancellation&lt;br /&gt;
          key-signature&lt;br /&gt;
          time-signature&lt;br /&gt;
          staff-bar&lt;br /&gt;
          optional-material-start-bracket&lt;br /&gt;
          custos))&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
  \new Staff \with { \clef &amp;quot;bass^15&amp;quot; } {&lt;br /&gt;
    \key bes\major&lt;br /&gt;
    \clef &amp;quot;treble_8&amp;quot;&lt;br /&gt;
    c&#039;1 c&#039;1&lt;br /&gt;
    \clef bass&lt;br /&gt;
    c&#039;1&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
% Basic usage:&lt;br /&gt;
\score {&lt;br /&gt;
  &amp;lt;&amp;lt;&lt;br /&gt;
    % Just the treble clef&lt;br /&gt;
    \new Staff {&lt;br /&gt;
      \key bes \major&lt;br /&gt;
      c&#039;&#039;1&lt;br /&gt;
    }&lt;br /&gt;
      &lt;br /&gt;
    % Just the bass clef&lt;br /&gt;
    \new Staff \with { \clef bass  } {&lt;br /&gt;
      \key bes \major&lt;br /&gt;
      c1&lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    % Initial treble clef, then bass clef&lt;br /&gt;
    \new Staff {&lt;br /&gt;
      \key bes \major&lt;br /&gt;
      \clef bass &lt;br /&gt;
      c1&lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    % Initial bass clef, then treble clef&lt;br /&gt;
    \new Staff \with { \clef bass  } {&lt;br /&gt;
      \key bes \major&lt;br /&gt;
      \clef treble &lt;br /&gt;
      c&#039;&#039;1&lt;br /&gt;
    }&lt;br /&gt;
  &amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  \layout {&lt;br /&gt;
    \context {&lt;br /&gt;
      \Staff&lt;br /&gt;
      \consists #initial-clef-change-engraver&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lilypond&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Contexts and engravers]]&lt;br /&gt;
[[Category:Scheme]]&lt;br /&gt;
[[Category:Staff notation]]&lt;br /&gt;
[[Category:Snippet]]&lt;/div&gt;</summary>
		<author><name>Lemzwerg</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=Splitting_chords&amp;diff=6518</id>
		<title>Splitting chords</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=Splitting_chords&amp;diff=6518"/>
		<updated>2026-04-07T03:53:53Z</updated>

		<summary type="html">&lt;p&gt;Lemzwerg: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This snippet is a 2009 contribution by Gilles Thibault in [https://lists.gnu.org/archive/html/lilypond-user/2009-01/msg00685.html lilypond-user]. It provides two functions to split a chord sequence into two separate voices, also preserving articulations and slurs: &amp;lt;code&amp;gt;\keepOnlyFirstNote&amp;lt;/code&amp;gt; extracts the first note (as given in the input; this is usually the lowest one) of every chord, and &amp;lt;code&amp;gt;\deleteFirstNote&amp;lt;/code&amp;gt; collects the remaining notes.&lt;br /&gt;
&lt;br /&gt;
Note that these functions don&#039;t support &amp;lt;samp&amp;gt;q&amp;lt;/samp&amp;gt; to repeat the last chord.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lilypond version=&amp;quot;2.24&amp;quot;&amp;gt;&lt;br /&gt;
#(define (has-duration? music)&lt;br /&gt;
   (ly:duration? (ly:music-property music &#039;duration)))&lt;br /&gt;
&lt;br /&gt;
#(define (not-has-duration? music)&lt;br /&gt;
   (not (has-duration? music)))&lt;br /&gt;
&lt;br /&gt;
keepOnlyFirstNote =&lt;br /&gt;
#(define-music-function (parser location music) (ly:music?)&lt;br /&gt;
   (music-map&lt;br /&gt;
    (lambda (evt)&lt;br /&gt;
      (when (eq? &#039;EventChord (ly:music-property evt &#039;name))&lt;br /&gt;
 	(let ((elts (ly:music-property evt &#039;elements)))&lt;br /&gt;
 	  (when (has-duration? (car elts))&lt;br /&gt;
 	    (ly:music-set-property!&lt;br /&gt;
 	     evt &#039;elements&lt;br /&gt;
 	     (cons (car elts)&lt;br /&gt;
 		   (filter not-has-duration? (cdr elts)))))))&lt;br /&gt;
      evt)&lt;br /&gt;
    music))&lt;br /&gt;
&lt;br /&gt;
deleteFirstNote =&lt;br /&gt;
#(define-music-function (parser location music) (ly:music?)&lt;br /&gt;
   (music-map&lt;br /&gt;
    (lambda (evt)&lt;br /&gt;
      (when (eq? &#039;EventChord (ly:music-property evt &#039;name))&lt;br /&gt;
 	(let ((elts (ly:music-property evt &#039;elements)))&lt;br /&gt;
          (when (has-duration? (car elts))&lt;br /&gt;
            (ly:music-set-property! evt &#039;elements  (cdr elts)))))&lt;br /&gt;
      evt)&lt;br /&gt;
    music))&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
music = \relative c&#039; {&lt;br /&gt;
  &amp;lt;c e&amp;gt;4-&amp;gt; &amp;lt;d f&amp;gt;( &amp;lt;b g&#039;&amp;gt;) &amp;lt;c e&amp;gt;-. g2 c2&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
\markup { Music with chords }&lt;br /&gt;
\new Staff \music&lt;br /&gt;
&lt;br /&gt;
\markup { Music split into two staves }&lt;br /&gt;
&amp;lt;&amp;lt;&lt;br /&gt;
  \new Staff \deleteFirstNote \music&lt;br /&gt;
  \new Staff \keepOnlyFirstNote \music&lt;br /&gt;
&amp;gt;&amp;gt;&lt;br /&gt;
&amp;lt;/lilypond&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[category:Chords]]&lt;br /&gt;
[[category:Scheme]]&lt;br /&gt;
[[category:Really cool]]&lt;/div&gt;</summary>
		<author><name>Lemzwerg</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=Splitting_chords&amp;diff=6517</id>
		<title>Splitting chords</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=Splitting_chords&amp;diff=6517"/>
		<updated>2026-04-07T03:51:40Z</updated>

		<summary type="html">&lt;p&gt;Lemzwerg: Not sure how it could happen that changing a single letter in the docstring completely ruined the rendering...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This snippet is a 2009 contribution by Gilles Thibault in [https://lists.gnu.org/archive/html/lilypond-user/2009-01/msg00685.html lilypond-user]. It provides two functions to split a chord sequence into two separate voices, also preserving articulations and slurs: &amp;lt;code&amp;gt;\keepOnlyFirstNote&amp;lt;/code&amp;gt; extracts the first note (as given in the input; this is usually the lowest one) of every chord, and &amp;lt;code&amp;gt;\deleteFirstNote&amp;lt;/code&amp;gt; collects the remaining notes.&lt;br /&gt;
&lt;br /&gt;
Note that these function don&#039;t support &amp;lt;samp&amp;gt;q&amp;lt;/samp&amp;gt; to repeat the last chord.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lilypond version=&amp;quot;2.24&amp;quot;&amp;gt;&lt;br /&gt;
#(define (has-duration? music)&lt;br /&gt;
   (ly:duration? (ly:music-property music &#039;duration)))&lt;br /&gt;
&lt;br /&gt;
#(define (not-has-duration? music)&lt;br /&gt;
   (not (has-duration? music)))&lt;br /&gt;
&lt;br /&gt;
keepOnlyFirstNote =&lt;br /&gt;
#(define-music-function (parser location music) (ly:music?)&lt;br /&gt;
   (music-map&lt;br /&gt;
    (lambda (evt)&lt;br /&gt;
      (when (eq? &#039;EventChord (ly:music-property evt &#039;name))&lt;br /&gt;
 	(let ((elts (ly:music-property evt &#039;elements)))&lt;br /&gt;
 	  (when (has-duration? (car elts))&lt;br /&gt;
 	    (ly:music-set-property!&lt;br /&gt;
 	     evt &#039;elements&lt;br /&gt;
 	     (cons (car elts)&lt;br /&gt;
 		   (filter not-has-duration? (cdr elts)))))))&lt;br /&gt;
      evt)&lt;br /&gt;
    music))&lt;br /&gt;
&lt;br /&gt;
deleteFirstNote =&lt;br /&gt;
#(define-music-function (parser location music) (ly:music?)&lt;br /&gt;
   (music-map&lt;br /&gt;
    (lambda (evt)&lt;br /&gt;
      (when (eq? &#039;EventChord (ly:music-property evt &#039;name))&lt;br /&gt;
 	(let ((elts (ly:music-property evt &#039;elements)))&lt;br /&gt;
          (when (has-duration? (car elts))&lt;br /&gt;
            (ly:music-set-property! evt &#039;elements  (cdr elts)))))&lt;br /&gt;
      evt)&lt;br /&gt;
    music))&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
music = \relative c&#039; {&lt;br /&gt;
  &amp;lt;c e&amp;gt;4-&amp;gt; &amp;lt;d f&amp;gt;( &amp;lt;b g&#039;&amp;gt;) &amp;lt;c e&amp;gt;-. g2 c2&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
\markup { Music with chords }&lt;br /&gt;
\new Staff \music&lt;br /&gt;
&lt;br /&gt;
\markup { Music split into two staves }&lt;br /&gt;
&amp;lt;&amp;lt;&lt;br /&gt;
  \new Staff \deleteFirstNote \music&lt;br /&gt;
  \new Staff \keepOnlyFirstNote \music&lt;br /&gt;
&amp;gt;&amp;gt;&lt;br /&gt;
&amp;lt;/lilypond&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[category:Chords]]&lt;br /&gt;
[[category:Scheme]]&lt;br /&gt;
[[category:Really cool]]&lt;/div&gt;</summary>
		<author><name>Lemzwerg</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=Splitting_chords&amp;diff=6513</id>
		<title>Splitting chords</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=Splitting_chords&amp;diff=6513"/>
		<updated>2026-04-05T09:09:04Z</updated>

		<summary type="html">&lt;p&gt;Lemzwerg: Formatting, improved docstring&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This snippet is a 2009 contribution by Gilles Thibault in [https://lists.gnu.org/archive/html/lilypond-user/2009-01/msg00685.html lilypond-user]. It provides two functions to split a chord sequence into two separate voices, also preserving articulations and slurs: &amp;lt;code&amp;gt;\keepOnlyFirstNode&amp;lt;/code&amp;gt; extracts the first note (as given in the input; this is usually the lowest one) of every chord, and &amp;lt;code&amp;gt;\deleteFirstNote&amp;lt;/code&amp;gt; collects the remaining notes.&lt;br /&gt;
&lt;br /&gt;
Note that these function don&#039;t support &amp;lt;samp&amp;gt;q&amp;lt;/samp&amp;gt; to repeat the last chord.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lilypond version=&amp;quot;2.24&amp;quot;&amp;gt;&lt;br /&gt;
#(define (has-duration? music)&lt;br /&gt;
   (ly:duration? (ly:music-property music &#039;duration)))&lt;br /&gt;
&lt;br /&gt;
#(define (not-has-duration? music)&lt;br /&gt;
   (not (has-duration? music)))&lt;br /&gt;
&lt;br /&gt;
keepOnlyFirstNote =&lt;br /&gt;
#(define-music-function (parser location music) (ly:music?)&lt;br /&gt;
   (music-map&lt;br /&gt;
    (lambda (evt)&lt;br /&gt;
      (when (eq? &#039;EventChord (ly:music-property evt &#039;name))&lt;br /&gt;
	(let ((elts (ly:music-property evt &#039;elements)))&lt;br /&gt;
	  (when (has-duration? (car elts))&lt;br /&gt;
	    (ly:music-set-property!&lt;br /&gt;
	     evt &#039;elements&lt;br /&gt;
	     (cons (car elts)&lt;br /&gt;
		   (filter not-has-duration? (cdr elts)))))))&lt;br /&gt;
      evt)&lt;br /&gt;
    music))&lt;br /&gt;
&lt;br /&gt;
deleteFirstNote =&lt;br /&gt;
#(define-music-function (parser location music) (ly:music?)&lt;br /&gt;
   (music-map&lt;br /&gt;
    (lambda (evt)&lt;br /&gt;
      (when (eq? &#039;EventChord (ly:music-property evt &#039;name))&lt;br /&gt;
	(let ((elts (ly:music-property evt &#039;elements)))&lt;br /&gt;
          (when (has-duration? (car elts))&lt;br /&gt;
            (ly:music-set-property! evt &#039;elements  (cdr elts)))))&lt;br /&gt;
      evt)&lt;br /&gt;
    music))&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
music = \relative c&#039; {&lt;br /&gt;
  &amp;lt;c e&amp;gt;4-&amp;gt; &amp;lt;d f&amp;gt;( &amp;lt;b g&#039;&amp;gt;) &amp;lt;c e&amp;gt;-. g2 c2&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
\markup { Music with chords }&lt;br /&gt;
\new Staff \music&lt;br /&gt;
&lt;br /&gt;
\markup { Music split into two staffs }&lt;br /&gt;
&amp;lt;&amp;lt;&lt;br /&gt;
  \new Staff \deleteFirstNote \music&lt;br /&gt;
  \new Staff \keepOnlyFirstNote \music&lt;br /&gt;
&amp;gt;&amp;gt;&lt;br /&gt;
&amp;lt;/lilypond&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[category:Chords]]&lt;br /&gt;
[[category:Scheme]]&lt;br /&gt;
[[category:Really cool]]&lt;/div&gt;</summary>
		<author><name>Lemzwerg</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=User_talk:MartialR&amp;diff=6506</id>
		<title>User talk:MartialR</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=User_talk:MartialR&amp;diff=6506"/>
		<updated>2026-03-31T11:16:49Z</updated>

		<summary type="html">&lt;p&gt;Lemzwerg: /* Recorder diagrams */ new section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Recorder diagrams ==&lt;br /&gt;
&lt;br /&gt;
Please have a look at [https://wiki.lilypond.community/wiki/Talk:Diagram_for_Recorder_baroque_in_F_and_C#c-Lemzwerg-20260331094100-Better_markup_definitions this comment] -- [[User:Lemzwerg|Lemzwerg]] ([[User talk:Lemzwerg|talk]]) 11:16, 31 March 2026 (UTC)&lt;/div&gt;</summary>
		<author><name>Lemzwerg</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=Talk:Diagram_for_Recorder_baroque_in_F_and_C&amp;diff=6505</id>
		<title>Talk:Diagram for Recorder baroque in F and C</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=Talk:Diagram_for_Recorder_baroque_in_F_and_C&amp;diff=6505"/>
		<updated>2026-03-31T11:10:26Z</updated>

		<summary type="html">&lt;p&gt;Lemzwerg: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Better markup definitions ==&lt;br /&gt;
&lt;br /&gt;
Please ask for help on the [mailto:lilypond-user@gnu.org &#039;lilypond-user&#039; mailing list] how to write a Scheme function for defining the fingering markups, avoiding tedious repetition!  This will dramatically reduce the size of the definitions, also making them easier to maintain. -- [[User:Lemzwerg|Lemzwerg]] ([[User talk:Lemzwerg|talk]]) 09:41, 31 March 2026 (UTC)&lt;/div&gt;</summary>
		<author><name>Lemzwerg</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=Talk:Diagram_for_Recorder_baroque_in_F_and_C&amp;diff=6504</id>
		<title>Talk:Diagram for Recorder baroque in F and C</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=Talk:Diagram_for_Recorder_baroque_in_F_and_C&amp;diff=6504"/>
		<updated>2026-03-31T09:41:28Z</updated>

		<summary type="html">&lt;p&gt;Lemzwerg: /* Better markup definitions */ new section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Better markup definitions ==&lt;br /&gt;
&lt;br /&gt;
Please ask for help on the [[mailto:lilypond-user@gnu.org &#039;lilypond-user&#039; mailing list]] how to write a Scheme function for defining the fingering markups, avoiding tedious repetition!  This will dramatically reduce the size of the definitions, also making them easier to maintain. -- [[User:Lemzwerg|Lemzwerg]] ([[User talk:Lemzwerg|talk]]) 09:41, 31 March 2026 (UTC)&lt;/div&gt;</summary>
		<author><name>Lemzwerg</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=Key_signatures_for_small_staves&amp;diff=6465</id>
		<title>Key signatures for small staves</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=Key_signatures_for_small_staves&amp;diff=6465"/>
		<updated>2026-03-18T18:11:37Z</updated>

		<summary type="html">&lt;p&gt;Lemzwerg: Revised.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Traditionally, the spacing of key signatures in smaller staves is larger in comparison to full-size staves.&lt;br /&gt;
&lt;br /&gt;
Here is a function that extends &amp;lt;code&amp;gt;\magnifyStaff&amp;lt;/code&amp;gt; to automatically calculate the right key signature spacing according to the staff size.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lilypond version=&amp;quot;2.24&amp;quot;&amp;gt;&lt;br /&gt;
scaleStaff =&lt;br /&gt;
#(define-music-function (scaleFac) (number?)&lt;br /&gt;
  #{&lt;br /&gt;
    \magnifyStaff #scaleFac&lt;br /&gt;
    \override KeySignature.padding = #(* 2/3 (- 1 scaleFac))&lt;br /&gt;
  #})&lt;br /&gt;
&lt;br /&gt;
keyTest = { \key cis\major s4*4 \bar &amp;quot;&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
\markup\italic &amp;quot;Default output:&amp;quot;&lt;br /&gt;
&amp;lt;&amp;lt;&lt;br /&gt;
  \new Staff \with { \magnifyStaff #5/7 } \keyTest&lt;br /&gt;
  \new Staff \keyTest&lt;br /&gt;
&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
\markup\italic &amp;quot;Traditional output:&amp;quot;&lt;br /&gt;
&amp;lt;&amp;lt;&lt;br /&gt;
  \new Staff \with { \scaleStaff #5/7 } \keyTest&lt;br /&gt;
  \new Staff \keyTest&lt;br /&gt;
&amp;gt;&amp;gt;&lt;br /&gt;
&amp;lt;/lilypond&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Staff notation]]&lt;br /&gt;
[[Category:Vocal music]]&lt;br /&gt;
[[Category:Spacing]]&lt;br /&gt;
[[Category:Tweaks and overrides]]&lt;br /&gt;
[[Category:Specific notation]]&lt;br /&gt;
[[Category:Workaround]]&lt;br /&gt;
[[Category:Snippet]]&lt;/div&gt;</summary>
		<author><name>Lemzwerg</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=LSR_1094&amp;diff=6464</id>
		<title>LSR 1094</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=LSR_1094&amp;diff=6464"/>
		<updated>2026-03-18T17:55:16Z</updated>

		<summary type="html">&lt;p&gt;Lemzwerg: Changed redirect target from Key signature and small staff to Key signatures for small staves&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Key signatures for small staves]]&lt;/div&gt;</summary>
		<author><name>Lemzwerg</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=Key_signatures_for_small_staves&amp;diff=6463</id>
		<title>Key signatures for small staves</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=Key_signatures_for_small_staves&amp;diff=6463"/>
		<updated>2026-03-18T17:54:43Z</updated>

		<summary type="html">&lt;p&gt;Lemzwerg: Lemzwerg moved page Key signature and small staff to Key signatures for small staves without leaving a redirect&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Traditionally, smaller staves key signature spacing is slightly different than full size staves ones.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s a function that automatically calculates the right key signature spacing according to the staff size.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lilypond version=&amp;quot;2.24&amp;quot;&amp;gt;&lt;br /&gt;
%% =&amp;gt; http://lsr.di.unimi.it/LSR/Item?id=1094&lt;br /&gt;
&lt;br /&gt;
%% This extends \staffSize as defined in &lt;br /&gt;
%% &amp;quot;Changing the size of a staff with a music function&amp;quot;&lt;br /&gt;
%% http://lsr.di.unimi.it/LSR/Item?id=862&lt;br /&gt;
staffSize = #(define-music-function (new-size) (number?)&lt;br /&gt;
  #{&lt;br /&gt;
    \set fontSize = #new-size&lt;br /&gt;
    \override StaffSymbol.staff-space = #(magstep new-size)&lt;br /&gt;
    \override StaffSymbol.thickness = #(magstep new-size)&lt;br /&gt;
    \override KeySignature.padding = #(* 2/3 (- 1 (magstep new-size)))&lt;br /&gt;
  #})&lt;br /&gt;
&lt;br /&gt;
keyTest = { \key cis\major s4*4 \bar &amp;quot;&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
\markup\italic &amp;quot;Default output:&amp;quot;&lt;br /&gt;
&amp;lt;&amp;lt;&lt;br /&gt;
  \new Staff \with { &lt;br /&gt;
    fontSize = #-3&lt;br /&gt;
    \override StaffSymbol.staff-space = #(magstep -3)&lt;br /&gt;
    \override StaffSymbol.thickness = #(magstep -3)&lt;br /&gt;
  } \keyTest &lt;br /&gt;
  \new Staff \keyTest &lt;br /&gt;
  &lt;br /&gt;
&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
\markup\italic &amp;quot;Traditional output:&amp;quot;&lt;br /&gt;
&amp;lt;&amp;lt;&lt;br /&gt;
  \new Staff \with { \staffSize #-3 } \keyTest &lt;br /&gt;
  \new Staff \keyTest &lt;br /&gt;
  &lt;br /&gt;
&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
%{&lt;br /&gt;
% For v.2.19 and higher:&lt;br /&gt;
&lt;br /&gt;
scaleStaff = #(define-music-function (scaleFac) (number?)&lt;br /&gt;
                 #{&lt;br /&gt;
                   \magnifyStaff #scaleFac&lt;br /&gt;
                   \override KeySignature.padding = #(* 2/3 (- 1 scaleFac))&lt;br /&gt;
                 #})&lt;br /&gt;
&lt;br /&gt;
sizeTest = #5/7&lt;br /&gt;
keyTest = { \key cis\major s4*4 \bar &amp;quot;&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;&amp;lt;&lt;br /&gt;
  \new Staff \with { \scaleStaff #sizeTest } \keyTest&lt;br /&gt;
  \new Staff \keyTest&lt;br /&gt;
&amp;gt;&amp;gt;&lt;br /&gt;
 %}&lt;br /&gt;
&amp;lt;/lilypond&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Staff notation]]&lt;br /&gt;
[[Category:Vocal music]]&lt;br /&gt;
[[Category:Spacing]]&lt;br /&gt;
[[Category:Contexts and engravers]]&lt;br /&gt;
[[Category:Tweaks and overrides]]&lt;br /&gt;
[[Category:Specific notation]]&lt;br /&gt;
[[Category:Workaround]]&lt;br /&gt;
[[Category:Snippet]]&lt;/div&gt;</summary>
		<author><name>Lemzwerg</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=Talk:Airy_tone&amp;diff=6462</id>
		<title>Talk:Airy tone</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=Talk:Airy_tone&amp;diff=6462"/>
		<updated>2026-03-18T16:58:38Z</updated>

		<summary type="html">&lt;p&gt;Lemzwerg: /* Circles not displaying in Wiki */ Reply&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Circles not displaying in Wiki ==&lt;br /&gt;
&lt;br /&gt;
The circles are not displaying in the Wiki.  However, if I copy and paste the code and compile it locally, the circles do display.  Does anyone know how to fix this? [[User:Ksnortum|Ksnortum]] ([[User talk:Ksnortum|talk]]) 16:40, 18 March 2026 (UTC)&lt;br /&gt;
&lt;br /&gt;
:The usual thing: The code for drawing the circles is Postscript, which is not supported by the SVG backend used in the Wiki.  It should be rewritten using LilyPond drawing commands. -- [[User:Lemzwerg|Lemzwerg]] ([[User talk:Lemzwerg|talk]]) 16:58, 18 March 2026 (UTC)&lt;/div&gt;</summary>
		<author><name>Lemzwerg</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=Feta_font_chart&amp;diff=6459</id>
		<title>Feta font chart</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=Feta_font_chart&amp;diff=6459"/>
		<updated>2026-03-16T23:15:20Z</updated>

		<summary type="html">&lt;p&gt;Lemzwerg: Revised&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This chart shows all articulations or scripts that LilyPond&#039;s “feta” font contains.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lilypond version=&amp;quot;2.24&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;&amp;lt;&lt;br /&gt;
  \new Staff \relative c&#039;&#039; {&lt;br /&gt;
    c\accent              c\marcato          c\staccatissimo&lt;br /&gt;
    c\staccato            c\tenuto           c\portato&lt;br /&gt;
    c\upbow               c\downbow          c\flageolet&lt;br /&gt;
    c\thumb               c^\lheel           c\rheel&lt;br /&gt;
    c^\ltoe               c\rtoe             c\open&lt;br /&gt;
    c\stopped             c\turn             c\reverseturn&lt;br /&gt;
    c\trill               c\prall            c\mordent&lt;br /&gt;
    c\prallprall          c\prallmordent     c\upprall&lt;br /&gt;
    c\downprall           c\upmordent        c\downmordent&lt;br /&gt;
    c\pralldown           c\prallup          c\lineprall&lt;br /&gt;
    c\signumcongruentiae  c\shortfermata     c\fermata&lt;br /&gt;
    c\longfermata         c\verylongfermata  c\segno&lt;br /&gt;
    c\coda                c\varcoda&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  \new Lyrics \lyricmode {&lt;br /&gt;
    accent              marcato          staccatissimo&lt;br /&gt;
    staccato            tenuto           portato&lt;br /&gt;
    upbow               downbow          flageolet&lt;br /&gt;
    thumb               lheel            rheel&lt;br /&gt;
    ltoe                rtoe             open&lt;br /&gt;
    stopped             turn             reverseturn&lt;br /&gt;
    trill               prall            mordent&lt;br /&gt;
    prallprall          prallmordent     upprall&lt;br /&gt;
    downprall           upmordent        downmordent&lt;br /&gt;
    pralldown           prallup          lineprall&lt;br /&gt;
    signumcongruentiae  shortfermata     fermata&lt;br /&gt;
    longfermata         verylongfermata  segno&lt;br /&gt;
    coda                varcoda&lt;br /&gt;
  }&lt;br /&gt;
&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
\layout {&lt;br /&gt;
  \context {&lt;br /&gt;
    \Staff&lt;br /&gt;
    \remove Clef_engraver&lt;br /&gt;
    \remove Time_signature_engraver&lt;br /&gt;
    \remove Bar_line_engraver&lt;br /&gt;
  }&lt;br /&gt;
  \context {&lt;br /&gt;
    \Lyrics&lt;br /&gt;
    \override LyricText.font-family = #&#039;typewriter&lt;br /&gt;
    \override LyricSpace.minimum-distance = 3&lt;br /&gt;
  }&lt;br /&gt;
  \context {&lt;br /&gt;
    \Score&lt;br /&gt;
    timing = ##f&lt;br /&gt;
    forbidBreakBetweenBarLines = ##f&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lilypond&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Symbols and glyphs]]&lt;br /&gt;
[[Category:Expressive marks]]&lt;br /&gt;
[[Category:Snippet]]&lt;/div&gt;</summary>
		<author><name>Lemzwerg</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=Positioning_a_%5Cfermata_over_the_last_bar_line&amp;diff=6454</id>
		<title>Positioning a \fermata over the last bar line</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=Positioning_a_%5Cfermata_over_the_last_bar_line&amp;diff=6454"/>
		<updated>2026-03-15T16:41:23Z</updated>

		<summary type="html">&lt;p&gt;Lemzwerg: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;To position a \fermata sign over the last bar line, you must use a specially modified rehearsal mark.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lilypond version=&amp;quot;2.24&amp;quot;&amp;gt;&lt;br /&gt;
\relative c&#039;&#039; {&lt;br /&gt;
  \override Score.RehearsalMark.break-visibility = #begin-of-line-invisible&lt;br /&gt;
  c1 \mark \markup { \musicglyph &amp;quot;scripts.ufermata&amp;quot; }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lilypond&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Expressive marks]]&lt;br /&gt;
[[Category:Breaks]]&lt;br /&gt;
[[Category:Staff notation]]&lt;br /&gt;
[[Category:Workaround]]&lt;br /&gt;
[[Category:Symbols and glyphs]]&lt;br /&gt;
[[Category:Snippet]]&lt;/div&gt;</summary>
		<author><name>Lemzwerg</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=Alternate_%5CtextSpanner_engraver&amp;diff=6448</id>
		<title>Alternate \textSpanner engraver</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=Alternate_%5CtextSpanner_engraver&amp;diff=6448"/>
		<updated>2026-03-12T06:46:28Z</updated>

		<summary type="html">&lt;p&gt;Lemzwerg: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;LilyPond&#039;s default text spanner engraver can only handle a single text spanner per voice at a time.  The engraver in this snippet provides an alternate implementation to circumvent this limitation; it uses spanner IDs to specify start and end of overlapping text spanners.&lt;br /&gt;
&lt;br /&gt;
To use it, replace &amp;lt;code&amp;gt;Text_spanner_engraver&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;\alternateTextSpannerEngraver&amp;lt;/code&amp;gt;.  The example below demonstrates two possible ways to specify a spanner ID: either define a new command or use the &amp;lt;code&amp;gt;\=&amp;lt;/code&amp;gt; command to directly set the ID.&lt;br /&gt;
&lt;br /&gt;
To control the vertical order of text spanners, use the standard way of tweaking the &amp;lt;code&amp;gt;outside-staff-priority&amp;lt;/code&amp;gt; property.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lilypond version=&amp;quot;2.24&amp;quot;&amp;gt;&lt;br /&gt;
% LSR written by Dave Nalesnik&lt;br /&gt;
% LSR https://lists.gnu.org/archive/html/lilypond-user/2026-01/msg00006.html&lt;br /&gt;
&lt;br /&gt;
% Incorporating some code from the rewrite in Scheme of&lt;br /&gt;
% Text_spanner_engraver in input/regression/scheme-text-spanner.ly&lt;br /&gt;
&lt;br /&gt;
#(define (add-bound-item spanner item)&lt;br /&gt;
   (if (null? (ly:spanner-bound spanner LEFT))&lt;br /&gt;
       (ly:spanner-set-bound! spanner LEFT item)&lt;br /&gt;
       (ly:spanner-set-bound! spanner RIGHT item)))&lt;br /&gt;
&lt;br /&gt;
#(define (set-axis! grob axis)&lt;br /&gt;
   (when (not (number? (ly:grob-property grob &#039;side-axis)))&lt;br /&gt;
     (set! (ly:grob-property grob &#039;side-axis) axis)&lt;br /&gt;
     (ly:grob-chain-callback&lt;br /&gt;
      grob&lt;br /&gt;
      (if (eq? axis X)&lt;br /&gt;
          ly:side-position-interface::x-aligned-side&lt;br /&gt;
          side-position-interface::y-aligned-side)&lt;br /&gt;
      (if (eq? axis X)&lt;br /&gt;
	  &#039;X-offset&lt;br /&gt;
	  &#039;Y-offset))))&lt;br /&gt;
&lt;br /&gt;
#(define (assign-spanner-index orig-ls)&lt;br /&gt;
   &amp;quot;Determine an available position of a new spanner in an ordered&lt;br /&gt;
sequence of spanners (a list of pairs, where the car of the pair&lt;br /&gt;
gives the position).  The goal is for the sequence to begin with&lt;br /&gt;
zero and contain no gaps.  Return the index representing the&lt;br /&gt;
spanner&#039;s position.&lt;br /&gt;
&lt;br /&gt;
Examples (only showing the cars of the pairs):&lt;br /&gt;
&lt;br /&gt;
  (0 1)   =&amp;gt; 2&lt;br /&gt;
  (2 3)   =&amp;gt; 0&lt;br /&gt;
  (0 3)   =&amp;gt; 1&lt;br /&gt;
  (0 1 3) =&amp;gt; 2&lt;br /&gt;
&amp;quot;&lt;br /&gt;
   (if (null? orig-ls)&lt;br /&gt;
       0&lt;br /&gt;
       (let loop ((ls orig-ls)&lt;br /&gt;
		  (insert? #t)&lt;br /&gt;
		  (result 0))&lt;br /&gt;
         (cond&lt;br /&gt;
          ((null? ls)&lt;br /&gt;
	   result)&lt;br /&gt;
          ;; Position at head of list.&lt;br /&gt;
          ((and insert? (&amp;gt; (caar orig-ls) 0))&lt;br /&gt;
           (loop ls #f 0))&lt;br /&gt;
          ;; No gaps, put at end of list.&lt;br /&gt;
          ((and insert? (null? (cdr ls)))&lt;br /&gt;
           (loop (cdr ls) #f (1+ (caar ls))))&lt;br /&gt;
          ;; Fill lowest position of gap.&lt;br /&gt;
          ((and insert?&lt;br /&gt;
                (&amp;gt; (caadr ls) (1+ (caar ls))))&lt;br /&gt;
           (loop (cdr ls) #f (1+ (caar ls))))&lt;br /&gt;
          (else&lt;br /&gt;
	   (loop (cdr ls) insert? result))))))&lt;br /&gt;
&lt;br /&gt;
alternateTextSpannerEngraver =&lt;br /&gt;
#(lambda (context)&lt;br /&gt;
   (let (;; A list of pairs comprising a spanner index (not&lt;br /&gt;
	 ;; `spanner-id` values) and a spanner which has been begun.&lt;br /&gt;
         (spanners &#039;())&lt;br /&gt;
         (finished &#039;()) ; A list of spanners in completion stage.&lt;br /&gt;
         (start-events &#039;()) ; A list of START events.&lt;br /&gt;
         (stop-events &#039;())) ; A list of STOP events.&lt;br /&gt;
     (make-engraver&lt;br /&gt;
      ;; `\startTextSpan`, `\stopTextSpan`, and the like create&lt;br /&gt;
      ;; events which we collect here.&lt;br /&gt;
      (listeners&lt;br /&gt;
       ((text-span-event engraver event)&lt;br /&gt;
        (if (= START (ly:event-property event &#039;span-direction))&lt;br /&gt;
            (set! start-events (cons event start-events))&lt;br /&gt;
            (set! stop-events (cons event stop-events)))))&lt;br /&gt;
&lt;br /&gt;
      ;; Populate `note-columns` property of spanners.  Bounds are&lt;br /&gt;
      ;; set to note columns, and each spanner keeps a record of&lt;br /&gt;
      ;; the note columns it traverses.&lt;br /&gt;
      (acknowledgers&lt;br /&gt;
       ((note-column-interface engraver grob source-engraver)&lt;br /&gt;
        (for-each (lambda (s)&lt;br /&gt;
                    (ly:pointer-group-interface::add-grob&lt;br /&gt;
                     (cdr s) &#039;note-columns grob)&lt;br /&gt;
                    (when (null? (ly:spanner-bound (cdr s) LEFT))&lt;br /&gt;
                      (add-bound-item (cdr s) grob)))&lt;br /&gt;
		  spanners)&lt;br /&gt;
        ;; `finished` only contains spanners, no indices.&lt;br /&gt;
        (for-each (lambda (f)&lt;br /&gt;
                    (ly:pointer-group-interface::add-grob&lt;br /&gt;
                     f &#039;note-columns grob)&lt;br /&gt;
                    (when (null? (ly:spanner-bound f RIGHT))&lt;br /&gt;
                      (add-bound-item f grob)))&lt;br /&gt;
		  finished)))&lt;br /&gt;
&lt;br /&gt;
      ((process-music trans)&lt;br /&gt;
       ;; Move begun spanners from `span` to `finished`.  We do&lt;br /&gt;
       ;; this on the basis of `spanner-id`.  If we find a match&lt;br /&gt;
       ;; -- either the strings are the same, or both are unset --&lt;br /&gt;
       ;; a transfer can be made.  Return a warning if we find no&lt;br /&gt;
       ;; match: spanner hasn&#039;t been properly begun.&lt;br /&gt;
       (for-each&lt;br /&gt;
        (lambda (es)&lt;br /&gt;
          (let ((es-id (ly:event-property es &#039;spanner-id)))&lt;br /&gt;
            (let loop ((sp spanners))&lt;br /&gt;
              (if (null? sp)&lt;br /&gt;
                  (ly:warning &amp;quot;No spanner to end!&amp;quot;)&lt;br /&gt;
                  (let ((sp-id (ly:event-property&lt;br /&gt;
                                (event-cause (cdar sp))&lt;br /&gt;
				&#039;spanner-id)))&lt;br /&gt;
                    (cond&lt;br /&gt;
                     ((equal? sp-id es-id)&lt;br /&gt;
                      (set! finished (cons (cdar sp) finished))&lt;br /&gt;
                      (set! spanners&lt;br /&gt;
			    (remove (lambda (s)&lt;br /&gt;
				      (eq? s (car sp))) spanners)))&lt;br /&gt;
                     (else&lt;br /&gt;
		      (loop (cdr sp)))))))))&lt;br /&gt;
        stop-events)&lt;br /&gt;
&lt;br /&gt;
       ;; The end of our spanners can be acknowledged by other&lt;br /&gt;
       ;; engravers, thus announce them.&lt;br /&gt;
       (for-each&lt;br /&gt;
        (lambda (f)&lt;br /&gt;
          (ly:engraver-announce-end-grob trans f (event-cause f)))&lt;br /&gt;
        finished)&lt;br /&gt;
&lt;br /&gt;
       ;; Make spanners in response to START events.&lt;br /&gt;
       ;;&lt;br /&gt;
       ;; Each new spanner is assigned an index denoting its&lt;br /&gt;
       ;; position relative to other active spanners.  This is&lt;br /&gt;
       ;; enforced (for the moment) by adding a small amount to&lt;br /&gt;
       ;; the spanner&#039;s `outside-staff-priority` proportional to&lt;br /&gt;
       ;; this index.  This is unlikely to result in conflicts,&lt;br /&gt;
       ;; though a better solution may be to organize the spanners&lt;br /&gt;
       ;; by a new alignment grob.&lt;br /&gt;
       ;;&lt;br /&gt;
       ;; Also, add any existing spanners to the&lt;br /&gt;
       ;; `side-support-elements` array of the new spanner.  This&lt;br /&gt;
       ;; ensures correct ordering over line breaks when&lt;br /&gt;
       ;; `outside-staff-priority` is set to `#f` (which means&lt;br /&gt;
       ;; that it is no longer an outside-staff object -- not the&lt;br /&gt;
       ;; default).&lt;br /&gt;
       (for-each&lt;br /&gt;
        (lambda (es)&lt;br /&gt;
          (let* ((new (ly:engraver-make-grob&lt;br /&gt;
		       trans &#039;TextSpanner es))&lt;br /&gt;
                 (new-idx (assign-spanner-index spanners))&lt;br /&gt;
                 (new-osp (ly:grob-property&lt;br /&gt;
			   new &#039;outside-staff-priority))&lt;br /&gt;
                 (new-osp (if (number? new-osp)&lt;br /&gt;
                              (+ new-osp (/ new-idx 1000.0))&lt;br /&gt;
                              new-osp)))&lt;br /&gt;
            (set! (ly:grob-property&lt;br /&gt;
		   new &#039;outside-staff-priority) new-osp)&lt;br /&gt;
            (set-axis! new Y)&lt;br /&gt;
            ;; Add spanners with a lower index than the new&lt;br /&gt;
            ;; spanner to its `side-support-elements` list.  This&lt;br /&gt;
            ;; allows new spanners to fill gaps under the topmost&lt;br /&gt;
            ;; spanner.&lt;br /&gt;
            (for-each (lambda (sp)&lt;br /&gt;
			(when (&amp;lt; (car sp) new-idx)&lt;br /&gt;
			  (ly:pointer-group-interface::add-grob&lt;br /&gt;
			   new &#039;side-support-elements (cdr sp))))&lt;br /&gt;
		      spanners)&lt;br /&gt;
            (set! spanners (cons (cons new-idx new) spanners))&lt;br /&gt;
            (set! spanners (sort spanners car&amp;lt;))))&lt;br /&gt;
        start-events)&lt;br /&gt;
&lt;br /&gt;
       ;; Events have served their purpose for this timestep.&lt;br /&gt;
       ;; Clear the way for new events in later timesteps.&lt;br /&gt;
       (set! start-events &#039;())&lt;br /&gt;
       (set! stop-events &#039;()))&lt;br /&gt;
&lt;br /&gt;
      ((stop-translation-timestep trans)&lt;br /&gt;
       ;; Set bounds of spanners to `PaperColumns` grobs if they&lt;br /&gt;
       ;; haven&#039;t been set.  This allows spanners to be drawn&lt;br /&gt;
       ;; between spacers.&lt;br /&gt;
       ;;&lt;br /&gt;
       ;; Other uses?  Doesn&#039;t appear to affect whether spanners&lt;br /&gt;
       ;; can de drawn between rests.&lt;br /&gt;
       (for-each (lambda (s)&lt;br /&gt;
		   (when (null? (ly:spanner-bound (cdr s) LEFT))&lt;br /&gt;
		     (ly:spanner-set-bound!&lt;br /&gt;
		      (cdr s) LEFT&lt;br /&gt;
		      (ly:context-property context&lt;br /&gt;
					   &#039;currentMusicalColumn))))&lt;br /&gt;
		 spanners)&lt;br /&gt;
       (for-each (lambda (f)&lt;br /&gt;
		   (when (null? (ly:spanner-bound f RIGHT))&lt;br /&gt;
		     (ly:spanner-set-bound!&lt;br /&gt;
		      f RIGHT&lt;br /&gt;
		      (ly:context-property context&lt;br /&gt;
					   &#039;currentMusicalColumn))))&lt;br /&gt;
		 finished)&lt;br /&gt;
       (set! finished &#039;()))&lt;br /&gt;
&lt;br /&gt;
      ((finalize trans)&lt;br /&gt;
       ;; If spanner ends on spacer at end of context?&lt;br /&gt;
       (for-each (lambda (f)&lt;br /&gt;
                   (when (null? (ly:spanner-bound f RIGHT))&lt;br /&gt;
                     (ly:spanner-set-bound!&lt;br /&gt;
		      f RIGHT&lt;br /&gt;
                      (ly:context-property context&lt;br /&gt;
					   &#039;currentMusicalColumn))))&lt;br /&gt;
		 finished)&lt;br /&gt;
       (set! finished &#039;())&lt;br /&gt;
       ;; User didn&#039;t end spanner.&lt;br /&gt;
       (for-each (lambda (sp)&lt;br /&gt;
		   (ly:warning &amp;quot;incomplete spanner removed!&amp;quot;)&lt;br /&gt;
		   (ly:grob-suicide! (cdr sp)))&lt;br /&gt;
		 spanners)&lt;br /&gt;
       (set! spanners &#039;())))))&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%% EXAMPLE %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%&lt;br /&gt;
&lt;br /&gt;
startTextSpanOne =&lt;br /&gt;
#(make-music &#039;TextSpanEvent &#039;span-direction START &#039;spanner-id &amp;quot;1&amp;quot;)&lt;br /&gt;
stopTextSpanOne =&lt;br /&gt;
#(make-music &#039;TextSpanEvent &#039;span-direction STOP &#039;spanner-id &amp;quot;1&amp;quot;)&lt;br /&gt;
startTextSpanTwo =&lt;br /&gt;
#(make-music &#039;TextSpanEvent &#039;span-direction START &#039;spanner-id &amp;quot;2&amp;quot;)&lt;br /&gt;
stopTextSpanTwo =&lt;br /&gt;
#(make-music &#039;TextSpanEvent &#039;span-direction STOP &#039;spanner-id &amp;quot;2&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
\layout {&lt;br /&gt;
  \context {&lt;br /&gt;
    \Voice&lt;br /&gt;
    \remove Text_spanner_engraver&lt;br /&gt;
    \consists \alternateTextSpannerEngraver&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
\relative c&#039; {&lt;br /&gt;
  \override TextSpanner.style = ##f&lt;br /&gt;
  \override TextSpanner.thickness = 10&lt;br /&gt;
  % \override TextSpanner.to-barline = ##t&lt;br /&gt;
&lt;br /&gt;
  a4 \tweak color #red \startTextSpan&lt;br /&gt;
    b \tweak color #green \startTextSpanOne&lt;br /&gt;
    c \tweak color #blue \startTextSpanTwo&lt;br /&gt;
    d \=3\startTextSpan |&lt;br /&gt;
  a4\stopTextSpan&lt;br /&gt;
    b \stopTextSpanOne&lt;br /&gt;
      \tweak color #red \startTextSpan&lt;br /&gt;
    c \stopTextSpanTwo&lt;br /&gt;
      \tweak color #green \startTextSpanOne&lt;br /&gt;
    d \=3\stopTextSpan&lt;br /&gt;
      \tweak color #blue \startTextSpanTwo |&lt;br /&gt;
  a4 \=3\startTextSpan&lt;br /&gt;
    b c d | \break&lt;br /&gt;
&lt;br /&gt;
  a4 b c d |&lt;br /&gt;
  a4\stopTextSpan&lt;br /&gt;
    \stopTextSpanOne&lt;br /&gt;
    \stopTextSpanTwo&lt;br /&gt;
    \=3\stopTextSpan&lt;br /&gt;
    b &lt;br /&gt;
    c \startTextSpan&lt;br /&gt;
    d \tweak outside-staff-priority #0 \=1\startTextSpan |&lt;br /&gt;
  a4 b&lt;br /&gt;
    c \=1\stopTextSpan&lt;br /&gt;
    d \stopTextSpan |&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lilypond&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Contexts and engravers]]&lt;br /&gt;
[[Category:Editorial annotations]]&lt;br /&gt;
[[Category:Expressive marks]]&lt;br /&gt;
[[Category:Scheme]]&lt;br /&gt;
[[Category:Workaround]]&lt;br /&gt;
[[Category:Snippet]]&lt;/div&gt;</summary>
		<author><name>Lemzwerg</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=Alternate_%5CtextSpanner_engraver&amp;diff=6447</id>
		<title>Alternate \textSpanner engraver</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=Alternate_%5CtextSpanner_engraver&amp;diff=6447"/>
		<updated>2026-03-12T06:41:49Z</updated>

		<summary type="html">&lt;p&gt;Lemzwerg: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;LilyPond&#039;s default text spanner engraver can only handle a single text spanner per voice at a time.  The engraver in this snippet provides an alternate implementation to circumvent this limitation; it uses spanner IDs to specify start and end of overlapping text spanners.&lt;br /&gt;
&lt;br /&gt;
To use it, replace &amp;lt;code&amp;gt;Text_spanner_engraver&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;\alternateTextSpannerEngraver&amp;lt;/code&amp;gt;.  The example below demonstrates two possible ways to specify a spanner ID: either define a new command or use the &amp;lt;code&amp;gt;\=&amp;lt;/code&amp;gt; command to directly set the ID.&lt;br /&gt;
&lt;br /&gt;
To control the vertical order of text spanners, use the standard way of tweaking the &amp;lt;code&amp;gt;outside-staff-priority&amp;lt;/code&amp;gt; property.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lilypond version=&amp;quot;2.24&amp;quot;&amp;gt;&lt;br /&gt;
% LSR written by Dave Nalesnik&lt;br /&gt;
% LSR https://lists.gnu.org/archive/html/lilypond-user/2026-01/msg00006.html&lt;br /&gt;
&lt;br /&gt;
% Incorporating some code from the rewrite in Scheme of&lt;br /&gt;
% Text_spanner_engraver in input/regression/scheme-text-spanner.ly&lt;br /&gt;
&lt;br /&gt;
#(define (add-bound-item spanner item)&lt;br /&gt;
   (if (null? (ly:spanner-bound spanner LEFT))&lt;br /&gt;
       (ly:spanner-set-bound! spanner LEFT item)&lt;br /&gt;
       (ly:spanner-set-bound! spanner RIGHT item)))&lt;br /&gt;
&lt;br /&gt;
#(define (set-axis! grob axis)&lt;br /&gt;
   (when (not (number? (ly:grob-property grob &#039;side-axis)))&lt;br /&gt;
     (set! (ly:grob-property grob &#039;side-axis) axis)&lt;br /&gt;
     (ly:grob-chain-callback&lt;br /&gt;
      grob&lt;br /&gt;
      (if (eq? axis X)&lt;br /&gt;
          ly:side-position-interface::x-aligned-side&lt;br /&gt;
          side-position-interface::y-aligned-side)&lt;br /&gt;
      (if (eq? axis X)&lt;br /&gt;
	  &#039;X-offset&lt;br /&gt;
	  &#039;Y-offset))))&lt;br /&gt;
&lt;br /&gt;
#(define (assign-spanner-index orig-ls)&lt;br /&gt;
   &amp;quot;Determine an available position of a new spanner in an ordered&lt;br /&gt;
sequence of spanners (a list of pairs, where the car of the pair&lt;br /&gt;
gives the position).  The goal is for the sequence to begin with&lt;br /&gt;
zero and contain no gaps.  Return the index representing the&lt;br /&gt;
spanner&#039;s position.&lt;br /&gt;
&lt;br /&gt;
Examples (only showing the cars of the pairs):&lt;br /&gt;
&lt;br /&gt;
  (0 1)   =&amp;gt; 2&lt;br /&gt;
  (2 3)   =&amp;gt; 0&lt;br /&gt;
  (0 3)   =&amp;gt; 1&lt;br /&gt;
  (0 1 3) =&amp;gt; 2&lt;br /&gt;
&amp;quot;&lt;br /&gt;
   (if (null? orig-ls)&lt;br /&gt;
       0&lt;br /&gt;
       (let loop ((ls orig-ls)&lt;br /&gt;
		  (insert? #t)&lt;br /&gt;
		  (result 0))&lt;br /&gt;
         (cond&lt;br /&gt;
          ((null? ls)&lt;br /&gt;
	   result)&lt;br /&gt;
          ;; Position at head of list.&lt;br /&gt;
          ((and insert? (&amp;gt; (caar orig-ls) 0))&lt;br /&gt;
           (loop ls #f 0))&lt;br /&gt;
          ;; No gaps, put at end of list.&lt;br /&gt;
          ((and insert? (null? (cdr ls)))&lt;br /&gt;
           (loop (cdr ls) #f (1+ (caar ls))))&lt;br /&gt;
          ;; Fill lowest position of gap.&lt;br /&gt;
          ((and insert?&lt;br /&gt;
                (&amp;gt; (caadr ls) (1+ (caar ls))))&lt;br /&gt;
           (loop (cdr ls) #f (1+ (caar ls))))&lt;br /&gt;
          (else&lt;br /&gt;
	   (loop (cdr ls) insert? result))))))&lt;br /&gt;
&lt;br /&gt;
alternateTextSpannerEngraver =&lt;br /&gt;
#(lambda (context)&lt;br /&gt;
   (let (;; A list of pairs comprising a spanner index (not&lt;br /&gt;
	 ;; `spanner-id` values) and a spanner which has been begun.&lt;br /&gt;
         (spanners &#039;())&lt;br /&gt;
         (finished &#039;()) ; A list of spanners in completion stage.&lt;br /&gt;
         (start-events &#039;()) ; A list of START events.&lt;br /&gt;
         (stop-events &#039;())) ; A list of STOP events.&lt;br /&gt;
     (make-engraver&lt;br /&gt;
      ;; `\startTextSpan`, `\stopTextSpan`, and the like create&lt;br /&gt;
      ;; events which we collect here.&lt;br /&gt;
      (listeners&lt;br /&gt;
       ((text-span-event engraver event)&lt;br /&gt;
        (if (= START (ly:event-property event &#039;span-direction))&lt;br /&gt;
            (set! start-events (cons event start-events))&lt;br /&gt;
            (set! stop-events (cons event stop-events)))))&lt;br /&gt;
&lt;br /&gt;
      ;; Populate `note-columns` property of spanners.  Bounds are&lt;br /&gt;
      ;; set to note columns, and each spanner keeps a record of&lt;br /&gt;
      ;; the note columns it traverses.&lt;br /&gt;
      (acknowledgers&lt;br /&gt;
       ((note-column-interface engraver grob source-engraver)&lt;br /&gt;
        (for-each (lambda (s)&lt;br /&gt;
                    (ly:pointer-group-interface::add-grob&lt;br /&gt;
                     (cdr s) &#039;note-columns grob)&lt;br /&gt;
                    (when (null? (ly:spanner-bound (cdr s) LEFT))&lt;br /&gt;
                      (add-bound-item (cdr s) grob)))&lt;br /&gt;
		  spanners)&lt;br /&gt;
        ;; `finished` only contains spanners, no indices.&lt;br /&gt;
        (for-each (lambda (f)&lt;br /&gt;
                    (ly:pointer-group-interface::add-grob&lt;br /&gt;
                     f &#039;note-columns grob)&lt;br /&gt;
                    (when (null? (ly:spanner-bound f RIGHT))&lt;br /&gt;
                      (add-bound-item f grob)))&lt;br /&gt;
		  finished)))&lt;br /&gt;
&lt;br /&gt;
      ((process-music trans)&lt;br /&gt;
       ;; Move begun spanners from `span` to `finished`.  We do&lt;br /&gt;
       ;; this on the basis of `spanner-id`.  If we find a match&lt;br /&gt;
       ;; -- either the strings are the same, or both are unset --&lt;br /&gt;
       ;; a transfer can be made.  Return a warning if we find no&lt;br /&gt;
       ;; match: spanner hasn&#039;t been properly begun.&lt;br /&gt;
       (for-each&lt;br /&gt;
        (lambda (es)&lt;br /&gt;
          (let ((es-id (ly:event-property es &#039;spanner-id)))&lt;br /&gt;
            (let loop ((sp spanners))&lt;br /&gt;
              (if (null? sp)&lt;br /&gt;
                  (ly:warning &amp;quot;No spanner to end!&amp;quot;)&lt;br /&gt;
                  (let ((sp-id (ly:event-property&lt;br /&gt;
                                (event-cause (cdar sp))&lt;br /&gt;
				&#039;spanner-id)))&lt;br /&gt;
                    (cond&lt;br /&gt;
                     ((equal? sp-id es-id)&lt;br /&gt;
                      (set! finished (cons (cdar sp) finished))&lt;br /&gt;
                      (set! spanners&lt;br /&gt;
			    (remove (lambda (s)&lt;br /&gt;
				      (eq? s (car sp))) spanners)))&lt;br /&gt;
                     (else&lt;br /&gt;
		      (loop (cdr sp)))))))))&lt;br /&gt;
        stop-events)&lt;br /&gt;
&lt;br /&gt;
       ;; The end of our spanners can be acknowledged by other&lt;br /&gt;
       ;; engravers, thus announce them.&lt;br /&gt;
       (for-each&lt;br /&gt;
        (lambda (f)&lt;br /&gt;
          (ly:engraver-announce-end-grob trans f (event-cause f)))&lt;br /&gt;
        finished)&lt;br /&gt;
&lt;br /&gt;
       ;; Make spanners in response to START events.&lt;br /&gt;
       ;;&lt;br /&gt;
       ;; Each new spanner is assigned an index denoting its&lt;br /&gt;
       ;; position relative to other active spanners.  This is&lt;br /&gt;
       ;; enforced (for the moment) by adding a small amount to&lt;br /&gt;
       ;; the spanner&#039;s `outside-staff-priority` proportional to&lt;br /&gt;
       ;; this index.  This is unlikely to result in conflicts,&lt;br /&gt;
       ;; though a better solution may be to organize the spanners&lt;br /&gt;
       ;; by a new alignment grob.&lt;br /&gt;
       ;;&lt;br /&gt;
       ;; Also, add any existing spanners to the&lt;br /&gt;
       ;; `side-support-elements` array of the new spanner.  This&lt;br /&gt;
       ;; ensures correct ordering over line breaks when&lt;br /&gt;
       ;; `outside-staff-priority` is set to `#f` (which means&lt;br /&gt;
       ;; that it is no longer an outside-staff object -- not the&lt;br /&gt;
       ;; default).&lt;br /&gt;
       (for-each&lt;br /&gt;
        (lambda (es)&lt;br /&gt;
          (let* ((new (ly:engraver-make-grob&lt;br /&gt;
		       trans &#039;TextSpanner es))&lt;br /&gt;
                 (new-idx (assign-spanner-index spanners))&lt;br /&gt;
                 (new-osp (ly:grob-property&lt;br /&gt;
			   new &#039;outside-staff-priority))&lt;br /&gt;
                 (new-osp (if (number? new-osp)&lt;br /&gt;
                              (+ new-osp (/ new-idx 1000.0))&lt;br /&gt;
                              new-osp)))&lt;br /&gt;
            (set! (ly:grob-property&lt;br /&gt;
		   new &#039;outside-staff-priority) new-osp)&lt;br /&gt;
            (set-axis! new Y)&lt;br /&gt;
            ;; Add spanners with a lower index than the new&lt;br /&gt;
            ;; spanner to its `side-support-elements` list.  This&lt;br /&gt;
            ;; allows new spanners to fill gaps under the topmost&lt;br /&gt;
            ;; spanner.&lt;br /&gt;
            (for-each (lambda (sp)&lt;br /&gt;
			(when (&amp;lt; (car sp) new-idx)&lt;br /&gt;
			  (ly:pointer-group-interface::add-grob&lt;br /&gt;
			   new &#039;side-support-elements (cdr sp))))&lt;br /&gt;
		      spanners)&lt;br /&gt;
            (set! spanners (cons (cons new-idx new) spanners))&lt;br /&gt;
            (set! spanners (sort spanners car&amp;lt;))))&lt;br /&gt;
        start-events)&lt;br /&gt;
&lt;br /&gt;
       ;; Events have served their purpose for this timestep.&lt;br /&gt;
       ;; Clear the way for new events in later timesteps.&lt;br /&gt;
       (set! start-events &#039;())&lt;br /&gt;
       (set! stop-events &#039;()))&lt;br /&gt;
&lt;br /&gt;
      ((stop-translation-timestep trans)&lt;br /&gt;
       ;; Set bounds of spanners to `PaperColumns` grobs if they&lt;br /&gt;
       ;; haven&#039;t been set.  This allows spanners to be drawn&lt;br /&gt;
       ;; between spacers.&lt;br /&gt;
       ;;&lt;br /&gt;
       ;; Other uses?  Doesn&#039;t appear to affect whether spanners&lt;br /&gt;
       ;; can de drawn between rests.&lt;br /&gt;
       (for-each (lambda (s)&lt;br /&gt;
		   (when (null? (ly:spanner-bound (cdr s) LEFT))&lt;br /&gt;
		     (ly:spanner-set-bound!&lt;br /&gt;
		      (cdr s) LEFT&lt;br /&gt;
		      (ly:context-property context&lt;br /&gt;
					   &#039;currentMusicalColumn))))&lt;br /&gt;
		 spanners)&lt;br /&gt;
       (for-each (lambda (f)&lt;br /&gt;
		   (when (null? (ly:spanner-bound f RIGHT))&lt;br /&gt;
		     (ly:spanner-set-bound!&lt;br /&gt;
		      f RIGHT&lt;br /&gt;
		      (ly:context-property context&lt;br /&gt;
					   &#039;currentMusicalColumn))))&lt;br /&gt;
		 finished)&lt;br /&gt;
       (set! finished &#039;()))&lt;br /&gt;
&lt;br /&gt;
      ((finalize trans)&lt;br /&gt;
       ;; If spanner ends on spacer at end of context?&lt;br /&gt;
       (for-each (lambda (f)&lt;br /&gt;
                   (when (null? (ly:spanner-bound f RIGHT))&lt;br /&gt;
                     (ly:spanner-set-bound!&lt;br /&gt;
		      f RIGHT&lt;br /&gt;
                      (ly:context-property context&lt;br /&gt;
					   &#039;currentMusicalColumn))))&lt;br /&gt;
		 finished)&lt;br /&gt;
       (set! finished &#039;())&lt;br /&gt;
       ;; User didn&#039;t end spanner.&lt;br /&gt;
       (for-each (lambda (sp)&lt;br /&gt;
		   (ly:warning &amp;quot;incomplete spanner removed!&amp;quot;)&lt;br /&gt;
		   (ly:grob-suicide! (cdr sp)))&lt;br /&gt;
		 spanners)&lt;br /&gt;
       (set! spanners &#039;())))))&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%% EXAMPLE %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%&lt;br /&gt;
&lt;br /&gt;
startTextSpanOne =&lt;br /&gt;
#(make-music &#039;TextSpanEvent &#039;span-direction START &#039;spanner-id &amp;quot;1&amp;quot;)&lt;br /&gt;
stopTextSpanOne =&lt;br /&gt;
#(make-music &#039;TextSpanEvent &#039;span-direction STOP &#039;spanner-id &amp;quot;1&amp;quot;)&lt;br /&gt;
startTextSpanTwo =&lt;br /&gt;
#(make-music &#039;TextSpanEvent &#039;span-direction START &#039;spanner-id &amp;quot;2&amp;quot;)&lt;br /&gt;
stopTextSpanTwo =&lt;br /&gt;
#(make-music &#039;TextSpanEvent &#039;span-direction STOP &#039;spanner-id &amp;quot;2&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
\layout {&lt;br /&gt;
  \context {&lt;br /&gt;
    \Voice&lt;br /&gt;
    \remove #&amp;quot;Text_spanner_engraver&amp;quot;&lt;br /&gt;
    \consists \alternateTextSpannerEngraver&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
\relative c&#039; {&lt;br /&gt;
  \override TextSpanner.style = ##f&lt;br /&gt;
  \override TextSpanner.thickness = 10&lt;br /&gt;
  % \override TextSpanner.to-barline = ##t&lt;br /&gt;
&lt;br /&gt;
  a4 \tweak color #red \startTextSpan&lt;br /&gt;
    b \tweak color #green \startTextSpanOne&lt;br /&gt;
    c \tweak color #blue \startTextSpanTwo&lt;br /&gt;
    d \=3\startTextSpan |&lt;br /&gt;
  a4\stopTextSpan&lt;br /&gt;
    b \stopTextSpanOne&lt;br /&gt;
      \tweak color #red \startTextSpan&lt;br /&gt;
    c \stopTextSpanTwo&lt;br /&gt;
      \tweak color #green \startTextSpanOne&lt;br /&gt;
    d \=3\stopTextSpan&lt;br /&gt;
      \tweak color #blue \startTextSpanTwo |&lt;br /&gt;
  a4 \=3\startTextSpan&lt;br /&gt;
    b c d | \break&lt;br /&gt;
&lt;br /&gt;
  a4 b c d |&lt;br /&gt;
  a4\stopTextSpan&lt;br /&gt;
    \stopTextSpanOne&lt;br /&gt;
    \stopTextSpanTwo&lt;br /&gt;
    \=3\stopTextSpan&lt;br /&gt;
    b &lt;br /&gt;
    c \startTextSpan&lt;br /&gt;
    d \tweak outside-staff-priority #0 \=1\startTextSpan |&lt;br /&gt;
  a4 b&lt;br /&gt;
    c \=1\stopTextSpan&lt;br /&gt;
    d \stopTextSpan |&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lilypond&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Contexts and engravers]]&lt;br /&gt;
[[Category:Editorial annotations]]&lt;br /&gt;
[[Category:Expressive marks]]&lt;br /&gt;
[[Category:Scheme]]&lt;br /&gt;
[[Category:Workaround]]&lt;br /&gt;
[[Category:Snippet]]&lt;/div&gt;</summary>
		<author><name>Lemzwerg</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=Alternate_%5CtextSpanner_engraver&amp;diff=6446</id>
		<title>Alternate \textSpanner engraver</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=Alternate_%5CtextSpanner_engraver&amp;diff=6446"/>
		<updated>2026-03-11T08:15:18Z</updated>

		<summary type="html">&lt;p&gt;Lemzwerg: Created page with &amp;quot;LilyPond&amp;#039;s default text spanner engraver can only handle a single text spanner per voice at a time.  The engraver in this snippet provides an alternate implementation to circumvent this limitation; it uses spanner IDs to specify start and end of overlapping text spanners.  To use it, replace &amp;lt;code&amp;gt;Text_spanner_engraver&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;\alternateTextSpannerEngraver&amp;lt;/code&amp;gt;.  The example below demonstrates two possible ways to specify a spanner ID: either define a new com...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;LilyPond&#039;s default text spanner engraver can only handle a single text spanner per voice at a time.  The engraver in this snippet provides an alternate implementation to circumvent this limitation; it uses spanner IDs to specify start and end of overlapping text spanners.&lt;br /&gt;
&lt;br /&gt;
To use it, replace &amp;lt;code&amp;gt;Text_spanner_engraver&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;\alternateTextSpannerEngraver&amp;lt;/code&amp;gt;.  The example below demonstrates two possible ways to specify a spanner ID: either define a new command or use the &amp;lt;code&amp;gt;\=&amp;lt;/code&amp;gt; command to directly set the ID.&lt;br /&gt;
&lt;br /&gt;
To control the vertical order of text spanners, use the standard way of tweaking the &amp;lt;code&amp;gt;outside-staff-priority&amp;lt;/code&amp;gt; property.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lilypond version=&amp;quot;2.24&amp;quot;&amp;gt;&lt;br /&gt;
% LSR written by Dave Nalesnik&lt;br /&gt;
% LSR https://lists.gnu.org/archive/html/lilypond-user/2026-01/msg00006.html&lt;br /&gt;
&lt;br /&gt;
% Incorporating some code from the rewrite in Scheme of&lt;br /&gt;
% Text_spanner_engraver in input/regression/scheme-text-spanner.ly&lt;br /&gt;
&lt;br /&gt;
#(define (add-bound-item spanner item)&lt;br /&gt;
   (if (null? (ly:spanner-bound spanner LEFT))&lt;br /&gt;
       (ly:spanner-set-bound! spanner LEFT item)&lt;br /&gt;
       (ly:spanner-set-bound! spanner RIGHT item)))&lt;br /&gt;
&lt;br /&gt;
#(define (set-axis! grob axis)&lt;br /&gt;
   (when (not (number? (ly:grob-property grob &#039;side-axis)))&lt;br /&gt;
     (set! (ly:grob-property grob &#039;side-axis) axis)&lt;br /&gt;
     (ly:grob-chain-callback&lt;br /&gt;
      grob&lt;br /&gt;
      (if (eq? axis X)&lt;br /&gt;
          ly:side-position-interface::x-aligned-side&lt;br /&gt;
          side-position-interface::y-aligned-side)&lt;br /&gt;
      (if (eq? axis X)&lt;br /&gt;
	  &#039;X-offset&lt;br /&gt;
	  &#039;Y-offset))))&lt;br /&gt;
&lt;br /&gt;
#(define (assign-spanner-index orig-ls)&lt;br /&gt;
   &amp;quot;Determine an available position of a new spanner in an ordered&lt;br /&gt;
sequence of spanners (a list of pairs, where the car of the pair&lt;br /&gt;
gives the position).  The goal is for the sequence to begin with&lt;br /&gt;
zero and contain no gaps.  Return the index representing the&lt;br /&gt;
spanner&#039;s position.&lt;br /&gt;
&lt;br /&gt;
Examples (only showing the cars of the pairs):&lt;br /&gt;
&lt;br /&gt;
  (0 1)   =&amp;gt; 2&lt;br /&gt;
  (2 3)   =&amp;gt; 0&lt;br /&gt;
  (0 3)   =&amp;gt; 1&lt;br /&gt;
  (0 1 3) =&amp;gt; 2&lt;br /&gt;
&amp;quot;&lt;br /&gt;
   (if (null? orig-ls)&lt;br /&gt;
       0&lt;br /&gt;
       (let loop ((ls orig-ls)&lt;br /&gt;
		  (insert? #t)&lt;br /&gt;
		  (result 0))&lt;br /&gt;
         (cond&lt;br /&gt;
          ((null? ls)&lt;br /&gt;
	   result)&lt;br /&gt;
          ;; Position at head of list.&lt;br /&gt;
          ((and insert? (&amp;gt; (caar orig-ls) 0))&lt;br /&gt;
           (loop ls #f 0))&lt;br /&gt;
          ;; No gaps, put at end of list.&lt;br /&gt;
          ((and insert? (null? (cdr ls)))&lt;br /&gt;
           (loop (cdr ls) #f (1+ (caar ls))))&lt;br /&gt;
          ;; Fill lowest position of gap.&lt;br /&gt;
          ((and insert?&lt;br /&gt;
                (&amp;gt; (caadr ls) (1+ (caar ls))))&lt;br /&gt;
           (loop (cdr ls) #f (1+ (caar ls))))&lt;br /&gt;
          (else&lt;br /&gt;
	   (loop (cdr ls) insert? result))))))&lt;br /&gt;
&lt;br /&gt;
alternateTextSpannerEngraver =&lt;br /&gt;
#(lambda (context)&lt;br /&gt;
   (let (;; A list of pairs comprising a spanner index (not&lt;br /&gt;
	 ;; `spanner-id` values) and a spanner which has been begun.&lt;br /&gt;
         (spanners &#039;())&lt;br /&gt;
         (finished &#039;()) ; A list of spanners in completion stage.&lt;br /&gt;
         (start-events &#039;()) ; A list of START events.&lt;br /&gt;
         (stop-events &#039;())) ; A list of STOP events.&lt;br /&gt;
     (make-engraver&lt;br /&gt;
      ;; `\startTextSpan`, `\stopTextSpan`, and the like create&lt;br /&gt;
      ;; events which we collect here.&lt;br /&gt;
      (listeners&lt;br /&gt;
       ((text-span-event engraver event)&lt;br /&gt;
        (if (= START (ly:event-property event &#039;span-direction))&lt;br /&gt;
            (set! start-events (cons event start-events))&lt;br /&gt;
            (set! stop-events (cons event stop-events)))))&lt;br /&gt;
&lt;br /&gt;
      ;; Populate `note-columns` property of spanners.  Bounds are&lt;br /&gt;
      ;; set to note columns, and each spanner keeps a record of&lt;br /&gt;
      ;; the note columns it traverses.&lt;br /&gt;
      (acknowledgers&lt;br /&gt;
       ((note-column-interface engraver grob source-engraver)&lt;br /&gt;
        (for-each (lambda (s)&lt;br /&gt;
                    (ly:pointer-group-interface::add-grob&lt;br /&gt;
                     (cdr s) &#039;note-columns grob)&lt;br /&gt;
                    (when (null? (ly:spanner-bound (cdr s) LEFT))&lt;br /&gt;
                      (add-bound-item (cdr s) grob)))&lt;br /&gt;
		  spanners)&lt;br /&gt;
        ;; `finished` only contains spanners, no indices.&lt;br /&gt;
        (for-each (lambda (f)&lt;br /&gt;
                    (ly:pointer-group-interface::add-grob&lt;br /&gt;
                     f &#039;note-columns grob)&lt;br /&gt;
                    (when (null? (ly:spanner-bound f RIGHT))&lt;br /&gt;
                      (add-bound-item f grob)))&lt;br /&gt;
		  finished)))&lt;br /&gt;
&lt;br /&gt;
      ((process-music trans)&lt;br /&gt;
       ;; Move begun spanners from `span` to `finished`.  We do&lt;br /&gt;
       ;; this on the basis of `spanner-id`.  If we find a match&lt;br /&gt;
       ;; -- either the strings are the same, or both are unset --&lt;br /&gt;
       ;; a transfer can be made.  Return a warning if we find no&lt;br /&gt;
       ;; match: spanner hasn&#039;t been properly begun.&lt;br /&gt;
       (for-each&lt;br /&gt;
        (lambda (es)&lt;br /&gt;
          (let ((es-id (ly:event-property es &#039;spanner-id)))&lt;br /&gt;
            (let loop ((sp spanners))&lt;br /&gt;
              (if (null? sp)&lt;br /&gt;
                  (ly:warning &amp;quot;No spanner to end!&amp;quot;)&lt;br /&gt;
                  (let ((sp-id (ly:event-property&lt;br /&gt;
                                (event-cause (cdar sp))&lt;br /&gt;
				&#039;spanner-id)))&lt;br /&gt;
                    (cond&lt;br /&gt;
                     ((equal? sp-id es-id)&lt;br /&gt;
                      (set! finished (cons (cdar sp) finished))&lt;br /&gt;
                      (set! spanners&lt;br /&gt;
			    (remove (lambda (s)&lt;br /&gt;
				      (eq? s (car sp))) spanners)))&lt;br /&gt;
                     (else&lt;br /&gt;
		      (loop (cdr sp)))))))))&lt;br /&gt;
        stop-events)&lt;br /&gt;
&lt;br /&gt;
       ;; The end of our spanners can be acknowledged by other&lt;br /&gt;
       ;; engravers, thus announce them.&lt;br /&gt;
       (for-each&lt;br /&gt;
        (lambda (f)&lt;br /&gt;
          (ly:engraver-announce-end-grob trans f (event-cause f)))&lt;br /&gt;
        finished)&lt;br /&gt;
&lt;br /&gt;
       ;; Make spanners in response to START events.&lt;br /&gt;
       ;;&lt;br /&gt;
       ;; Each new spanner is assigned an index denoting its&lt;br /&gt;
       ;; position relative to other active spanners.  This is&lt;br /&gt;
       ;; enforced (for the moment) by adding a small amount to&lt;br /&gt;
       ;; the spanner&#039;s `outside-staff-priority` proportional to&lt;br /&gt;
       ;; this index.  This is unlikely to result in conflicts,&lt;br /&gt;
       ;; though a better solution may be to organize the spanners&lt;br /&gt;
       ;; by a new alignment grob.&lt;br /&gt;
       ;;&lt;br /&gt;
       ;; Also, add any existing spanners to the&lt;br /&gt;
       ;; `side-support-elements` array of the new spanner.  This&lt;br /&gt;
       ;; ensures correct ordering over line breaks when&lt;br /&gt;
       ;; `outside-staff-priority` is set to `#f` (which means&lt;br /&gt;
       ;; that it is no longer an outside-staff object -- not the&lt;br /&gt;
       ;; default).&lt;br /&gt;
       (for-each&lt;br /&gt;
        (lambda (es)&lt;br /&gt;
          (let* ((new (ly:engraver-make-grob&lt;br /&gt;
		       trans &#039;TextSpanner es))&lt;br /&gt;
                 (new-idx (assign-spanner-index spanners))&lt;br /&gt;
                 (new-osp (ly:grob-property&lt;br /&gt;
			   new &#039;outside-staff-priority))&lt;br /&gt;
                 (new-osp (if (number? new-osp)&lt;br /&gt;
                              (+ new-osp (/ new-idx 1000.0))&lt;br /&gt;
                              new-osp)))&lt;br /&gt;
            (set! (ly:grob-property&lt;br /&gt;
		   new &#039;outside-staff-priority) new-osp)&lt;br /&gt;
            (set-axis! new Y)&lt;br /&gt;
            ;; Add spanners with a lower index than the new&lt;br /&gt;
            ;; spanner to its `side-support-elements` list.  This&lt;br /&gt;
            ;; allows new spanners to fill gaps under the topmost&lt;br /&gt;
            ;; spanner.&lt;br /&gt;
            (for-each (lambda (sp)&lt;br /&gt;
			(when (&amp;lt; (car sp) new-idx)&lt;br /&gt;
			  (ly:pointer-group-interface::add-grob&lt;br /&gt;
			   new &#039;side-support-elements (cdr sp))))&lt;br /&gt;
		      spanners)&lt;br /&gt;
            (set! spanners (cons (cons new-idx new) spanners))&lt;br /&gt;
            (set! spanners&lt;br /&gt;
                  (sort spanners (lambda (x y)&lt;br /&gt;
				   (&amp;lt; (car x) (car y)))))))&lt;br /&gt;
        start-events)&lt;br /&gt;
&lt;br /&gt;
       ;; Events have served their purpose for this timestep.&lt;br /&gt;
       ;; Clear the way for new events in later timesteps.&lt;br /&gt;
       (set! start-events &#039;())&lt;br /&gt;
       (set! stop-events &#039;()))&lt;br /&gt;
&lt;br /&gt;
      ((stop-translation-timestep trans)&lt;br /&gt;
       ;; Set bounds of spanners to `PaperColumns` grobs if they&lt;br /&gt;
       ;; haven&#039;t been set.  This allows spanners to be drawn&lt;br /&gt;
       ;; between spacers.&lt;br /&gt;
       ;;&lt;br /&gt;
       ;; Other uses?  Doesn&#039;t appear to affect whether spanners&lt;br /&gt;
       ;; can de drawn between rests.&lt;br /&gt;
       (for-each (lambda (s)&lt;br /&gt;
		   (when (null? (ly:spanner-bound (cdr s) LEFT))&lt;br /&gt;
		     (ly:spanner-set-bound!&lt;br /&gt;
		      (cdr s) LEFT&lt;br /&gt;
		      (ly:context-property context&lt;br /&gt;
					   &#039;currentMusicalColumn))))&lt;br /&gt;
		 spanners)&lt;br /&gt;
       (for-each (lambda (f)&lt;br /&gt;
		   (when (null? (ly:spanner-bound f RIGHT))&lt;br /&gt;
		     (ly:spanner-set-bound!&lt;br /&gt;
		      f RIGHT&lt;br /&gt;
		      (ly:context-property context&lt;br /&gt;
					   &#039;currentMusicalColumn))))&lt;br /&gt;
		 finished)&lt;br /&gt;
       (set! finished &#039;()))&lt;br /&gt;
&lt;br /&gt;
      ((finalize trans)&lt;br /&gt;
       ;; If spanner ends on spacer at end of context?&lt;br /&gt;
       (for-each (lambda (f)&lt;br /&gt;
                   (when (null? (ly:spanner-bound f RIGHT))&lt;br /&gt;
                     (ly:spanner-set-bound!&lt;br /&gt;
		      f RIGHT&lt;br /&gt;
                      (ly:context-property context&lt;br /&gt;
					   &#039;currentMusicalColumn))))&lt;br /&gt;
		 finished)&lt;br /&gt;
       (set! finished &#039;())&lt;br /&gt;
       ;; User didn&#039;t end spanner.&lt;br /&gt;
       (for-each (lambda (sp)&lt;br /&gt;
		   (ly:warning &amp;quot;incomplete spanner removed!&amp;quot;)&lt;br /&gt;
		   (ly:grob-suicide! (cdr sp)))&lt;br /&gt;
		 spanners)&lt;br /&gt;
       (set! spanners &#039;())))))&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%% EXAMPLE %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%&lt;br /&gt;
&lt;br /&gt;
startTextSpanOne =&lt;br /&gt;
#(make-music &#039;TextSpanEvent &#039;span-direction START &#039;spanner-id &amp;quot;1&amp;quot;)&lt;br /&gt;
stopTextSpanOne =&lt;br /&gt;
#(make-music &#039;TextSpanEvent &#039;span-direction STOP &#039;spanner-id &amp;quot;1&amp;quot;)&lt;br /&gt;
startTextSpanTwo =&lt;br /&gt;
#(make-music &#039;TextSpanEvent &#039;span-direction START &#039;spanner-id &amp;quot;2&amp;quot;)&lt;br /&gt;
stopTextSpanTwo =&lt;br /&gt;
#(make-music &#039;TextSpanEvent &#039;span-direction STOP &#039;spanner-id &amp;quot;2&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
\layout {&lt;br /&gt;
  \context {&lt;br /&gt;
    \Voice&lt;br /&gt;
    \remove #&amp;quot;Text_spanner_engraver&amp;quot;&lt;br /&gt;
    \consists \alternateTextSpannerEngraver&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
\relative c&#039; {&lt;br /&gt;
  \override TextSpanner.style = ##f&lt;br /&gt;
  \override TextSpanner.thickness = 10&lt;br /&gt;
  % \override TextSpanner.to-barline = ##t&lt;br /&gt;
&lt;br /&gt;
  a4 \tweak color #red \startTextSpan&lt;br /&gt;
    b \tweak color #green \startTextSpanOne&lt;br /&gt;
    c \tweak color #blue \startTextSpanTwo&lt;br /&gt;
    d \=3\startTextSpan |&lt;br /&gt;
  a4\stopTextSpan&lt;br /&gt;
    b \stopTextSpanOne&lt;br /&gt;
      \tweak color #red \startTextSpan&lt;br /&gt;
    c \stopTextSpanTwo&lt;br /&gt;
      \tweak color #green \startTextSpanOne&lt;br /&gt;
    d \=3\stopTextSpan&lt;br /&gt;
      \tweak color #blue \startTextSpanTwo |&lt;br /&gt;
  a4 \=3\startTextSpan&lt;br /&gt;
    b c d | \break&lt;br /&gt;
&lt;br /&gt;
  a4 b c d |&lt;br /&gt;
  a4\stopTextSpan&lt;br /&gt;
    \stopTextSpanOne&lt;br /&gt;
    \stopTextSpanTwo&lt;br /&gt;
    \=3\stopTextSpan&lt;br /&gt;
    b &lt;br /&gt;
    c \startTextSpan&lt;br /&gt;
    d \tweak outside-staff-priority #0 \=1\startTextSpan |&lt;br /&gt;
  a4 b&lt;br /&gt;
    c \=1\stopTextSpan&lt;br /&gt;
    d \stopTextSpan |&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lilypond&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Contexts and engravers]]&lt;br /&gt;
[[Category:Editorial annotations]]&lt;br /&gt;
[[Category:Expressive marks]]&lt;br /&gt;
[[Category:Scheme]]&lt;br /&gt;
[[Category:Workaround]]&lt;br /&gt;
[[Category:Snippet]]&lt;/div&gt;</summary>
		<author><name>Lemzwerg</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=Making_cross-staff_beams_look_better&amp;diff=6445</id>
		<title>Making cross-staff beams look better</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=Making_cross-staff_beams_look_better&amp;diff=6445"/>
		<updated>2026-03-11T08:10:11Z</updated>

		<summary type="html">&lt;p&gt;Lemzwerg: Improve&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Cross-staff beams might be very steep, which can be ugly sometimes.  This snippet demonstrates how to change that.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lilypond version=&amp;quot;2.24&amp;quot;&amp;gt;&lt;br /&gt;
\score {&lt;br /&gt;
  \new PianoStaff &amp;lt;&amp;lt;&lt;br /&gt;
   \new Staff = &amp;quot;RH&amp;quot; { \clef treble \time 3/4 s2.*2 }&lt;br /&gt;
   \new Staff = &amp;quot;LH&amp;quot; { \clef bass   \time 3/4 s2.*2 }&lt;br /&gt;
   \context Staff = LH&lt;br /&gt;
    \relative c&#039; {&lt;br /&gt;
     \stemDown&lt;br /&gt;
     c,8 [ g&#039;&lt;br /&gt;
       \change Staff = RH&lt;br /&gt;
       d&#039; a&#039; e&#039; b&#039; ] |&lt;br /&gt;
     \override Beam.concaveness = #1&lt;br /&gt;
     b [ e, a, d,&lt;br /&gt;
       \change Staff = LH&lt;br /&gt;
       g, c, ] |&lt;br /&gt;
   }&lt;br /&gt;
  &amp;gt;&amp;gt;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
% Prevent bad cropping.&lt;br /&gt;
\markup \null&lt;br /&gt;
&amp;lt;/lilypond&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Keyboards]]&lt;br /&gt;
[[Category:Workaround]]&lt;br /&gt;
[[Category:Version-specific]]&lt;br /&gt;
[[Category:Snippet]]&lt;/div&gt;</summary>
		<author><name>Lemzwerg</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=Making_cross-staff_beams_look_better&amp;diff=6444</id>
		<title>Making cross-staff beams look better</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=Making_cross-staff_beams_look_better&amp;diff=6444"/>
		<updated>2026-03-11T08:05:13Z</updated>

		<summary type="html">&lt;p&gt;Lemzwerg: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Cross-staff beams may not look always good; this snippet demonstrates how to get better results.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lilypond version=&amp;quot;2.24&amp;quot;&amp;gt;&lt;br /&gt;
\score {&lt;br /&gt;
  \new PianoStaff &amp;lt;&amp;lt;&lt;br /&gt;
   \new Staff = &amp;quot;RH&amp;quot; { \clef treble \time 3/4 s2.*2 }&lt;br /&gt;
   \new Staff = &amp;quot;LH&amp;quot; { \clef bass   \time 3/4 s2.*2 }&lt;br /&gt;
   \context Staff = LH&lt;br /&gt;
    \relative c&#039; {&lt;br /&gt;
     \stemDown % Change into \stemUp to fix the bug&lt;br /&gt;
     c,8 [ g&#039;&lt;br /&gt;
     \change Staff = RH&lt;br /&gt;
     d&#039; a&#039; e&#039; b&#039; ]&lt;br /&gt;
     % This makes the second beam look much better.&lt;br /&gt;
     \override Beam.concaveness = #0&lt;br /&gt;
     b [ e, a, d,&lt;br /&gt;
     \change Staff = LH&lt;br /&gt;
     g, c, ]&lt;br /&gt;
   }&lt;br /&gt;
  &amp;gt;&amp;gt;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
% Prevent bad cropping.&lt;br /&gt;
\markup \null&lt;br /&gt;
&amp;lt;/lilypond&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Keyboards]]&lt;br /&gt;
[[Category:Workaround]]&lt;br /&gt;
[[Category:Version-specific]]&lt;br /&gt;
[[Category:Snippet]]&lt;/div&gt;</summary>
		<author><name>Lemzwerg</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=Fingering_spanner&amp;diff=6443</id>
		<title>Fingering spanner</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=Fingering_spanner&amp;diff=6443"/>
		<updated>2026-03-11T06:41:51Z</updated>

		<summary type="html">&lt;p&gt;Lemzwerg: Revise&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Draw a straight or dashed line between two fingerings.&lt;br /&gt;
&lt;br /&gt;
Syntax is&lt;br /&gt;
&lt;br /&gt;
 -\guide &amp;lt;var&amp;gt;dashed?&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;offset&amp;lt;/var&amp;gt; -&amp;lt;var&amp;gt;f&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If Boolean argument &amp;lt;var&amp;gt;dashed?&amp;lt;/var&amp;gt; is set to &amp;lt;code&amp;gt;#t&amp;lt;/code&amp;gt;, draw a dashed line.  The target fingering number is given by &amp;lt;var&amp;gt;f&amp;lt;/var&amp;gt;, the offset from &amp;lt;var&amp;gt;f&amp;lt;/var&amp;gt; to the start fingering is &amp;lt;var&amp;gt;offset&amp;lt;/var&amp;gt;, which is coordinate pair (the X-value of this pair is thus always negative).&lt;br /&gt;
&lt;br /&gt;
This function should be only used after the complete music has been typeset.  Any change in the formatting will make the X-offsets invalid.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lilypond version=&amp;quot;2.24&amp;quot;&amp;gt;&lt;br /&gt;
% LSR Credits: PPS in May 2015&lt;br /&gt;
&lt;br /&gt;
guide =&lt;br /&gt;
#(define-music-function (dashed? coord fingering) &lt;br /&gt;
  (boolean? pair? ly:music?)&lt;br /&gt;
  &amp;quot;Make a line or dashed spanner, starting from the end &lt;br /&gt;
   fingering and ending at the start fingering.&lt;br /&gt;
   One should define the ending point with x and y coordinates.&amp;quot;&lt;br /&gt;
  (let ((fingering-ev (make-music &#039;FingeringEvent))&lt;br /&gt;
        (finger (ly:music-property fingering &#039;digit)))&lt;br /&gt;
    #{&lt;br /&gt;
      \tweak stencil&lt;br /&gt;
        #(lambda (grob)&lt;br /&gt;
          (grob-interpret-markup grob&lt;br /&gt;
            #{ &lt;br /&gt;
              \markup &lt;br /&gt;
                \concat {&lt;br /&gt;
            	  \line {&lt;br /&gt;
            	    \translate #&#039;(0 . 0.5)&lt;br /&gt;
            	    \override #&#039;(thickness . 1.3)&lt;br /&gt;
            	    \with-dimensions #&#039;(0 . 0) #&#039;(0 . 0)&lt;br /&gt;
            	    #(if dashed?&lt;br /&gt;
            	         #{&lt;br /&gt;
            	           \markup&lt;br /&gt;
            	             \override #&#039;(on . 0.8)&lt;br /&gt;
            	             \override #&#039;(off . 0.4)&lt;br /&gt;
            	             \draw-dashed-line $coord &lt;br /&gt;
            	         #}&lt;br /&gt;
            	         #{ \markup \draw-line $coord #})&lt;br /&gt;
            	  }&lt;br /&gt;
            	  \hspace #0.4&lt;br /&gt;
            	  #(number-&amp;gt;string finger)&lt;br /&gt;
            	}&lt;br /&gt;
            #}))&lt;br /&gt;
        $fingering-ev&lt;br /&gt;
    #}))&lt;br /&gt;
&lt;br /&gt;
%%%% Test:&lt;br /&gt;
voiceI = {&lt;br /&gt;
  \set fingeringOrientations = #&#039;(up)&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;cis&#039;-3&amp;gt;16 &amp;lt;e&#039;-0&amp;gt; &amp;lt;a-2&amp;gt; b &lt;br /&gt;
    &amp;lt;c&#039;-\guide ##f #&#039;(-4 . 1) -2&lt;br /&gt;
       -1&amp;gt;8 &lt;br /&gt;
    cis&#039; d&#039; dis&#039; e&#039; f&#039; | &lt;br /&gt;
  fis&#039; g&#039;&lt;br /&gt;
    &amp;lt;gis&#039;-\guide ##t #&#039;(-39.5 . -2.5) -2&lt;br /&gt;
         -\guide ##t #&#039;(-39.5 . -2.5) -1&amp;gt; &lt;br /&gt;
    &amp;lt;a&#039;-3&lt;br /&gt;
       -\guide ##f #&#039;(-3.5 . -0.2) -1&amp;gt; bes&#039; b&#039;&lt;br /&gt;
    &amp;lt;c&#039;&#039;-\guide ##t #&#039;(-13 . -0.8) -3&lt;br /&gt;
        -\guide ##t #&#039;(-13 . -0.8) -1&amp;gt; &lt;br /&gt;
    &amp;lt;cis&#039;&#039;-2-4&amp;gt; |&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
voiceII = {&lt;br /&gt;
  r4 a16 a, ais a, b a, bis a, cis&#039; a, d&#039; a, | &lt;br /&gt;
  dis&#039; a, e&#039; a, eis&#039; a, fis&#039; a, g&#039; a, gis&#039; a, a&#039; a, g&#039; a, |&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
  \clef &amp;quot;G_8&amp;quot; &lt;br /&gt;
  \key d \major&lt;br /&gt;
  &amp;lt;&amp;lt; \voiceI \\ \voiceII &amp;gt;&amp;gt; &lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lilypond&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Editorial annotations]]&lt;br /&gt;
[[Category:Snippet]]&lt;/div&gt;</summary>
		<author><name>Lemzwerg</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=Indicating_cross-staff_chords_with_a_bracket&amp;diff=6435</id>
		<title>Indicating cross-staff chords with a bracket</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=Indicating_cross-staff_chords_with_a_bracket&amp;diff=6435"/>
		<updated>2026-03-10T06:19:36Z</updated>

		<summary type="html">&lt;p&gt;Lemzwerg: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A non-arpeggiato bracket can indicate that notes on two different staves are to be played with the same hand. In order to do this, the &amp;lt;code&amp;gt;PianoStaff&amp;lt;/code&amp;gt; must be set to accept cross-staff arpeggios, and the arpeggios must be set to the bracket shape in the &amp;lt;code&amp;gt;PianoStaff&amp;lt;/code&amp;gt; context.&lt;br /&gt;
&lt;br /&gt;
The following example typesets measure&amp;amp;nbsp;65 of Debussy’s prelude &#039;&#039;Les collines d&#039;Anacapri&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lilypond version=&amp;quot;2.24&amp;quot;&amp;gt;&lt;br /&gt;
\new PianoStaff &amp;lt;&amp;lt;&lt;br /&gt;
  \set PianoStaff.connectArpeggios = ##t&lt;br /&gt;
  \override PianoStaff.Arpeggio.stencil =&lt;br /&gt;
    #ly:arpeggio::brew-chord-bracket&lt;br /&gt;
&lt;br /&gt;
  \new Staff \relative c&#039; {&lt;br /&gt;
    \key b \major&lt;br /&gt;
    \time 6/8&lt;br /&gt;
    b8-.(\arpeggio fis&#039;-.\&amp;gt; cis-.&lt;br /&gt;
      e-. gis-. b-.)\!\fermata^\laissezVibrer \bar &amp;quot;||&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  \new Staff \relative c&#039; {&lt;br /&gt;
    \clef bass&lt;br /&gt;
    \key b \major&lt;br /&gt;
    &amp;lt;&amp;lt; { &amp;lt;a e cis&amp;gt;2.\arpeggio } \\&lt;br /&gt;
       { &amp;lt;a, e a,&amp;gt;2. } &amp;gt;&amp;gt;&lt;br /&gt;
  }&lt;br /&gt;
&amp;gt;&amp;gt;&lt;br /&gt;
&amp;lt;/lilypond&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Keyboards]]&lt;br /&gt;
[[Category:Real music]]&lt;br /&gt;
[[Category:Included in the official documentation]]&lt;br /&gt;
[[Category:Snippet]]&lt;/div&gt;</summary>
		<author><name>Lemzwerg</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=LSR_466&amp;diff=6434</id>
		<title>LSR 466</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=LSR_466&amp;diff=6434"/>
		<updated>2026-03-10T06:16:54Z</updated>

		<summary type="html">&lt;p&gt;Lemzwerg: Changed redirect target from Indicating cross-staff chords with arpeggio bracket to Indicating cross-staff chords with a bracket&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Indicating cross-staff chords with a bracket]]&lt;/div&gt;</summary>
		<author><name>Lemzwerg</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=Indicating_cross-staff_chords_with_a_bracket&amp;diff=6433</id>
		<title>Indicating cross-staff chords with a bracket</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=Indicating_cross-staff_chords_with_a_bracket&amp;diff=6433"/>
		<updated>2026-03-10T06:16:24Z</updated>

		<summary type="html">&lt;p&gt;Lemzwerg: Lemzwerg moved page Indicating cross-staff chords with arpeggio bracket to Indicating cross-staff chords with a bracket without leaving a redirect: Synchronize with LilyPond git repository&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;An arpeggio bracket can indicate that notes on two different staves are to be played with the same hand. In order to do this, the &amp;lt;code&amp;gt;PianoStaff&amp;lt;/code&amp;gt; must be set to accept cross-staff arpeggios, and the arpeggios must be set to the bracket shape in the &amp;lt;code&amp;gt;PianoStaff&amp;lt;/code&amp;gt; context.&lt;br /&gt;
&lt;br /&gt;
The following example typesets measure&amp;amp;nbsp;65 of Debussy’s prelude &#039;&#039;Les collines d&#039;Anacapri&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lilypond version=&amp;quot;2.24&amp;quot;&amp;gt;&lt;br /&gt;
\new PianoStaff &amp;lt;&amp;lt;&lt;br /&gt;
  \set PianoStaff.connectArpeggios = ##t&lt;br /&gt;
  \override PianoStaff.Arpeggio.stencil =&lt;br /&gt;
    #ly:arpeggio::brew-chord-bracket&lt;br /&gt;
&lt;br /&gt;
  \new Staff \relative c&#039; {&lt;br /&gt;
    \key b \major&lt;br /&gt;
    \time 6/8&lt;br /&gt;
    b8-.(\arpeggio fis&#039;-.\&amp;gt; cis-.&lt;br /&gt;
      e-. gis-. b-.)\!\fermata^\laissezVibrer \bar &amp;quot;||&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  \new Staff \relative c&#039; {&lt;br /&gt;
    \clef bass&lt;br /&gt;
    \key b \major&lt;br /&gt;
    &amp;lt;&amp;lt; { &amp;lt;a e cis&amp;gt;2.\arpeggio } \\&lt;br /&gt;
       { &amp;lt;a, e a,&amp;gt;2. } &amp;gt;&amp;gt;&lt;br /&gt;
  }&lt;br /&gt;
&amp;gt;&amp;gt;&lt;br /&gt;
&amp;lt;/lilypond&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Keyboards]]&lt;br /&gt;
[[Category:Real music]]&lt;br /&gt;
[[Category:Included in the official documentation]]&lt;br /&gt;
[[Category:Snippet]]&lt;/div&gt;</summary>
		<author><name>Lemzwerg</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=Adjusting_vertical_positioning_of_lyric_hyphens&amp;diff=6432</id>
		<title>Adjusting vertical positioning of lyric hyphens</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=Adjusting_vertical_positioning_of_lyric_hyphens&amp;diff=6432"/>
		<updated>2026-03-09T05:15:17Z</updated>

		<summary type="html">&lt;p&gt;Lemzwerg: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;For joining syllables, LilyPond doesn’t use the hyphen of the text font but instead draws a simple line with variable length (this limitation is tracked as {{Issue|1255}}). Its standard vertical position doesn’t always fit the proportions of the text font. When using a font with a large x-height, it may be too low.&lt;br /&gt;
&lt;br /&gt;
You can adjust the vertical positioning of the hyphens manually. To get a good result you may want to insert a “real” hyphen for comparison (like between ‘l-e’ in the snippet).  You may also want to adjust the thickness of LilyPond hyphens using the &amp;lt;code&amp;gt;thickness&amp;lt;/code&amp;gt; property of the &amp;lt;code&amp;gt;LyricHyphen&amp;lt;/code&amp;gt; grob to match the font’s hyphen character.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lilypond version=&amp;quot;2.24&amp;quot;&amp;gt;&lt;br /&gt;
% LSR contributed by Hannes Kuhnert &amp;lt;hannes.kuhnert@gmx.de&amp;gt; 1.2.2012.&lt;br /&gt;
&lt;br /&gt;
\score {&lt;br /&gt;
  &amp;lt;&amp;lt;&lt;br /&gt;
    \new Voice = &amp;quot;Lied&amp;quot; {&lt;br /&gt;
      \relative {&lt;br /&gt;
        \clef G&lt;br /&gt;
        \key c \major&lt;br /&gt;
        e&#039;2 d c1&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    \new Lyrics = &amp;quot;Lied&amp;quot;&lt;br /&gt;
    \lyricsto Lied {&lt;br /&gt;
      La -- l-e -- lu.&lt;br /&gt;
    }&lt;br /&gt;
  &amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  \layout {&lt;br /&gt;
    \context {&lt;br /&gt;
      \Lyrics&lt;br /&gt;
      \override LyricHyphen.Y-offset = #0.16&lt;br /&gt;
      \override LyricHyphen.thickness = #2.1&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
\paper {&lt;br /&gt;
  #(define fonts&lt;br /&gt;
    (make-pango-font-tree&lt;br /&gt;
     &amp;quot;Serif&amp;quot;&lt;br /&gt;
     &amp;quot;Sans&amp;quot;&lt;br /&gt;
     &amp;quot;Monospace&amp;quot;&lt;br /&gt;
     (/ 20 20)))&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lilypond&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Paper and layout]]&lt;br /&gt;
[[Category:Text]]&lt;br /&gt;
[[Category:Vocal music]]&lt;br /&gt;
[[Category:Snippet]]&lt;/div&gt;</summary>
		<author><name>Lemzwerg</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=Repeat_with_brackets&amp;diff=6430</id>
		<title>Repeat with brackets</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=Repeat_with_brackets&amp;diff=6430"/>
		<updated>2026-03-07T15:44:07Z</updated>

		<summary type="html">&lt;p&gt;Lemzwerg: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This snippet adds brackets with the number of repetitions above a bar or a group of bar. Very useful when dealing with minimal music, for instance. To summon it, simply use &amp;lt;code&amp;gt;\repeatBracket &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt; music&amp;lt;/code&amp;gt;, where &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt; is the number of repetitions. Example: &amp;lt;code&amp;gt;\repeatBracket 7 { c&#039;2 e&#039; }&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lilypond version=&amp;quot;2.24&amp;quot;&amp;gt;&lt;br /&gt;
% LSR based on the wonderful spanner by David Nalesnik; see&lt;br /&gt;
% LSR  http://lists.gnu.org/archive/html/lilypond-user/2014-10/msg00446.html&lt;br /&gt;
&lt;br /&gt;
#(define (test-stencil grob text)&lt;br /&gt;
   (let* ((orig (ly:grob-original grob))&lt;br /&gt;
          (siblings (ly:spanner-broken-into orig)) ; have we been split?&lt;br /&gt;
          (refp (ly:grob-system grob))&lt;br /&gt;
          (left-bound (ly:spanner-bound grob LEFT))&lt;br /&gt;
          (right-bound (ly:spanner-bound grob RIGHT))&lt;br /&gt;
          (elts-L (ly:grob-array-&amp;gt;list (ly:grob-object left-bound &#039;elements)))&lt;br /&gt;
          (elts-R (ly:grob-array-&amp;gt;list (ly:grob-object right-bound &#039;elements)))&lt;br /&gt;
          (break-alignment-L&lt;br /&gt;
           (filter&lt;br /&gt;
            (lambda (elt) (grob::has-interface elt &#039;break-alignment-interface))&lt;br /&gt;
            elts-L))&lt;br /&gt;
          (break-alignment-R&lt;br /&gt;
           (filter&lt;br /&gt;
            (lambda (elt) (grob::has-interface elt &#039;break-alignment-interface))&lt;br /&gt;
            elts-R))&lt;br /&gt;
          (break-alignment-L-ext (ly:grob-extent (car break-alignment-L) refp X))&lt;br /&gt;
          (break-alignment-R-ext (ly:grob-extent (car break-alignment-R) refp X))&lt;br /&gt;
          (num&lt;br /&gt;
           (markup text))&lt;br /&gt;
          (num&lt;br /&gt;
           (if (or (null? siblings)&lt;br /&gt;
                   (eq? grob (car siblings)))&lt;br /&gt;
               num&lt;br /&gt;
               (make-parenthesize-markup num)))&lt;br /&gt;
          (num (grob-interpret-markup grob num))&lt;br /&gt;
          (num-stil-ext-X (ly:stencil-extent num X))&lt;br /&gt;
          (num-stil-ext-Y (ly:stencil-extent num Y))&lt;br /&gt;
          (num (ly:stencil-aligned-to num X CENTER))&lt;br /&gt;
          (num&lt;br /&gt;
           (ly:stencil-translate-axis&lt;br /&gt;
            num&lt;br /&gt;
            (+ (interval-length break-alignment-L-ext)&lt;br /&gt;
              (* 0.5&lt;br /&gt;
                (- (car break-alignment-R-ext)&lt;br /&gt;
                  (cdr break-alignment-L-ext))))&lt;br /&gt;
            X))&lt;br /&gt;
          (bracket-L&lt;br /&gt;
           (markup&lt;br /&gt;
            #:path&lt;br /&gt;
            0.1 ; line-thickness&lt;br /&gt;
            `((moveto 0.5 ,(* 0.5 (interval-length num-stil-ext-Y)))&lt;br /&gt;
              (lineto ,(* 0.5&lt;br /&gt;
                         (- (car break-alignment-R-ext)&lt;br /&gt;
                           (cdr break-alignment-L-ext)&lt;br /&gt;
                           (interval-length num-stil-ext-X)))&lt;br /&gt;
                ,(* 0.5 (interval-length num-stil-ext-Y)))&lt;br /&gt;
              (closepath)&lt;br /&gt;
              (rlineto 0.0&lt;br /&gt;
                ,(if (or (null? siblings) (eq? grob (car siblings)))&lt;br /&gt;
                     -1.0 0.0)))))&lt;br /&gt;
          (bracket-R&lt;br /&gt;
           (markup&lt;br /&gt;
            #:path&lt;br /&gt;
            0.1&lt;br /&gt;
            `((moveto ,(* 0.5&lt;br /&gt;
                         (- (car break-alignment-R-ext)&lt;br /&gt;
                           (cdr break-alignment-L-ext)&lt;br /&gt;
                           (interval-length num-stil-ext-X)))&lt;br /&gt;
                ,(* 0.5 (interval-length num-stil-ext-Y)))&lt;br /&gt;
              (lineto 0.5&lt;br /&gt;
                ,(* 0.5 (interval-length num-stil-ext-Y)))&lt;br /&gt;
              (closepath)&lt;br /&gt;
              (rlineto 0.0&lt;br /&gt;
                ,(if (or (null? siblings) (eq? grob (last siblings)))&lt;br /&gt;
                     -1.0 0.0)))))&lt;br /&gt;
          (bracket-L (grob-interpret-markup grob bracket-L))&lt;br /&gt;
          (bracket-R (grob-interpret-markup grob bracket-R))&lt;br /&gt;
          (num (ly:stencil-combine-at-edge num X LEFT bracket-L 0.4))&lt;br /&gt;
          (num (ly:stencil-combine-at-edge num X RIGHT bracket-R 0.4)))&lt;br /&gt;
     num))&lt;br /&gt;
&lt;br /&gt;
#(define-public (Measure_attached_spanner_engraver context)&lt;br /&gt;
   (let ((span &#039;())&lt;br /&gt;
         (finished &#039;())&lt;br /&gt;
         (event-start &#039;())&lt;br /&gt;
         (event-stop &#039;()))&lt;br /&gt;
     (make-engraver&lt;br /&gt;
      (listeners ((measure-counter-event engraver event)&lt;br /&gt;
                  (if (= START (ly:event-property event &#039;span-direction))&lt;br /&gt;
                      (set! event-start event)&lt;br /&gt;
                      (set! event-stop event))))&lt;br /&gt;
      ((process-music trans)&lt;br /&gt;
       (if (ly:stream-event? event-stop)&lt;br /&gt;
           (if (null? span)&lt;br /&gt;
               (ly:warning &amp;quot;You&#039;re trying to end a measure-attached spanner but you haven&#039;t started one.&amp;quot;)&lt;br /&gt;
               (begin (set! finished span)&lt;br /&gt;
                 (ly:engraver-announce-end-grob trans finished event-start)&lt;br /&gt;
                 (set! span &#039;())&lt;br /&gt;
                 (set! event-stop &#039;()))))&lt;br /&gt;
       (if (ly:stream-event? event-start)&lt;br /&gt;
           (begin (set! span (ly:engraver-make-grob trans &#039;MeasureCounter event-start))&lt;br /&gt;
             (set! event-start &#039;()))))&lt;br /&gt;
      ((stop-translation-timestep trans)&lt;br /&gt;
       (if (and (ly:spanner? span)&lt;br /&gt;
                (null? (ly:spanner-bound span LEFT))&lt;br /&gt;
                (moment&amp;lt;=? (ly:context-property context &#039;measurePosition) ZERO-MOMENT)) &lt;br /&gt;
           (ly:spanner-set-bound! span LEFT &lt;br /&gt;
             (ly:context-property context &#039;currentCommandColumn)))&lt;br /&gt;
       (if (and (ly:spanner? finished)&lt;br /&gt;
                (moment&amp;lt;=? (ly:context-property context &#039;measurePosition) ZERO-MOMENT))&lt;br /&gt;
           (begin&lt;br /&gt;
            (if (null? (ly:spanner-bound finished RIGHT))&lt;br /&gt;
                (ly:spanner-set-bound! finished RIGHT&lt;br /&gt;
                  (ly:context-property context &#039;currentCommandColumn)))&lt;br /&gt;
            (set! finished &#039;())&lt;br /&gt;
            (set! event-start &#039;())&lt;br /&gt;
            (set! event-stop &#039;()))))&lt;br /&gt;
      ((finalize trans)&lt;br /&gt;
       (if (ly:spanner? finished)&lt;br /&gt;
           (begin&lt;br /&gt;
            (if (null? (ly:spanner-bound finished RIGHT))&lt;br /&gt;
                (set! (ly:spanner-bound finished RIGHT)&lt;br /&gt;
                      (ly:context-property context &#039;currentCommandColumn)))&lt;br /&gt;
            (set! finished &#039;())))&lt;br /&gt;
       (if (ly:spanner? span)&lt;br /&gt;
           (begin&lt;br /&gt;
            (ly:warning &amp;quot;I think there&#039;s a dangling measure-attached spanner :-(&amp;quot;)&lt;br /&gt;
            (ly:grob-suicide! span)&lt;br /&gt;
            (set! span &#039;())))))))&lt;br /&gt;
&lt;br /&gt;
% necessary layout options&lt;br /&gt;
% note that you can have more than one single layout block&lt;br /&gt;
% (some of them may even be outside and some inside \score)&lt;br /&gt;
\layout {&lt;br /&gt;
  \context {&lt;br /&gt;
    \Staff&lt;br /&gt;
    \consists #Measure_attached_spanner_engraver&lt;br /&gt;
    \override MeasureCounter.font-encoding = #&#039;latin1&lt;br /&gt;
    \override MeasureCounter.font-size = 0&lt;br /&gt;
    \override MeasureCounter.outside-staff-padding = 2&lt;br /&gt;
    \override MeasureCounter.outside-staff-horizontal-padding = #0&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
% function itself&lt;br /&gt;
repeatBracket = #(define-music-function&lt;br /&gt;
     (N note)&lt;br /&gt;
     (number? ly:music?)     &lt;br /&gt;
      #{        &lt;br /&gt;
        \override Staff.MeasureCounter.stencil = &lt;br /&gt;
        #(lambda (grob) (test-stencil grob #{ #(string-append(number-&amp;gt;string N) &amp;quot;×&amp;quot;) #} ))&lt;br /&gt;
        \startMeasureCount&lt;br /&gt;
        \repeat volta #N { $note }&lt;br /&gt;
        \stopMeasureCount&lt;br /&gt;
      #}&lt;br /&gt;
     )&lt;br /&gt;
&lt;br /&gt;
%%%%%%%%%%%%%%%%%%%%%% EXAMPLE %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%&lt;br /&gt;
&lt;br /&gt;
{   &lt;br /&gt;
  \repeatBracket 7 {c&#039;1}&lt;br /&gt;
  \repeatBracket 32 {d&#039; g}&lt;br /&gt;
  \repeatBracket 14 {e&#039; f g}&lt;br /&gt;
  \repeatBracket 29 {f&#039; a bes \break cis&#039; e&#039;&#039;}  &lt;br /&gt;
  \repeatBracket 1048 {g&#039;1}  &lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lilypond&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Repeats]]&lt;br /&gt;
[[Category:Automatic notation]]&lt;br /&gt;
[[Category:Contemporary notation]]&lt;br /&gt;
[[Category:Specific notation]]&lt;br /&gt;
[[Category:Contexts and engravers]]&lt;br /&gt;
[[Category:Snippet]]&lt;/div&gt;</summary>
		<author><name>Lemzwerg</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=Curly_bracket_with_variable_length_(path)&amp;diff=6426</id>
		<title>Curly bracket with variable length (path)</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=Curly_bracket_with_variable_length_(path)&amp;diff=6426"/>
		<updated>2026-03-05T17:31:57Z</updated>

		<summary type="html">&lt;p&gt;Lemzwerg: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Curly brackets (or flat braces).&lt;br /&gt;
&lt;br /&gt;
See also snippet [[Orchestral grouping with a custom brace]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lilypond version=&amp;quot;2.24&amp;quot;&amp;gt;&lt;br /&gt;
%% LSR: Credits: PPS on April 2015&lt;br /&gt;
&lt;br /&gt;
%%% Defining a custom straight brace with a variable length:&lt;br /&gt;
#(define-markup-command (long-curly-bracket layout props arg-height)&lt;br /&gt;
   (number?)&lt;br /&gt;
  &amp;quot;Draw a curly bracket with a variable length.&amp;quot;&lt;br /&gt;
     (interpret-markup layout props&lt;br /&gt;
       (markup&lt;br /&gt;
        #:translate (cons 0 (* arg-height -1))&lt;br /&gt;
        (#:with-dimensions (cons -0.001 0) (cons 0.001 0)&lt;br /&gt;
         (#:override (cons (quote filled) #t)&lt;br /&gt;
          (#:path 0.01 `(&lt;br /&gt;
           (moveto   -0.8   0.0)&lt;br /&gt;
           (curveto  -0.2   0.4  -0.3  0.7 -0.3  1.5)&lt;br /&gt;
           (lineto   -0.3   ,arg-height)&lt;br /&gt;
           (curveto  -0.4   ,(+ arg-height 1.3) 0.5&lt;br /&gt;
                            ,(+ arg-height 2.8) 0.7&lt;br /&gt;
                            ,(+ arg-height 2.8))&lt;br /&gt;
           (curveto   0.6   ,(+ arg-height 2.5) 0.1&lt;br /&gt;
                            ,(+ arg-height 2)   0.1&lt;br /&gt;
                            ,arg-height)&lt;br /&gt;
           (lineto    0.1   1.5)&lt;br /&gt;
           (curveto   0.1   0.7   0.1   0.0  -0.8   0.0)&lt;br /&gt;
           (closepath)&lt;br /&gt;
           (curveto  -0.2  -0.4  -0.3  -0.7  -0.3  -1.5)&lt;br /&gt;
           (lineto   -0.3   ,(* arg-height -1))&lt;br /&gt;
           (curveto  -0.4   ,(* (+ arg-height 1.3) -1) 0.5&lt;br /&gt;
                            ,(* (+ arg-height 2.8) -1) 0.7&lt;br /&gt;
                            ,(* (+ arg-height 2.8) -1))&lt;br /&gt;
           (curveto   0.6   ,(* (+ arg-height 2.5) -1) 0.1&lt;br /&gt;
                            ,(* (+ arg-height 2) -1)   0.1&lt;br /&gt;
                            ,(* arg-height -1))&lt;br /&gt;
           (lineto    0.1  -1.5)&lt;br /&gt;
           (curveto   0.1  -0.7   0.1   0.0  -0.8   0.0)&lt;br /&gt;
           (closepath))))))))&lt;br /&gt;
&lt;br /&gt;
%%%% Examples:&lt;br /&gt;
\markup \with-dimensions #&#039;(-1 . 110) #&#039;(-95 . 3) \column {&lt;br /&gt;
  \italic &amp;quot;long-curly-bracket #Y:&amp;quot;&lt;br /&gt;
  \line {&lt;br /&gt;
    \center-column { &amp;quot;#2.5&amp;quot; \vspace #1 \long-curly-bracket #2.5 }&lt;br /&gt;
    \hspace #4&lt;br /&gt;
    \center-column { &amp;quot;#5&amp;quot; \vspace #1 \long-curly-bracket #5 }&lt;br /&gt;
    \hspace #4&lt;br /&gt;
    \center-column { &amp;quot;#10&amp;quot; \vspace #1 \long-curly-bracket #10 }&lt;br /&gt;
    \hspace #4&lt;br /&gt;
    \center-column { &amp;quot;#22&amp;quot; \vspace #1 \long-curly-bracket #22 }&lt;br /&gt;
  % \hspace #4&lt;br /&gt;
  % \center-column { &amp;quot;#40&amp;quot; \vspace #1 \long-curly-bracket #40 }&lt;br /&gt;
    \hspace #30&lt;br /&gt;
    \center-column { &lt;br /&gt;
      &amp;quot;\\rotate #90 &amp;amp; #-90&amp;quot;&lt;br /&gt;
      \vspace #1&lt;br /&gt;
      &amp;quot;#3&amp;quot; &lt;br /&gt;
      \rotate #90 \raise #3 \long-curly-bracket #3&lt;br /&gt;
      \vspace #1&lt;br /&gt;
  %   &amp;quot;#6&amp;quot; &lt;br /&gt;
  %   \rotate #90 \raise #6 \long-curly-bracket #6&lt;br /&gt;
  %   \vspace #1&lt;br /&gt;
      &amp;quot;#12&amp;quot; &lt;br /&gt;
      \rotate #90 \raise #12 \long-curly-bracket #12&lt;br /&gt;
      \vspace #1&lt;br /&gt;
      &amp;quot;#20&amp;quot; &lt;br /&gt;
      \rotate #90 \raise #20 \long-curly-bracket #20&lt;br /&gt;
      \vspace #1&lt;br /&gt;
  %   &amp;quot;#30&amp;quot; &lt;br /&gt;
  %   \rotate #90 \raise #30 \long-curly-bracket #30&lt;br /&gt;
  %   \vspace #1&lt;br /&gt;
  %   &amp;quot;#28&amp;quot; &lt;br /&gt;
  %   \rotate #-90 \raise #28 \long-curly-bracket #28&lt;br /&gt;
  %   \vspace #1&lt;br /&gt;
      &amp;quot;#18&amp;quot; &lt;br /&gt;
      \rotate #-90 \raise #18 \long-curly-bracket #18&lt;br /&gt;
      \vspace #1&lt;br /&gt;
      &amp;quot;#7&amp;quot; &lt;br /&gt;
      \rotate #-90 \raise #7 \long-curly-bracket #7&lt;br /&gt;
      \vspace #1&lt;br /&gt;
  %   &amp;quot;#4&amp;quot; &lt;br /&gt;
  %   \rotate #-90 \raise #4 \long-curly-bracket #4&lt;br /&gt;
  %   \vspace #1&lt;br /&gt;
      &amp;quot;#2&amp;quot; &lt;br /&gt;
      \rotate #-90 \raise #2 \long-curly-bracket #2&lt;br /&gt;
    } &lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lilypond&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Staff notation]]&lt;br /&gt;
[[Category:Editorial annotations]]&lt;br /&gt;
[[Category:Text]]&lt;br /&gt;
[[Category:Symbols and glyphs]]&lt;br /&gt;
[[Category:Snippet]]&lt;/div&gt;</summary>
		<author><name>Lemzwerg</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=Print_chord_names_with_same_root_and_different_bass_as_slash_and_bass_note&amp;diff=6425</id>
		<title>Print chord names with same root and different bass as slash and bass note</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=Print_chord_names_with_same_root_and_different_bass_as_slash_and_bass_note&amp;diff=6425"/>
		<updated>2026-03-05T16:59:52Z</updated>

		<summary type="html">&lt;p&gt;Lemzwerg: Revise comments.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;To print subsequent chord names only differing in their bass note as slash and bass note without a root symbol, use the Scheme engraver defined in this snippet. The is controlled by the &amp;lt;code&amp;gt;chordChanges&amp;lt;/code&amp;gt; context property.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lilypond version=&amp;quot;2.24&amp;quot;&amp;gt;&lt;br /&gt;
#(define Bass_changes_equal_root_engraver&lt;br /&gt;
   (lambda (ctx)&lt;br /&gt;
     &amp;quot;Drop root for follow-up chord names that differ only in bass.&lt;br /&gt;
&lt;br /&gt;
In other words, the chord name sequence &#039;D D/C D/B&#039; gets actually&lt;br /&gt;
printed as &#039;D /C /B&#039;.&lt;br /&gt;
&lt;br /&gt;
Set the `chordChanges` context property to `#t` to activate this&lt;br /&gt;
feature.&amp;quot;&lt;br /&gt;
     (let ((chord-pitches &#039;())&lt;br /&gt;
           (last-chord-pitches &#039;())&lt;br /&gt;
           (bass-pitch #f))&lt;br /&gt;
       (make-engraver&lt;br /&gt;
        ((initialize this-engraver)&lt;br /&gt;
         (let ((chord-note-namer (ly:context-property ctx&lt;br /&gt;
                                                      &#039;chordNoteNamer)))&lt;br /&gt;
           ;; Set `chordNoteNamer`, respecting user setting if already&lt;br /&gt;
           ;; done.&lt;br /&gt;
           (ly:context-set-property! ctx &#039;chordNoteNamer&lt;br /&gt;
                                     (if (procedure? chord-note-namer)&lt;br /&gt;
                                         chord-note-namer&lt;br /&gt;
                                         note-name-&amp;gt;markup))))&lt;br /&gt;
&lt;br /&gt;
        (listeners&lt;br /&gt;
         ((note-event this-engraver event)&lt;br /&gt;
          (let* ((pitch (ly:event-property event &#039;pitch))&lt;br /&gt;
                 (pitch-name (ly:pitch-notename pitch))&lt;br /&gt;
                 (pitch-alt (ly:pitch-alteration pitch))&lt;br /&gt;
                 (bass (ly:event-property event &#039;bass #f))&lt;br /&gt;
                 (inversion (ly:event-property event &#039;inversion #f)))&lt;br /&gt;
            ;; We look at the `bass` and `inversion` event properties&lt;br /&gt;
            ;; to decide how to handle the current note event.  If&lt;br /&gt;
            ;; `inversion` is set we add the bass note to the chord as&lt;br /&gt;
            ;; an ordinary member so that we can compare inversed&lt;br /&gt;
            ;; chords; if `bass` is set the bass note is not added to&lt;br /&gt;
            ;; the chord.&lt;br /&gt;
            ;;&lt;br /&gt;
            ;; In the `chord-pitches` list we actually collect only&lt;br /&gt;
            ;; the notes&#039; pitch names (which are integers) and pitch&lt;br /&gt;
            ;; alterations as pairs, ignoring the octave.&lt;br /&gt;
            (cond (bass (set! bass-pitch pitch))&lt;br /&gt;
                  (inversion&lt;br /&gt;
                   (set! bass-pitch pitch)&lt;br /&gt;
                   (set! chord-pitches&lt;br /&gt;
                         (cons (cons pitch-name pitch-alt)&lt;br /&gt;
                               chord-pitches)))&lt;br /&gt;
                  (else&lt;br /&gt;
                   (set! chord-pitches&lt;br /&gt;
                         (cons (cons pitch-name pitch-alt)&lt;br /&gt;
                               chord-pitches)))))))&lt;br /&gt;
&lt;br /&gt;
        (acknowledgers&lt;br /&gt;
         ((chord-name-interface this-engraver grob source-engraver)&lt;br /&gt;
          (let ((chord-changes (ly:context-property ctx&lt;br /&gt;
                                                    &#039;chordChanges #f)))&lt;br /&gt;
            ;; If subsequent chords are equal apart from their bass,&lt;br /&gt;
            ;; we change the `text` property to print only the slash&lt;br /&gt;
            ;; and the bass note (via the formatter stored in the&lt;br /&gt;
            ;; `chordNoteNamer` context property).&lt;br /&gt;
            ;;&lt;br /&gt;
            ;; Equality is tested by comparing the sorted lists of&lt;br /&gt;
            ;; this chord&#039;s elements and the previous chord.  Sorting&lt;br /&gt;
            ;; is needed because inverted chords may have a different&lt;br /&gt;
            ;; order of pitches.  Note that we only do a simplified&lt;br /&gt;
            ;; sorting using the pitch name, ignoring the alteration.&lt;br /&gt;
            (if (and bass-pitch&lt;br /&gt;
                     chord-changes&lt;br /&gt;
                     (equal? (sort chord-pitches car&amp;lt;)&lt;br /&gt;
                             (sort last-chord-pitches car&amp;lt;)))&lt;br /&gt;
                (ly:grob-set-property!&lt;br /&gt;
                 grob &#039;text&lt;br /&gt;
                 (make-line-markup&lt;br /&gt;
                  (list&lt;br /&gt;
                   (ly:context-property ctx &#039;slashChordSeparator)&lt;br /&gt;
                   ((ly:context-property ctx &#039;chordNoteNamer)&lt;br /&gt;
                    bass-pitch&lt;br /&gt;
                    (ly:context-property ctx&lt;br /&gt;
                                         &#039;chordNameLowercaseMinor))))))&lt;br /&gt;
            (set! last-chord-pitches chord-pitches)&lt;br /&gt;
            (set! chord-pitches &#039;())&lt;br /&gt;
            (set! bass-pitch #f))))&lt;br /&gt;
&lt;br /&gt;
        ((finalize this-engraver)&lt;br /&gt;
         (set! last-chord-pitches &#039;()))))))&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
myChords = \chordmode {&lt;br /&gt;
  % \germanChords&lt;br /&gt;
&lt;br /&gt;
  \set chordChanges = ##t&lt;br /&gt;
  d2:m d:m/cis&lt;br /&gt;
&lt;br /&gt;
  d:m/c&lt;br /&gt;
  \set chordChanges = ##f&lt;br /&gt;
  d:m/b&lt;br /&gt;
&lt;br /&gt;
  e1:7&lt;br /&gt;
  \set chordChanges = ##t&lt;br /&gt;
  e&lt;br /&gt;
  \break&lt;br /&gt;
&lt;br /&gt;
  \once \set chordChanges = ##f&lt;br /&gt;
  e1/f&lt;br /&gt;
  e2/gis e/+gis e e:m/f d:m d:m/cis d:m/c&lt;br /&gt;
  \set chordChanges = ##f&lt;br /&gt;
  d:m/b&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;&amp;lt;&lt;br /&gt;
  \new ChordNames&lt;br /&gt;
    \with { \consists #Bass_changes_equal_root_engraver }&lt;br /&gt;
    \myChords&lt;br /&gt;
  \new Staff \myChords&lt;br /&gt;
&amp;gt;&amp;gt;&lt;br /&gt;
&amp;lt;/lilypond&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Chords]]&lt;br /&gt;
[[Category:Contexts and engravers]]&lt;br /&gt;
[[Category:Scheme]]&lt;br /&gt;
[[Category:Staff notation]]&lt;br /&gt;
[[Category:Included in the official documentation]]&lt;br /&gt;
[[Category:Snippet]]&lt;/div&gt;</summary>
		<author><name>Lemzwerg</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=Lyrics_alignment&amp;diff=6420</id>
		<title>Lyrics alignment</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=Lyrics_alignment&amp;diff=6420"/>
		<updated>2026-03-03T10:29:27Z</updated>

		<summary type="html">&lt;p&gt;Lemzwerg: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Horizontal alignment for lyrics can be set by overriding the &amp;lt;code&amp;gt;self-alignment-X&amp;lt;/code&amp;gt; property of the &amp;lt;code&amp;gt;LyricText&amp;lt;/code&amp;gt; object. Value &amp;amp;nbsp;-1 means left-aligned, 0&amp;amp;nbsp;centered, and 1&amp;amp;nbsp;right-aligned. Alternatively, you can use the Scheme values &amp;lt;code&amp;gt;LEFT&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;CENTER&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;RIGHT&amp;lt;/code&amp;gt; instead of numbers.  Other numeric values are possible, too – don&#039;t forget to add the &amp;lt;samp&amp;gt;#&amp;lt;/samp&amp;gt; Scheme prefix for negative numbers!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lilypond version=&amp;quot;2.24&amp;quot;&amp;gt;&lt;br /&gt;
\layout {&lt;br /&gt;
  ragged-right = ##f&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
\relative c&#039;&#039; {&lt;br /&gt;
  c1 c c c&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
\addlyrics {&lt;br /&gt;
  \once \override LyricText.self-alignment-X = #LEFT&lt;br /&gt;
  &amp;quot;left-aligned&amp;quot;&lt;br /&gt;
  \once \override LyricText.self-alignment-X = #CENTER&lt;br /&gt;
  &amp;quot;centered&amp;quot;&lt;br /&gt;
  \once \override LyricText.self-alignment-X = 1&lt;br /&gt;
  &amp;quot;right-aligned&amp;quot;&lt;br /&gt;
  \once \override LyricText.self-alignment-X = #-1.5&lt;br /&gt;
  &amp;quot;overly left-aligned&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lilypond&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Really simple]]&lt;br /&gt;
[[Category:Text]]&lt;br /&gt;
[[Category:Vocal music]]&lt;br /&gt;
[[Category:Included in the official documentation]]&lt;br /&gt;
[[Category:Snippet]]&lt;/div&gt;</summary>
		<author><name>Lemzwerg</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=Adjusting_vertical_positioning_of_lyric_hyphens&amp;diff=6417</id>
		<title>Adjusting vertical positioning of lyric hyphens</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=Adjusting_vertical_positioning_of_lyric_hyphens&amp;diff=6417"/>
		<updated>2026-03-02T08:55:14Z</updated>

		<summary type="html">&lt;p&gt;Lemzwerg: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;For joining syllables, LilyPond doesn’t use the hyphen of the text font but instead draws a simple line with variable length (this limitation is tracked as {{Issue|1255}}). Its standard vertical position doesn’t always fit the proportions of the text font. When using a font with a large x-height, it may be too low.&lt;br /&gt;
&lt;br /&gt;
You can adjust the vertical positioning of the hyphens manually. To get a good result you may want to insert a “real” hyphen for comparison (like between ‘l-e’ in the snippet).  You may also want to adjust the thickness of LilyPond hyphens using the &amp;lt;code&amp;gt;thickness&amp;lt;/code&amp;gt; property of the &amp;lt;code&amp;gt;LyricHyphen&amp;lt;/code&amp;gt; grob to match the font&#039;s hyphen character.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lilypond version=&amp;quot;2.24&amp;quot;&amp;gt;&lt;br /&gt;
% LSR contributed by Hannes Kuhnert &amp;lt;hannes.kuhnert@gmx.de&amp;gt; 1.2.2012.&lt;br /&gt;
&lt;br /&gt;
\score {&lt;br /&gt;
  &amp;lt;&amp;lt;&lt;br /&gt;
    \new Voice = &amp;quot;Lied&amp;quot; {&lt;br /&gt;
      \relative {&lt;br /&gt;
        \clef G&lt;br /&gt;
        \key c \major&lt;br /&gt;
        e&#039;2 d c1&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    \new Lyrics = &amp;quot;Lied&amp;quot;&lt;br /&gt;
    \lyricsto Lied {&lt;br /&gt;
      La -- l-e -- lu.&lt;br /&gt;
    }&lt;br /&gt;
  &amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  \layout {&lt;br /&gt;
    \context {&lt;br /&gt;
      \Lyrics&lt;br /&gt;
      \override LyricHyphen.Y-offset = #0.16&lt;br /&gt;
      \override LyricHyphen.thickness = #2.1&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
\paper {&lt;br /&gt;
  #(define fonts&lt;br /&gt;
    (make-pango-font-tree&lt;br /&gt;
     &amp;quot;Serif&amp;quot;&lt;br /&gt;
     &amp;quot;Sans&amp;quot;&lt;br /&gt;
     &amp;quot;Monospace&amp;quot;&lt;br /&gt;
     (/ 20 20)))&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lilypond&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Paper and layout]]&lt;br /&gt;
[[Category:Text]]&lt;br /&gt;
[[Category:Vocal music]]&lt;br /&gt;
[[Category:Snippet]]&lt;/div&gt;</summary>
		<author><name>Lemzwerg</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=Creating_guitar_scales_on_fretboards&amp;diff=6416</id>
		<title>Creating guitar scales on fretboards</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=Creating_guitar_scales_on_fretboards&amp;diff=6416"/>
		<updated>2026-03-02T08:51:28Z</updated>

		<summary type="html">&lt;p&gt;Lemzwerg: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This snippet creates fretboards with guitar scales.&lt;br /&gt;
&lt;br /&gt;
The syntax is&lt;br /&gt;
&lt;br /&gt;
 \scale-diagram #&#039;( (string1 fret1) (string2 fret2) ... )&lt;br /&gt;
                #notes-in-scale #size&lt;br /&gt;
&lt;br /&gt;
As an example, here is a c pentatonic scale (first six notes).&lt;br /&gt;
&lt;br /&gt;
 \scale-diagram #&#039;((5 3) (5 5) (4 3) (4 5) (3 2) (3 5)) #5 #1.5&lt;br /&gt;
&lt;br /&gt;
You can wrap this up in a markup command for building up a list of scales as follows&lt;br /&gt;
&lt;br /&gt;
 cpenta = \markup&lt;br /&gt;
            \scale-diagram #&#039;((5 3) (5 5) (4 3) (4 5) (3 2) (3 5)) #5 #1.5&lt;br /&gt;
&lt;br /&gt;
and use it like this&lt;br /&gt;
&lt;br /&gt;
 c^\cpenta d f g a c&lt;br /&gt;
&lt;br /&gt;
The snippet doesn&#039;t show it, but the (1) position of the scale is inverted.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lilypond version=&amp;quot;2.24&amp;quot;&amp;gt;&lt;br /&gt;
% Helper function to invert first elements of scales&lt;br /&gt;
#(define (inverted num mod)&lt;br /&gt;
   (if (zero? (modulo num mod))&lt;br /&gt;
         (list &#039;1 &#039;inverted)&lt;br /&gt;
         (list (1+ (modulo num mod)))))&lt;br /&gt;
&lt;br /&gt;
% Expand the (string fret) pairs to valid lilypond syntax&lt;br /&gt;
#(define (fret-from-list l1 l2 n1)&lt;br /&gt;
   (if  (null? l1) &lt;br /&gt;
        l2 &lt;br /&gt;
        (fret-from-list (cdr l1) (append l2 (list (append &#039;(place-fret) (car l1) (inverted (length l2) n1)))) n1)))&lt;br /&gt;
&lt;br /&gt;
% arg1 is the list of (string fret) pairs making up the scale&lt;br /&gt;
% arg2 is the number of unique tones in the scale (i.e. 7 for major scale, 5 for pentatonic)&lt;br /&gt;
% arg3 is a scale factor used to enlarge the fret diagram&lt;br /&gt;
#(define-markup-command (scale-diagram layout props arg1 arg2 arg3) (list? integer? number?)&lt;br /&gt;
   (interpret-markup layout props&lt;br /&gt;
    (markup&lt;br /&gt;
     (#:override (cons &#039;size arg3 )&lt;br /&gt;
      (#:override &#039;(fret-diagram-details&lt;br /&gt;
                    . (&lt;br /&gt;
                       (finger-code . in-dot)&lt;br /&gt;
                       (number-type . arabic)&lt;br /&gt;
                       (label-dir   . -1)&lt;br /&gt;
                       (orientation . landscape)&lt;br /&gt;
                       (dot-radius  . 0.4)&lt;br /&gt;
                       (fret-count  . 8)&lt;br /&gt;
                       (top-fret-thickness . 7)))&lt;br /&gt;
        #:fret-diagram-verbose&lt;br /&gt;
          (fret-from-list arg1 &#039;() arg2))))))&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
cmajor=\markup\scale-diagram #&#039;((5 3) (5 5) (4 2) (4 3) (4 5) (3 2) (3 4) &lt;br /&gt;
                                (3 5) (2 3) (2 5) (2 6) (1 3) (1 5) (1 7) (1 8)) #7 #1.0&lt;br /&gt;
&lt;br /&gt;
dmajor=\markup\scale-diagram #&#039;((5 5) (5 7) (4 4) (4 5) (4 7) (3 4) (3 6) &lt;br /&gt;
                                (3 7) (2 5) (2 7) (2 8) (1 5) (1 7) (1 9) (1 10)) #7 #1.35&lt;br /&gt;
&lt;br /&gt;
cpenta=\markup\scale-diagram #&#039;((5 3) (5 5) (4 3) (4 5) (3 2)  &lt;br /&gt;
                                (3 5) (2 3)  (2 6) (1 3) (1 5)  (1 8)) #5 #1.7&lt;br /&gt;
&lt;br /&gt;
\relative c&#039; {&lt;br /&gt;
  c   d^\cmajor e f g^&amp;quot;c Ionic&amp;quot;      a b c d e f g a b c r | \break&lt;br /&gt;
  d,, e^\dmajor fis g a^&amp;quot;d Ionic&amp;quot;      b cis d e fis g a b cis d r | \break&lt;br /&gt;
  c,, d^\cpenta f g a^&amp;quot;c pentatonic&amp;quot; a c d f g a c         |&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lilypond&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Fretted strings]]&lt;br /&gt;
[[Category:Scheme]]&lt;br /&gt;
[[Category:Pitches]]&lt;br /&gt;
[[Category:Snippet]]&lt;/div&gt;</summary>
		<author><name>Lemzwerg</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=Harmonizing_bar_line_thickness_for_staves_with_different_sizes&amp;diff=6414</id>
		<title>Harmonizing bar line thickness for staves with different sizes</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=Harmonizing_bar_line_thickness_for_staves_with_different_sizes&amp;diff=6414"/>
		<updated>2026-03-01T11:31:00Z</updated>

		<summary type="html">&lt;p&gt;Lemzwerg: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;When using &amp;lt;code&amp;gt;\magnifyStaff&amp;lt;/code&amp;gt; only for some staves in a &amp;lt;code&amp;gt;StaffGroup&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;BarLine&amp;lt;/code&amp;gt; grobs do not align any more due to its changed properties &amp;lt;code&amp;gt;thick-thickness&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;hair-thickness&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;kern&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
To fix this, multiple workarounds are available, as demonstrated below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lilypond version=&amp;quot;2.24&amp;quot;&amp;gt;&lt;br /&gt;
% LSR originally contributed by -vv for \version 2.20.&lt;br /&gt;
&lt;br /&gt;
\markuplist {&lt;br /&gt;
  % First row.&lt;br /&gt;
  \fill-line {&lt;br /&gt;
    \score {&lt;br /&gt;
      \new StaffGroup &amp;lt;&amp;lt;&lt;br /&gt;
        \new Staff \with { \magnifyStaff #1/2 } {&lt;br /&gt;
          \textMark \markup \tiny &amp;quot;default&amp;quot;&lt;br /&gt;
          b1 b \bar &amp;quot;|.&amp;quot;&lt;br /&gt;
        }&lt;br /&gt;
        \new Staff { b b }&lt;br /&gt;
      &amp;gt;&amp;gt;&lt;br /&gt;
    }&lt;br /&gt;
    \score {&lt;br /&gt;
      \new StaffGroup &amp;lt;&amp;lt;&lt;br /&gt;
        \new Staff \with { \magnifyStaff #1/2 } {&lt;br /&gt;
          \textMark \markup \tiny \column { &amp;quot;reverting only the&amp;quot;&lt;br /&gt;
                                            &amp;quot;final bar line&amp;quot; }&lt;br /&gt;
          b1 b&lt;br /&gt;
          \revert Staff.BarLine.thick-thickness&lt;br /&gt;
          \revert Staff.BarLine.hair-thickness&lt;br /&gt;
          \revert Staff.BarLine.kern&lt;br /&gt;
          \bar &amp;quot;|.&amp;quot;&lt;br /&gt;
        }&lt;br /&gt;
        \new Staff { b b }&lt;br /&gt;
      &amp;gt;&amp;gt;&lt;br /&gt;
    }&lt;br /&gt;
    \score {&lt;br /&gt;
      \new StaffGroup &amp;lt;&amp;lt;&lt;br /&gt;
        \new Staff \with { \magnifyStaff #1/2&lt;br /&gt;
                           #(revert-props &#039;magnifyStaff 0&lt;br /&gt;
                                          &#039;((BarLine thick-thickness)&lt;br /&gt;
                                            (BarLine hair-thickness)&lt;br /&gt;
                                            (BarLine kern))) } {&lt;br /&gt;
          \textMark \markup \tiny \column { &amp;quot;cancelling&amp;quot;&lt;br /&gt;
                                            \typewriter &amp;quot;\\magnifyStaff&amp;quot;&lt;br /&gt;
                                            &amp;quot;only for bar lines&amp;quot; }&lt;br /&gt;
          b1 b \bar &amp;quot;|.&amp;quot;&lt;br /&gt;
        }&lt;br /&gt;
        \new Staff { b b }&lt;br /&gt;
      &amp;gt;&amp;gt;&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  \vspace #2&lt;br /&gt;
&lt;br /&gt;
  % Second row.&lt;br /&gt;
  \fill-line {&lt;br /&gt;
    \score {&lt;br /&gt;
      \new StaffGroup &amp;lt;&amp;lt;&lt;br /&gt;
        \new Staff \with { \magnifyStaff #1/2 } {&lt;br /&gt;
          \textMark \markup \tiny \column { &amp;quot;mimicking&amp;quot;&lt;br /&gt;
                                            \typewriter &amp;quot;\\magnifyStaff&amp;quot;&lt;br /&gt;
                                            &amp;quot;on the other staves&amp;quot; }&lt;br /&gt;
          b1 b \bar &amp;quot;|.&amp;quot; }&lt;br /&gt;
        \new Staff \with { #(scale-props &#039;magnifyStaff 1/2 #t&lt;br /&gt;
                                         &#039;((BarLine thick-thickness)&lt;br /&gt;
                                           (BarLine hair-thickness)&lt;br /&gt;
                                           (BarLine kern))) } {&lt;br /&gt;
          b b }&lt;br /&gt;
      &amp;gt;&amp;gt;&lt;br /&gt;
    }&lt;br /&gt;
    \score {&lt;br /&gt;
      \new StaffGroup &amp;lt;&amp;lt;&lt;br /&gt;
        \new Staff \with { \magnifyStaff #1/2&lt;br /&gt;
                           #(scale-props &#039;magnifyStaff 3/2 #t&lt;br /&gt;
                                         &#039;((BarLine thick-thickness)&lt;br /&gt;
                                           (BarLine hair-thickness)&lt;br /&gt;
                                           (BarLine kern))) } {&lt;br /&gt;
          \textMark \markup \tiny \column { &amp;quot;applying an&amp;quot;&lt;br /&gt;
                                            &amp;quot;intermediate&amp;quot;&lt;br /&gt;
                                            &amp;quot;value to all staves&amp;quot; }&lt;br /&gt;
          b1 b \bar &amp;quot;|.&amp;quot; }&lt;br /&gt;
        \new Staff \with { #(scale-props &#039;magnifyStaff 3/4 #t&lt;br /&gt;
                                         &#039;((BarLine thick-thickness)&lt;br /&gt;
                                           (BarLine hair-thickness)&lt;br /&gt;
                                           (BarLine kern))) } {&lt;br /&gt;
           b b }&lt;br /&gt;
      &amp;gt;&amp;gt;&lt;br /&gt;
    }&lt;br /&gt;
    &amp;quot;&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lilypond&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Staff notation]]&lt;br /&gt;
[[Category:Spacing]]&lt;br /&gt;
[[Category:Included in the official documentation]]&lt;br /&gt;
[[Category:Snippet]]&lt;/div&gt;</summary>
		<author><name>Lemzwerg</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=Flat_ties&amp;diff=6413</id>
		<title>Flat ties</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=Flat_ties&amp;diff=6413"/>
		<updated>2026-03-01T11:28:44Z</updated>

		<summary type="html">&lt;p&gt;Lemzwerg: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This snippet provides a function &amp;lt;code&amp;gt;flared-tie&amp;lt;/code&amp;gt; to draw a tie that consist of straight lines. It is intended as a replacement for the default tie-drawing function (i.e., a replacement argument for the &amp;lt;code&amp;gt;stencil&amp;lt;/code&amp;gt; property of the &amp;lt;code&amp;gt;Tie&amp;lt;/code&amp;gt; grob).&lt;br /&gt;
&lt;br /&gt;
The argument of &amp;lt;code&amp;gt;flared-tie&amp;lt;/code&amp;gt; is a list of coordinate pairs that specify additional points between the first and last point to span up the tie’s lines. The first and last point are identical to the original tie’s start and end point, respectively.  The X&amp;amp;nbsp;and Y&amp;amp;nbsp;coordinate values are multiples of the bounding box length and height of the original tie (also taking care of the tie’s direction); consequently, the first point has coordinates (0,0), and the last point (1,0).  &lt;br /&gt;
&lt;br /&gt;
The function &amp;lt;code&amp;gt;flare-tie&amp;lt;/code&amp;gt; defines a shorthand for a flat tie. Further tweaking of the shape is possible by overriding &amp;lt;code&amp;gt;Tie.details.height-limit&amp;lt;/code&amp;gt; or with &amp;lt;code&amp;gt;\shape&amp;lt;/code&amp;gt;. It is also possible to change the custom definition on the fly.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lilypond version=&amp;quot;2.24&amp;quot;&amp;gt;&lt;br /&gt;
#(define ((flared-tie coords) grob)&lt;br /&gt;
   (define (pair-to-list pair)&lt;br /&gt;
     (list (car pair) (cdr pair)))&lt;br /&gt;
&lt;br /&gt;
   (define (normalize-coords goods x y dir)&lt;br /&gt;
     (map&lt;br /&gt;
      (lambda (coord)&lt;br /&gt;
        (cons (* x (car coord)) (* y dir (cdr coord))))&lt;br /&gt;
      goods))&lt;br /&gt;
&lt;br /&gt;
   (define (my-c-p-s points thick)&lt;br /&gt;
     (make-connected-path-stencil points thick 1.0 1.0 #f #f))&lt;br /&gt;
&lt;br /&gt;
   ;; Calling `ly:tie::print` and assigning its return value to a&lt;br /&gt;
   ;; variable in this outer `let` triggers LilyPond to position the&lt;br /&gt;
   ;; tie, allowing us to extract its extents.  We only proceed,&lt;br /&gt;
   ;; however, if the tie doesn&#039;t get discarded (for whatever reason).&lt;br /&gt;
   (let ((sten (ly:tie::print grob)))&lt;br /&gt;
     (if (grob::is-live? grob)&lt;br /&gt;
         (let* ((layout (ly:grob-layout grob))&lt;br /&gt;
                (line-thickness (ly:output-def-lookup layout&lt;br /&gt;
                                                      &#039;line-thickness))&lt;br /&gt;
                (thickness (ly:grob-property grob &#039;thickness 0.1))&lt;br /&gt;
                (used-thick (* line-thickness thickness))&lt;br /&gt;
                (dir (ly:grob-property grob &#039;direction))&lt;br /&gt;
                (xex (ly:stencil-extent sten X))&lt;br /&gt;
                (yex (ly:stencil-extent sten Y))&lt;br /&gt;
                (lenx (interval-length xex))&lt;br /&gt;
                (leny (interval-length yex))&lt;br /&gt;
                (xtrans (car xex))&lt;br /&gt;
                (ytrans (if (&amp;gt; dir 0)(car yex) (cdr yex)))&lt;br /&gt;
                ;; Add last point.&lt;br /&gt;
                (coord-list (append coords &#039;((1.0 . 0.0))))&lt;br /&gt;
                (uplist&lt;br /&gt;
                 (map pair-to-list&lt;br /&gt;
                      (normalize-coords coord-list lenx (* leny 2) dir))))&lt;br /&gt;
           (ly:stencil-translate&lt;br /&gt;
            (my-c-p-s uplist used-thick)&lt;br /&gt;
            (cons xtrans ytrans)))&lt;br /&gt;
         &#039;())))&lt;br /&gt;
&lt;br /&gt;
% Define a default tie shape consisting of three straight lines.&lt;br /&gt;
#(define flare-tie&lt;br /&gt;
   (flared-tie &#039;((0.1 . 0.3) (0.9 . 0.3))))&lt;br /&gt;
&lt;br /&gt;
\relative c&#039; {&lt;br /&gt;
  a4~ a&lt;br /&gt;
  \once \override Tie.stencil = #flare-tie&lt;br /&gt;
  a4~ a \break&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;a c e a c e a c e&amp;gt;~ q&lt;br /&gt;
  \once \override Tie.stencil = #flare-tie&lt;br /&gt;
  q~ q\break&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;&amp;gt;^\markup \small \typewriter &amp;quot;height-limit = 14&amp;quot;&lt;br /&gt;
  \override Tie.details.height-limit = 14&lt;br /&gt;
  a&#039;4~ a&lt;br /&gt;
  \once \override Tie.stencil = #flare-tie&lt;br /&gt;
  a4~ a \break&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;&amp;gt;^\markup \small \typewriter &amp;quot;height-limit = 0.5&amp;quot;&lt;br /&gt;
  \override Tie.details.height-limit = 0.5&lt;br /&gt;
  a4~ a&lt;br /&gt;
  \once \override Tie.stencil = #flare-tie&lt;br /&gt;
  a4~ a \break&lt;br /&gt;
&lt;br /&gt;
  \revert Tie.details.height-limit&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;&amp;gt;^\markup \small \typewriter&lt;br /&gt;
             &amp;quot;\\shape #&#039;((0 . 0) (0 . -1) (0 . -1) (0 . 0))&amp;quot;&lt;br /&gt;
  \shape #&#039;((0 . 0) (0 . -1) (0 . -1) (0 . 0)) Tie&lt;br /&gt;
  a4~ a&lt;br /&gt;
  \once \override Tie.stencil = #flare-tie&lt;br /&gt;
  \shape #&#039;((0 . 0) (0 . -1) (0 . -1) (0 . 0)) Tie&lt;br /&gt;
  a4~ a \break&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;&amp;gt;^\markup \small \typewriter&lt;br /&gt;
             &amp;quot;#(flared-tie &#039;((0.2 . 2) (0.5 . -3) (0.8 . 1))&amp;quot;&lt;br /&gt;
  \once \override Tie.stencil =&lt;br /&gt;
        #(flared-tie &#039;((0.2 . 2) (0.5 . -3) (0.8 . 1)))&lt;br /&gt;
  a4~ a&lt;br /&gt;
  &amp;lt;&amp;gt;_\markup \small \typewriter&lt;br /&gt;
             &amp;quot;#(flared-tie &#039;((0.5 . 2)))&amp;quot;&lt;br /&gt;
  \once \override Tie.stencil = #(flared-tie &#039;((0.5 . 2)))&lt;br /&gt;
  a&#039;4~ a&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lilypond&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Contemporary notation]]&lt;br /&gt;
[[Category:Scheme]]&lt;br /&gt;
[[Category:Staff notation]]&lt;br /&gt;
[[Category:Tweaks and overrides]]&lt;br /&gt;
[[Category:Included in the official documentation]]&lt;br /&gt;
[[Category:Snippet]]&lt;/div&gt;</summary>
		<author><name>Lemzwerg</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=User_talk:SimonAlbrecht&amp;diff=6407</id>
		<title>User talk:SimonAlbrecht</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=User_talk:SimonAlbrecht&amp;diff=6407"/>
		<updated>2026-02-28T09:59:55Z</updated>

		<summary type="html">&lt;p&gt;Lemzwerg: /* Bitte LilyPond-Version beachten! */ Reply&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Bitte LilyPond-Version beachten! ==&lt;br /&gt;
&lt;br /&gt;
Danke für das Update von [[Adjusting vertical positioning of lyric hyphens]]!  Allerdings mußte ich deine Änderungen teilweise wieder rückgängig machen, weil Du Syntax verwendet hast, die es in 2.24 noch nicht gibt.  Wenn möglich, verwende bitte nichts neueres als 2.24 in diesem Wiki.  Falls neueres demonstriert werden soll, muß die Versionsnummer in &amp;lt;code&amp;gt;&amp;lt;lilypond&amp;gt;&amp;lt;/code&amp;gt; angepaßt werden. -- [[User:Lemzwerg|Lemzwerg]] ([[User talk:Lemzwerg|talk]]) 06:06, 28 February 2026 (UTC)&lt;br /&gt;
&lt;br /&gt;
:Oh, das war natürlich ein handwerklicher Fehler. Ich bin gerade nicht mehr sicher, ob ich gar nicht an 2.24 gedacht hatte oder ob ich dachte, das wäre da schon drin gewesen. So oder so danke fürs revidieren! [[User:SimonAlbrecht|SimonAlbrecht]] ([[User talk:SimonAlbrecht|talk]]) 09:50, 28 February 2026 (UTC)&lt;br /&gt;
:Wäre es sinnvoll, die &amp;lt;code&amp;gt;property-defaults&amp;lt;/code&amp;gt;-Syntax als Kommentar drin zu lassen für das Update zu 2.26? [[User:SimonAlbrecht|SimonAlbrecht]] ([[User talk:SimonAlbrecht|talk]]) 09:53, 28 February 2026 (UTC)&lt;br /&gt;
::Eher nicht, denk&#039; ich mal, da &amp;lt;code&amp;gt;convert-ly&amp;lt;/code&amp;gt; das automatisch handhabt (also zumindest die Standardfälle). -- [[User:Lemzwerg|Lemzwerg]] ([[User talk:Lemzwerg|talk]]) 09:59, 28 February 2026 (UTC)&lt;/div&gt;</summary>
		<author><name>Lemzwerg</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=Watermark&amp;diff=6399</id>
		<title>Watermark</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=Watermark&amp;diff=6399"/>
		<updated>2026-02-28T06:19:04Z</updated>

		<summary type="html">&lt;p&gt;Lemzwerg: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Add a watermark directly into a LilyPond file, without using a third-party PDF tool.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lilypond version=&amp;quot;2.24&amp;quot; full&amp;gt;&lt;br /&gt;
watermark = \markup&lt;br /&gt;
\with-dimensions-from\null {&lt;br /&gt;
  \translate #&#039;(-70 . -120)&lt;br /&gt;
  \rotate #50&lt;br /&gt;
  \fontsize #13&lt;br /&gt;
  \pattern #12 #Y #3 &lt;br /&gt;
  \pattern #3 #X #5&lt;br /&gt;
  \bold\with-color #(rgb-color .9  .9  .9) &amp;quot;copyrighted material&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
\paper { &lt;br /&gt;
  print-first-page-number = ##t&lt;br /&gt;
  %page-count = 2&lt;br /&gt;
  ragged-last-bottom = ##f &lt;br /&gt;
  oddHeaderMarkup = \markup { &lt;br /&gt;
    \combine\watermark&lt;br /&gt;
    \fill-line {&lt;br /&gt;
      \null&lt;br /&gt;
        \if \should-print-page-number &lt;br /&gt;
        \fromproperty #&#039;page:page-number-string&lt;br /&gt;
      }&lt;br /&gt;
  }&lt;br /&gt;
  evenHeaderMarkup = \markup { &lt;br /&gt;
    \combine\watermark&lt;br /&gt;
    \fill-line {&lt;br /&gt;
        \if \should-print-page-number &lt;br /&gt;
        \fromproperty #&#039;page:page-number-string&lt;br /&gt;
        \null&lt;br /&gt;
      }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
\header { &lt;br /&gt;
  dedication = \markup \italic &amp;quot;This music is dedicated to the LSR&amp;quot; &lt;br /&gt;
  title = &amp;quot;This is a Title&amp;quot; &lt;br /&gt;
  subtitle = &amp;quot;This is a Subtitle&amp;quot;&lt;br /&gt;
  subsubtitle = &amp;quot;This is a Subsubtitle&amp;quot;&lt;br /&gt;
  piece = &amp;quot;This is a Piece&amp;quot;&lt;br /&gt;
  opus = &amp;quot;Op. 000&amp;quot;&lt;br /&gt;
  instrument = &amp;quot;This is an Instrument&amp;quot;&lt;br /&gt;
  composer = &amp;quot;This is a Composer&amp;quot;&lt;br /&gt;
  arranger = &amp;quot;This is an Arranger&amp;quot;&lt;br /&gt;
  poet = &amp;quot;This is a Poet&amp;quot;&lt;br /&gt;
  copyright = &amp;quot;Copyrighted material&amp;quot;&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
{ \repeat unfold 60 { c&#039; d&#039; e&#039; f&#039; } \bar &amp;quot;|.&amp;quot; }&lt;br /&gt;
&amp;lt;/lilypond&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Editorial annotations]]&lt;br /&gt;
[[Category:Text]]&lt;br /&gt;
[[Category:Paper and layout]]&lt;br /&gt;
[[Category:Snippet]]&lt;/div&gt;</summary>
		<author><name>Lemzwerg</name></author>
	</entry>
</feed>