<?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=Ksnortum</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=Ksnortum"/>
	<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/wiki/Special:Contributions/Ksnortum"/>
	<updated>2026-06-18T06:43:40Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.44.2</generator>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=Curly_end_barline&amp;diff=6584</id>
		<title>Curly end barline</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=Curly_end_barline&amp;diff=6584"/>
		<updated>2026-06-17T13:21:16Z</updated>

		<summary type="html">&lt;p&gt;Ksnortum: Decrease paper size so there is less white space between the rendered image and the code&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Curly end barline supports svg output.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lilypond version=&amp;quot;2.24&amp;quot; full&amp;gt;&lt;br /&gt;
% http://lsr.di.unimi.it/LSR/Item?id=984&lt;br /&gt;
% Credits: PPS on March 2015&lt;br /&gt;
&lt;br /&gt;
% Paper block variables can be removed&lt;br /&gt;
\paper { &lt;br /&gt;
  #(set-paper-size &#039;(cons (* 75 mm) (* 50 mm)))&lt;br /&gt;
  tagline = ##f &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
endBarCurlyPath = \markup {&lt;br /&gt;
    \with-dimensions #&#039;(0 . 0) #&#039;(0 . 0)&lt;br /&gt;
    \override #&#039;(filled . #t) &lt;br /&gt;
    \path #0.01 &lt;br /&gt;
    #&#039;((moveto   -0.01   -1.95)&lt;br /&gt;
       (curveto   0.05   -1.10   0.02  -1.50   0.12   0.00)&lt;br /&gt;
       (curveto   0.18    0.80   0.25   1.63   0.38   1.63)&lt;br /&gt;
       (curveto   0.51    1.63   0.52   0.80   0.59   0.00)&lt;br /&gt;
       (curveto   0.66   -0.90   0.70  -1.54   0.91  -1.54)&lt;br /&gt;
       (curveto   1.04   -1.54   1.08  -1.10   1.23   0.00)&lt;br /&gt;
       (curveto   1.35    1.00   1.46   1.00   1.49   1.00)&lt;br /&gt;
       (curveto   1.57    1.00   1.59   0.69   1.63   0.00)&lt;br /&gt;
       (curveto   1.68   -0.70   1.75  -1.08   1.90  -1.08)&lt;br /&gt;
       (curveto   2.05   -1.08   2.05  -0.80   2.12  -0.30)&lt;br /&gt;
       (curveto   2.20    0.20   2.22   0.43   2.30   0.43)&lt;br /&gt;
       (curveto   2.36    0.43   2.37   0.20   2.43   0.00)&lt;br /&gt;
       (curveto   2.49   -0.20   2.51  -0.33   2.76  -0.34)&lt;br /&gt;
       (curveto   2.96   -0.34   3.20  -0.20   3.25  -0.07)&lt;br /&gt;
       (curveto   3.27   -0.01   3.24   0.00   3.23   0.00)&lt;br /&gt;
       (curveto   3.15    0.00   3.05  -0.30   2.80  -0.31)&lt;br /&gt;
       (curveto   2.67   -0.31   2.64  -0.27   2.55   0.05)&lt;br /&gt;
       (curveto   2.46    0.40   2.50   0.48   2.30   0.48)&lt;br /&gt;
       (curveto   2.15    0.48   2.10   0.00   2.07  -0.25)&lt;br /&gt;
       (curveto   2.00   -0.70   1.98  -1.02   1.92  -1.02)&lt;br /&gt;
       (curveto   1.82   -1.02   1.83  -0.60   1.80   0.05)&lt;br /&gt;
       (curveto   1.78    0.55   1.74   1.04   1.50   1.04)&lt;br /&gt;
       (curveto   1.30    1.04   1.25   0.65   1.16   0.00)&lt;br /&gt;
       (curveto   1.02   -1.20   0.96  -1.48   0.91  -1.48)&lt;br /&gt;
       (curveto   0.82   -1.48   0.82  -0.70   0.80  -0.25)&lt;br /&gt;
       (curveto   0.71    0.90   0.68   1.68   0.40   1.68)&lt;br /&gt;
       (curveto   0.15    1.68   0.12   1.00  -0.01  -0.40)&lt;br /&gt;
       (closepath))&lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
endBarCurly = {&lt;br /&gt;
  \once \override Staff.BarLine.stencil =&lt;br /&gt;
  #(lambda (grob)&lt;br /&gt;
     (ly:stencil-combine-at-edge&lt;br /&gt;
      (ly:bar-line::print grob)&lt;br /&gt;
      X RIGHT&lt;br /&gt;
      (grob-interpret-markup grob endBarCurlyPath)&lt;br /&gt;
      0))&lt;br /&gt;
  \bar &amp;quot;||&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
endBarCurlyTab = {&lt;br /&gt;
 \once \override Staff.BarLine.stencil =&lt;br /&gt;
  #(lambda (grob)&lt;br /&gt;
     (ly:stencil-combine-at-edge&lt;br /&gt;
      (ly:bar-line::print grob)&lt;br /&gt;
      X RIGHT&lt;br /&gt;
      (grob-interpret-markup grob &lt;br /&gt;
        #{&lt;br /&gt;
           \markup&lt;br /&gt;
           \scale #&#039;(1.8 . 1.8)&lt;br /&gt;
           \endBarCurlyPath&lt;br /&gt;
        #})&lt;br /&gt;
      0))&lt;br /&gt;
  \bar &amp;quot;||&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
%%% EXAMPLE %%%&lt;br /&gt;
#(set-global-staff-size 30)    &lt;br /&gt;
&lt;br /&gt;
\new Staff {&lt;br /&gt;
  c&#039;1 \endBarCurly&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
\new TabStaff {&lt;br /&gt;
 c&#039;1 \endBarCurlyTab&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lilypond&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Tweaks and overrides]]&lt;br /&gt;
[[Category:Symbols and glyphs]]&lt;br /&gt;
[[Category:Snippet]]&lt;/div&gt;</summary>
		<author><name>Ksnortum</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=Bracketed_passages&amp;diff=6576</id>
		<title>Bracketed passages</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=Bracketed_passages&amp;diff=6576"/>
		<updated>2026-06-10T18:33:15Z</updated>

		<summary type="html">&lt;p&gt;Ksnortum: Doesn&amp;#039;t need &amp;quot;full&amp;quot; indicator, or removing the tag line&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Code to make Lilypond draw left and right brackets vertically spanning a staff. This is intended to indicate an optional passage of music.&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=377&lt;br /&gt;
&lt;br /&gt;
% The below, invented by Mats Bengtsson, creates left and right brackets vertically &lt;br /&gt;
% spanning an entire staff. It is useful for offseting optional passages of music,&lt;br /&gt;
% as shown in the example&lt;br /&gt;
&lt;br /&gt;
% The number next to &amp;quot;th&amp;quot; in (th 0.2) controls thickness of the brackets. &lt;br /&gt;
#(define-markup-command (left-bracket layout props) ()&lt;br /&gt;
&amp;quot;Draw left hand bracket&amp;quot;&lt;br /&gt;
(let* ((th 0.2) ;; todo: take from GROB&lt;br /&gt;
	(width (* 2.5 th)) ;; todo: take from GROB&lt;br /&gt;
	(ext &#039;(-2.8 . 2.8))) ;; todo: take line-count into account&lt;br /&gt;
	(ly:bracket Y ext th width)))&lt;br /&gt;
&lt;br /&gt;
leftBracket = {&lt;br /&gt;
  \once\override BreathingSign.text = #(make-left-bracket-markup)&lt;br /&gt;
  \once\override BreathingSign.break-visibility = #end-of-line-invisible&lt;br /&gt;
  \once\override BreathingSign.Y-offset = ##f&lt;br /&gt;
  % Trick to print it after barlines and signatures:&lt;br /&gt;
  \once\override BreathingSign.break-align-symbol = #&#039;custos&lt;br /&gt;
  \breathe &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
#(define-markup-command (right-bracket layout props) ()&lt;br /&gt;
&amp;quot;Draw right hand bracket&amp;quot;&lt;br /&gt;
  (let* ((th .2);;todo: take from GROB&lt;br /&gt;
          (width (* 2.5 th)) ;; todo: take from GROB&lt;br /&gt;
          (ext &#039;(-2.8 . 2.8))) ;; todo: take line-count into account&lt;br /&gt;
        (ly:bracket Y ext th (- width))))&lt;br /&gt;
&lt;br /&gt;
rightBracket = {&lt;br /&gt;
  \once\override BreathingSign.text = #(make-right-bracket-markup)&lt;br /&gt;
  \once\override BreathingSign.Y-offset = ##f&lt;br /&gt;
  \breathe&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
%example of use:&lt;br /&gt;
\score { &lt;br /&gt;
  \relative c&#039;{ &lt;br /&gt;
    \set Score.timing=##f \key f \major&lt;br /&gt;
    f8( g4 a2 a8-- g4 f8 g4 f g f8[ e] f4 e2 f4 e2  &lt;br /&gt;
    \leftBracket &lt;br /&gt;
    g4. a8 bes2 a4 g a bes16[ a g8 a bes] c2 &lt;br /&gt;
    \bar&amp;quot;&amp;quot;&lt;br /&gt;
    \break  &lt;br /&gt;
    bes8[ a] g4 bes a2 g8[ a bes c a] bes2 a4.\( bes8\) a4 g g8_-[ f16 g] a4 g f g2) &lt;br /&gt;
    \rightBracket &lt;br /&gt;
    g8([ bes a g a bes]) &lt;br /&gt;
  }&lt;br /&gt;
  \layout{ &lt;br /&gt;
    \context{ &lt;br /&gt;
      \Staff &lt;br /&gt;
      \remove &amp;quot;Time_signature_engraver&amp;quot; &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:Tweaks and overrides]]&lt;br /&gt;
[[Category:Symbols and glyphs]]&lt;br /&gt;
[[Category:Workaround]]&lt;br /&gt;
[[Category:Snippet]]&lt;/div&gt;</summary>
		<author><name>Ksnortum</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=Talk:Arpeggio_bracket&amp;diff=6575</id>
		<title>Talk:Arpeggio bracket</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=Talk:Arpeggio_bracket&amp;diff=6575"/>
		<updated>2026-06-10T14:05:30Z</updated>

		<summary type="html">&lt;p&gt;Ksnortum: /* 2.26 Conversion Note */ new section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== 2.26 Conversion Note ==&lt;br /&gt;
&lt;br /&gt;
When this is converted to 2.26, it should use &amp;lt;code&amp;gt;\nonArpeggiato&amp;lt;/code&amp;gt;. [[User:Ksnortum|Ksnortum]] ([[User talk:Ksnortum|talk]]) 14:05, 10 June 2026 (UTC)&lt;/div&gt;</summary>
		<author><name>Ksnortum</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=Talk:Repeats_headword&amp;diff=6574</id>
		<title>Talk:Repeats headword</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=Talk:Repeats_headword&amp;diff=6574"/>
		<updated>2026-05-26T14:24:53Z</updated>

		<summary type="html">&lt;p&gt;Ksnortum: /* New property for initial repeat bar */ new section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== New property for initial repeat bar ==&lt;br /&gt;
&lt;br /&gt;
I believe this snippet should change in 2.26 as there is now a property &amp;lt;code&amp;gt;\set Score.printInitialRepeatBar = ##t\&amp;lt;/code&amp;gt; [[User:Ksnortum|Ksnortum]] ([[User talk:Ksnortum|talk]]) 14:24, 26 May 2026 (UTC)&lt;/div&gt;</summary>
		<author><name>Ksnortum</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=Automatically_coloring_grobs_to_indicate_when_their_direction_has_been_manually_set&amp;diff=6567</id>
		<title>Automatically coloring grobs to indicate when their direction has been manually set</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=Automatically_coloring_grobs_to_indicate_when_their_direction_has_been_manually_set&amp;diff=6567"/>
		<updated>2026-05-25T14:57:46Z</updated>

		<summary type="html">&lt;p&gt;Ksnortum: Doesn&amp;#039;t need &amp;quot;full&amp;quot; layout&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;When editing a piece of music, it can be helpful to see when the directions of slurs, stems, or other grobs have been manually set (as opposed to being automatically set by LilyPond). This snippet changes the color of grobs when their direction has been manually set. Red indicates up, and blue indicates down. It can be applied to all grobs, or just to certain types of grob (i.e. just &amp;lt;code&amp;gt;Slur&amp;lt;/code&amp;gt;, or just &amp;lt;code&amp;gt;Slur&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;TextScript&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;
%% http://lsr.di.unimi.it/LSR/Item?u=1&amp;amp;id=889&lt;br /&gt;
&lt;br /&gt;
%LSR thanks to David Kastrup for this code snippet.&lt;br /&gt;
%=&amp;gt; http://lilypond.1069038.n5.nabble.com/Catch-direction-operators-td151552i20.html&lt;br /&gt;
&lt;br /&gt;
\paper { tagline = ##f }&lt;br /&gt;
&lt;br /&gt;
colorizeDir =&lt;br /&gt;
#(define-music-function (item)&lt;br /&gt;
   (symbol-list-or-music?)&lt;br /&gt;
   (define (grob-colorize-dir grob)&lt;br /&gt;
     (let ((ev (event-cause grob)))&lt;br /&gt;
       (case (and ev (ly:event-property ev &#039;direction))&lt;br /&gt;
         ((1) red)&lt;br /&gt;
         ((-1) blue)&lt;br /&gt;
         (else &#039;()))))&lt;br /&gt;
   ;; updaters note for 2.20:&lt;br /&gt;
   ;; \tweak was changed in 2.20, thus switching to \override&lt;br /&gt;
   ;; (\override works for 2.18 as well)&lt;br /&gt;
   #{ \override $item . color = #grob-colorize-dir #})&lt;br /&gt;
&lt;br /&gt;
mapList =&lt;br /&gt;
#(define-music-function (fun lst)&lt;br /&gt;
   (ly:music-function? list?)&lt;br /&gt;
   #{ $@(map (lambda (s) #{ $fun $s #}) lst) #})&lt;br /&gt;
&lt;br /&gt;
music =&lt;br /&gt;
{&lt;br /&gt;
  a2-( b)&lt;br /&gt;
  a^( b)&lt;br /&gt;
  a&#039;&#039;_( b)&lt;br /&gt;
&lt;br /&gt;
  c&#039;&#039;-3\4-&amp;quot;xy&amp;quot;&lt;br /&gt;
  c&#039;&#039;_3^\4^&amp;quot;xy&amp;quot;&lt;br /&gt;
  c&#039;&#039;^3_\4_&amp;quot;xy&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
% only color Slur and TextScript grobs&lt;br /&gt;
\new Voice \with { \mapList #colorizeDir Slur.TextScript }&lt;br /&gt;
{ \music }&lt;br /&gt;
&lt;br /&gt;
% color all grobs&lt;br /&gt;
\new Voice \with { \mapList #colorizeDir #(map car all-grob-descriptions) }&lt;br /&gt;
{ \music }&lt;br /&gt;
&amp;lt;/lilypond&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Tweaks and overrides]]&lt;br /&gt;
[[Category:Scheme]]&lt;br /&gt;
[[Category:Snippet]]&lt;/div&gt;</summary>
		<author><name>Ksnortum</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=User_talk:Ksnortum&amp;diff=6563</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=6563"/>
		<updated>2026-05-17T19:05:36Z</updated>

		<summary type="html">&lt;p&gt;Ksnortum: Questions about the convert-ly templates&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;/div&gt;</summary>
		<author><name>Ksnortum</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=User:Ksnortum/Sandbox&amp;diff=6562</id>
		<title>User:Ksnortum/Sandbox</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=User:Ksnortum/Sandbox&amp;diff=6562"/>
		<updated>2026-05-17T18:53:30Z</updated>

		<summary type="html">&lt;p&gt;Ksnortum: Playing with templates for convert-ly&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Convert-ly-devel}} {{Convert-ly-2.26}} {{Convert-ly-stable}}&lt;/div&gt;</summary>
		<author><name>Ksnortum</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=User:Ksnortum&amp;diff=6561</id>
		<title>User:Ksnortum</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=User:Ksnortum&amp;diff=6561"/>
		<updated>2026-05-17T15:19:04Z</updated>

		<summary type="html">&lt;p&gt;Ksnortum: Add link to Sandbox&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I am a neurotic programmer/musician and an Admin here at the LilyPond wiki.  If you want to learn more about me, see [https://snortum.net/knute/ my webpage].  (Please note that I am &#039;&#039;not&#039;&#039; a web designer!)  You can see the scores I&#039;ve done in [https://github.com/search?q=owner%3Aksnortum+lilypond&amp;amp;type=repositories LilyPond on GitHub] and [https://www.mutopiaproject.org/cgibin/make-table.cgi?searchingfor=snortum&amp;amp;Composer=&amp;amp;Instrument=&amp;amp;Style=&amp;amp;timelength=1&amp;amp;timeunit=week&amp;amp;lilyversion=&amp;amp;preview=1 The Mupotia Project].&lt;br /&gt;
&lt;br /&gt;
[[/Sandbox]]&lt;/div&gt;</summary>
		<author><name>Ksnortum</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=Main_Page&amp;diff=6547</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=Main_Page&amp;diff=6547"/>
		<updated>2026-04-25T13:57:55Z</updated>

		<summary type="html">&lt;p&gt;Ksnortum: 2.24 is no longer the current stable release&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Welcome to the LilyPond wiki! This is a place where you can find and contribute commented code snippets for the [https://lilypond.org GNU LilyPond] music typesetting program.&lt;br /&gt;
&lt;br /&gt;
Use the search box to look for snippets, view the [[Special:AllPages|list of all pages]], or read the [[Help:Contributing|editing help]].  You might also enter a LilyPond Snippet Repository (LSR) number to access a redirection to the corresponding page.&lt;br /&gt;
&lt;br /&gt;
Most snippets are set up to use the stable LilyPond release 2.24 (the intended version is always shown in the snippet).  To use a newer version, don&#039;t forget to call {{Convert-ly-devel}} on the snippet since the syntax might have changed!&lt;/div&gt;</summary>
		<author><name>Ksnortum</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=Chord_with_ties_and_interval_bigger_than_a_fifth_(tie_fix)&amp;diff=6542</id>
		<title>Chord with ties and interval bigger than a fifth (tie fix)</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=Chord_with_ties_and_interval_bigger_than_a_fifth_(tie_fix)&amp;diff=6542"/>
		<updated>2026-04-15T20:11:17Z</updated>

		<summary type="html">&lt;p&gt;Ksnortum: &amp;quot;Full&amp;quot; layout not necessary&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Ties in three or more note chords, on legerlines and interval of a fifth or more.&amp;lt;br /&amp;gt;&lt;br /&gt;
The tie/s encroach upon the note column space, when they shouldn&#039;t.&amp;lt;br /&amp;gt;&lt;br /&gt;
Gould, p. 64, ex. (a) shows tie not going to centre of notehead, where notehead is and there&#039;s an interval bigger than a fifth.&amp;lt;br /&amp;gt;&lt;br /&gt;
This is bug issue 1126 Tie positioning not as expected.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lilypond version=&amp;quot;2.24&amp;quot;&amp;gt;&lt;br /&gt;
\paper { tagline = ##f }&lt;br /&gt;
&lt;br /&gt;
% adapted from the solution at the link below&lt;br /&gt;
% https://gitlab.com/lilypond/lilypond/-/issues/1126&lt;br /&gt;
\relative c&#039;&#039; { \mark without &amp;lt;g d g,&amp;gt;4~ &amp;lt;g, d&#039; g&amp;gt; r2 |&lt;br /&gt;
               &amp;lt;g&#039; d g,&amp;gt;1~ |&lt;br /&gt;
               &amp;lt;g, d&#039; g&amp;gt;1 |&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
\relative c&#039;&#039; { \mark with &amp;lt;g d g,&amp;gt;4~ &amp;lt;g d \tweak transparent ##t b g&amp;gt; r2 |&lt;br /&gt;
                &amp;lt;g,~ \tweak transparent ##t b d~ g~&amp;gt;1 |&lt;br /&gt;
                &amp;lt;g \tweak transparent ##t b d g&amp;gt;1 |&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lilypond&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Workaround]]&lt;br /&gt;
[[Category:Snippet]]&lt;/div&gt;</summary>
		<author><name>Ksnortum</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=User_talk:Ksnortum&amp;diff=6536</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=6536"/>
		<updated>2026-04-10T14:58:19Z</updated>

		<summary type="html">&lt;p&gt;Ksnortum: /* 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;/div&gt;</summary>
		<author><name>Ksnortum</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=User_talk:Ksnortum&amp;diff=6535</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=6535"/>
		<updated>2026-04-08T19:34:21Z</updated>

		<summary type="html">&lt;p&gt;Ksnortum: /* 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;/div&gt;</summary>
		<author><name>Ksnortum</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=Clef_change_at_the_beginning_of_a_piece&amp;diff=6527</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=6527"/>
		<updated>2026-04-08T16:47:08Z</updated>

		<summary type="html">&lt;p&gt;Ksnortum: Add &amp;quot;See also&amp;quot;&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;span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
 \version &amp;quot;2.24&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 %% &amp;lt;nowiki&amp;gt;http://lsr.di.unimi.it/LSR/Item?id=792&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 %% see also &amp;lt;nowiki&amp;gt;http://lilypond.org/doc/stable/Documentation/notation/displaying-pitches&amp;lt;/nowiki&amp;gt;&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;span&amp;gt;&amp;lt;/span&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>Ksnortum</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=Initial_clef_change&amp;diff=6526</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=6526"/>
		<updated>2026-04-08T16:45:47Z</updated>

		<summary type="html">&lt;p&gt;Ksnortum: Add &amp;quot;See also&amp;quot;&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 [[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;span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
 \version &amp;quot;2.24&amp;quot;&lt;br /&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;
 &amp;lt;nowiki&amp;gt;#&amp;lt;/nowiki&amp;gt;(define (initial-clef-change-engraver context)&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;  (let ((initial-clef-properties #f) (cclef #f) (keysigs &#039;()))&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;    ; macro for checking if any clef property has changed&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;    (define (clef-changed)&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;      (&amp;gt;&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;       (length initial-clef-properties)&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;       (length&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;        (filter&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;         (lambda (x) (equal? (cdr x) (ly:context-property context (car x))))&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;         initial-clef-properties))))&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;    (make-engraver&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;     ; Record initials propertis&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;     ((initialize engraver)&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;      (set!&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;       initial-clef-properties&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;       `((clefGlyph . ,(ly:context-property context &#039;clefGlyph))&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;         (clefPosition  . ,(ly:context-property context &#039;clefPosition))&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;         (middleCClefPosition . ,(ly:context-property context &#039;middleCClefPosition))&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;         (clefTransposition  . ,(ly:context-property context &#039;clefTransposition)))))&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;     ; Record the actual clef to adjust. Use details.muted to not acknowledge clef created by this engraver.&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;     (acknowledgers&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;      ((clef-interface engraver grob source-engraver)&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;       (if (not (assoc-get &#039;muted (ly:grob-property grob &#039;details) #f))&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;           (set! cclef grob)))&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;      ((key-signature-interface engraver grob source-engraver)&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;       (set! keysigs (cons grob keysigs))))&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;     ; Create a clef if necessary&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;     ((process-music engraver)&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;      (if (and initial-clef-properties (clef-changed))&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;          (let ((clef (ly:engraver-make-grob engraver &#039;Clef &#039;())))&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;            (ly:grob-set-property! clef &#039;staff-position (assoc-get &#039;clefPosition initial-clef-properties))&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;            (ly:grob-set-property! clef &#039;glyph (assoc-get &#039;clefGlyph initial-clef-properties))&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;            (ly:grob-set-nested-property! clef &#039;(details muted) #t)&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;            (if ((lambda (x) (and (number? x) (not (= 0 x))))&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;                 (assoc-get &#039;clefTransposition initial-clef-properties 0))&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;                (let ((mod (ly:engraver-make-grob engraver &#039;ClefModifier &#039;()))&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;                      (formatter (ly:context-property context &#039;clefTranspositionFormatter))&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;                      (style (ly:context-property context &#039;clefTranspositionStyle))&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;                      (dir (sign (assoc-get &#039;clefTransposition initial-clef-properties 0)))&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;                      (abs_trans (1+ (abs (assoc-get &#039;clefTransposition initial-clef-properties 0)))))&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;                  (if (procedure? formatter)&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;                      (ly:grob-set-property! mod &#039;text (formatter (number-&amp;gt;string abs_trans) style)))&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;                  (ly:grob-set-object! mod &#039;side-support-elements (ly:grob-list-&amp;gt;grob-array (list clef)))&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;                  (ly:grob-set-parent! mod X clef)&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;                  (ly:grob-set-parent! mod Y clef)&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;                  (ly:grob-set-property! mod &#039;direction dir))))))&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;     ; Adjust the actual clef and key signatures&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;     ((process-acknowledged engraver)&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;      (if (and cclef initial-clef-properties (clef-changed))&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;          (begin&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;           ; Key signatures need to be handled if they appear before the cue-clef&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;           ; This requires the break alignment information, so this only sets a&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;           ; hook which will be processed during `before-line-breaking` of the&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;           ; BreakAlignGroups&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;           (for-each&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;            (lambda (keysig)&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;              (let ((det (ly:grob-property keysig &#039;details))&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;                    (initial-clef-properties initial-clef-properties))&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;                (ly:grob-set-property!&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;                 keysig&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;                 &#039;details&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;                 (acons&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;                  &#039;break-alignment-handler&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;                  (lambda (grob break-alignment)&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;                    (let ((start-of-line&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;                           (vector-ref&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;                            (ly:grob-property break-alignment &#039;break-align-orders)&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;                            2)))&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;                      (if (member &#039;cue-clef (or (member &#039;key-signature start-of-line) &#039;()))&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;                          (ly:grob-set-property!&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;                           grob &#039;c0-position&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;                           (assoc-get &#039;middleCClefPosition initial-clef-properties)))))&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;                  det))))&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;            keysigs)&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;           (ly:grob-set-property! cclef &#039;non-default #t)&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;           (ly:grob-set-property! cclef &#039;break-align-symbol &#039;cue-clef)&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;           (if (not (eq? #t (ly:grob-property cclef &#039;full-size-change)))&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;               (ly:grob-set-property! cclef &#039;glyph-name&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;                                     (format #f &amp;quot;~a_change&amp;quot; (ly:grob-property cclef &#039;glyph)))))))&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;     ; Unset parameters&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;     ((stop-translation-timestep engraver)&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;      (set! initial-clef-properties #f)&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;      (set! clef #f)&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;      (set! keysigs &#039;())))))&lt;br /&gt;
 &lt;br /&gt;
 \layout {&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt; \context {&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;   \Staff&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;   \consists #initial-clef-change-engraver&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt; }&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt; \context {&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;   \Score&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;   \override BreakAlignGroup.before-line-breaking =&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;   #(lambda (grob)&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;      (let ((grobs (ly:grob-object grob &#039;elements))&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;            (break-alignment (ly:grob-parent grob X)))&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;        (if (not (null? grobs))&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;            (set! grobs (ly:grob-array-&amp;gt;list grobs)))&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;        (for-each&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;         (lambda (grob)&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;           (let* ((det (ly:grob-property grob &#039;details))&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;                  (handler (assoc-get &#039;break-alignment-handler det)))&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;             (if (procedure? handler)&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;                 (handler grob break-alignment))))&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;         grobs)))&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt; }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 \new Staff \with { \clef &amp;quot;bass^15&amp;quot; } {&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt; \key bes\major&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt; \clef &amp;quot;treble_8&amp;quot;&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt; c&#039;1 c&#039;1&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt; \clef bass&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt; c&#039;1&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 \score {&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt; \layout {&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;   \context {&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;     \Score&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;     \override BreakAlignment.break-align-orders =&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;     ##((staff-ellipsis&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;         left-edge&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;         cue-end-clef&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;         ambitus&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;         breathing-sign&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;         optional-material-end-bracket&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;         signum-repetitionis&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;         clef&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;         cue-clef&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;         staff-bar&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;         key-cancellation&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;         key-signature&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;         time-signature&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;         optional-material-start-bracket&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;         custos)&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;        (staff-ellipsis&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;         left-edge&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;         optional-material-end-bracket&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;         cue-end-clef&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;         ambitus&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;         breathing-sign&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;         signum-repetitionis&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;         clef&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;         cue-clef&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;         staff-bar&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;         key-cancellation&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;         key-signature&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;         time-signature&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;         optional-material-start-bracket&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;         custos)&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;        (staff-ellipsis&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;         left-edge&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;         optional-material-end-bracket&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;         ambitus&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;         breathing-sign&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;         signum-repetitionis&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;         clef&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;         cue-clef&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;         key-cancellation&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;         key-signature&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;         time-signature&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;         staff-bar&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;         optional-material-start-bracket&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;         custos))&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;   }&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt; }&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt; \new Staff \with { \clef &amp;quot;bass^15&amp;quot; } {&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;   \key bes\major&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;   \clef &amp;quot;treble_8&amp;quot;&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;   c&#039;1 c&#039;1&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;   \clef bass&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;   c&#039;1&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt; }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 % Basic usage:&lt;br /&gt;
 \score {&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt; &amp;lt;&amp;lt;&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;   % Just the treble clef&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;   \new Staff {&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;     \key bes \major&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;     c&amp;lt;nowiki&amp;gt;&#039;&#039;&amp;lt;/nowiki&amp;gt;1&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;   }&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;     &lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;   % Just the bass clef&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;   \new Staff \with { \clef bass  } {&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;     \key bes \major&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;     c1&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;   }&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;   &lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;   % Initial treble clef, then bass clef&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;   \new Staff {&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;     \key bes \major&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;     \clef bass &lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;     c1&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;   }&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;   &lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;   % Initial bass clef, then treble clef&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;   \new Staff \with { \clef bass  } {&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;     \key bes \major&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;     \clef treble &lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;     c&amp;lt;nowiki&amp;gt;&#039;&#039;&amp;lt;/nowiki&amp;gt;1&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;   }&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt; &amp;gt;&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt; \layout {&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;   \context {&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;     \Staff&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;     \consists #initial-clef-change-engraver&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt;   }&lt;br /&gt;
 &amp;lt;nowiki&amp;gt; &amp;lt;/nowiki&amp;gt; }&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;span&amp;gt;&amp;lt;/span&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>Ksnortum</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=Clef_change_at_the_beginning_of_a_piece_(alternative)&amp;diff=6525</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=6525"/>
		<updated>2026-04-08T16:44:01Z</updated>

		<summary type="html">&lt;p&gt;Ksnortum: Add &amp;quot;See also&amp;quot;&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;span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
 \version &amp;quot;2.24&amp;quot;&lt;br /&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;span&amp;gt;&amp;lt;/span&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>Ksnortum</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=Splitting_chords&amp;diff=6516</id>
		<title>Splitting chords</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=Splitting_chords&amp;diff=6516"/>
		<updated>2026-04-06T22:09:35Z</updated>

		<summary type="html">&lt;p&gt;Ksnortum: Node -&amp;gt; Note&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;span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
 \version &amp;quot;2.24&amp;quot;&lt;br /&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;nowiki&amp;gt;&amp;lt;b g&#039;&amp;gt;) &amp;lt;c e&amp;gt;-. g2 c2&amp;lt;/nowiki&amp;gt;&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;span&amp;gt;&amp;lt;/span&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>Ksnortum</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=Piano_%E2%80%9Chalf_sustain_pedal%E2%80%9D_indications&amp;diff=6474</id>
		<title>Piano “half sustain pedal” indications</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=Piano_%E2%80%9Chalf_sustain_pedal%E2%80%9D_indications&amp;diff=6474"/>
		<updated>2026-03-19T20:18:43Z</updated>

		<summary type="html">&lt;p&gt;Ksnortum: Formatting&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;When playing the piano, there a quite a few songs that require you to only press the sustain pedal half way (or even a quarter of the way in some cases).&lt;br /&gt;
&lt;br /&gt;
There is currently not a way to show these indications on the generated music in an intuitive way. This snippet provides functions that allow you to easily do this.&lt;br /&gt;
&lt;br /&gt;
The implementation is quite complicated, but basically there are two music functions that get defined, &amp;lt;code&amp;gt;sustainHalfOn&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;sustainHalfOff&amp;lt;/code&amp;gt;. You can use these just like you would normally use &amp;lt;code&amp;gt;sustainOn&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;sustainOff&amp;lt;/code&amp;gt;. You can use any of the sustain pedal styles, and everything will work as expected. You do need to add an explicit call to &amp;lt;code&amp;gt;sustainHalfOff&amp;lt;/code&amp;gt; when you want the half pedal to end. Calling &amp;lt;code&amp;gt;sustainOn&amp;lt;/code&amp;gt; does not automatically turn off &amp;lt;code&amp;gt;sustainHalfOn&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Under the covers, this works by representing sustain half on/half off as Una Corda pedal events. The logic temporarily changes the rendering of Una Corda pedals when you call &amp;lt;code&amp;gt;sustainHalfOn&amp;lt;/code&amp;gt;, and changes it back when you call &amp;lt;code&amp;gt;sustainHalfOff&amp;lt;/code&amp;gt;. We also temporarily change the value of &amp;lt;code&amp;gt;Staff.unaCordaPedalStyle&amp;lt;/code&amp;gt; to match the value of &amp;lt;code&amp;gt;Staff.sustainPedalStyle&amp;lt;/code&amp;gt; for the duration of the half sustain event so that the intended sustain pedal style will be used.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lilypond version=&amp;quot;2.24&amp;quot;&amp;gt;&lt;br /&gt;
%% This snippet defines functions that enable &amp;quot;1/2&amp;quot; pedal indications&lt;br /&gt;
%% to be used.  Using this is quite easy, just add \sustainHalfOn&lt;br /&gt;
%% in place of \sustainOn and \sustainHalfOff in place of \sustainOff&lt;br /&gt;
%%&lt;br /&gt;
%% This implementation fully supports &#039;mixed, &#039;text, and &#039;bracket pedal modes&lt;br /&gt;
%%&lt;br /&gt;
%% The new functions will honor the value of Staff.sustainPedalStyle when&lt;br /&gt;
%% doing the rendering.&lt;br /&gt;
%%&lt;br /&gt;
%% The implementation of these functions is a bit complicated.  In order to&lt;br /&gt;
%% force a new pedal indication when changing from half pedal to full pedal&lt;br /&gt;
%% or vice versa in mixed or bracket mode, internally this implementation&lt;br /&gt;
%% represents the half pedal events as UnaCorda pedal events.  Basically,&lt;br /&gt;
%% when \sustainHalfOn is called, we temporarily change the rendering&lt;br /&gt;
%% of the UnaCorda pedal indications so they look like a half pedal.&lt;br /&gt;
%% When \sustainHalfOff is called, they are changed back.  A side effect of&lt;br /&gt;
%% this is that having the UnaCorda pedal and 1/2 pedal active at the&lt;br /&gt;
%% same time is not possible with this implementation.&lt;br /&gt;
&lt;br /&gt;
%% Definitions of half-pedal functions.  Moving these to a Lilypond include file is recommended.&lt;br /&gt;
&lt;br /&gt;
#(define (half-pedal-stencil grob)&lt;br /&gt;
  (grob-interpret-markup &lt;br /&gt;
    grob &lt;br /&gt;
    (markup #:raise 0.1 &amp;quot;½&amp;quot; #:hspace -0.5 #:musicglyph &amp;quot;pedal.Ped&amp;quot;)))&lt;br /&gt;
&lt;br /&gt;
#(define (add-sustain-on note-event)&lt;br /&gt;
  (set! (ly:music-property note-event &#039;articulations)&lt;br /&gt;
   (cons&lt;br /&gt;
    (make-music &#039;UnaCordaEvent &#039;span-direction -1)&lt;br /&gt;
    (ly:music-property note-event &#039;articulations)))&lt;br /&gt;
  note-event)&lt;br /&gt;
&lt;br /&gt;
#(define (override-una-corda-strings)&lt;br /&gt;
  (context-spec-music&lt;br /&gt;
   (make-sequential-music&lt;br /&gt;
    (list&lt;br /&gt;
     (make-property-set &#039;pedalUnaCordaStrings (list &amp;quot;Ped.&amp;quot; &amp;quot;*Ped.&amp;quot; &amp;quot;*&amp;quot;))&lt;br /&gt;
     (make-apply-context&lt;br /&gt;
      (lambda (context)&lt;br /&gt;
       (ly:context-set-property! &lt;br /&gt;
         context &lt;br /&gt;
         &#039;pedalUnaCordaStyle &lt;br /&gt;
         (ly:context-property context &#039;pedalSustainStyle))))))&lt;br /&gt;
   &#039;Staff))&lt;br /&gt;
&lt;br /&gt;
#(define (revert-una-corda-strings)&lt;br /&gt;
  (context-spec-music&lt;br /&gt;
   (make-sequential-music&lt;br /&gt;
    (list&lt;br /&gt;
     (make-property-unset &#039;pedalUnaCordaStrings)&lt;br /&gt;
     (make-property-unset &#039;pedalUnaCordaStyle)))&lt;br /&gt;
   &#039;Staff))&lt;br /&gt;
&lt;br /&gt;
#(define (add-sustain-off note-event)&lt;br /&gt;
  (set! (ly:music-property note-event &#039;articulations)&lt;br /&gt;
   (cons&lt;br /&gt;
    (make-music &#039;UnaCordaEvent &#039;span-direction 1)&lt;br /&gt;
    (ly:music-property note-event &#039;articulations)))&lt;br /&gt;
  note-event)&lt;br /&gt;
&lt;br /&gt;
#(define (use-half-pedal-stencil)&lt;br /&gt;
  (context-spec-music&lt;br /&gt;
   (make-grob-property-set&lt;br /&gt;
    &#039;UnaCordaPedal&lt;br /&gt;
    &#039;stencil&lt;br /&gt;
    half-pedal-stencil)&lt;br /&gt;
   &#039;Staff))&lt;br /&gt;
&lt;br /&gt;
#(define (revert-pedal-stencil)&lt;br /&gt;
  (context-spec-music&lt;br /&gt;
   (make-grob-property-revert&lt;br /&gt;
    &#039;UnaCordaPedal&lt;br /&gt;
    &#039;stencil)&lt;br /&gt;
   &#039;Staff))&lt;br /&gt;
&lt;br /&gt;
sustainHalfOn =&lt;br /&gt;
#(define-music-function&lt;br /&gt;
  (note)&lt;br /&gt;
  (ly:music?)&lt;br /&gt;
&lt;br /&gt;
  (make-sequential-music&lt;br /&gt;
   (list&lt;br /&gt;
    (override-una-corda-strings)&lt;br /&gt;
    (use-half-pedal-stencil)&lt;br /&gt;
    (add-sustain-on note))))&lt;br /&gt;
&lt;br /&gt;
sustainHalfOff =&lt;br /&gt;
#(define-music-function&lt;br /&gt;
  (note)&lt;br /&gt;
  (ly:music?)&lt;br /&gt;
  (make-sequential-music&lt;br /&gt;
   (list&lt;br /&gt;
    (revert-pedal-stencil)&lt;br /&gt;
    (add-sustain-off note)&lt;br /&gt;
    (revert-una-corda-strings))))&lt;br /&gt;
&lt;br /&gt;
%% Half Pedal Example&lt;br /&gt;
&lt;br /&gt;
\new Staff {&lt;br /&gt;
  \set Staff.pedalSustainStyle = #&#039;mixed&lt;br /&gt;
  \sustainHalfOn&lt;br /&gt;
  b&#039;16 c&#039; d&#039; e&#039;&lt;br /&gt;
  \sustainHalfOff&lt;br /&gt;
  f&#039;&lt;br /&gt;
  \sustainOn&lt;br /&gt;
  g&#039; a&#039; a&#039; a&#039; a&#039; a&#039; c&#039;&lt;br /&gt;
  \sustainOff&lt;br /&gt;
  a&#039; a&#039;&lt;br /&gt;
  \sustainOn&lt;br /&gt;
  a&#039; a&#039;&lt;br /&gt;
  \sustainOff\sustainOn&lt;br /&gt;
  a&#039; a&#039; a&#039; a&#039;&lt;br /&gt;
  \sustainOff&lt;br /&gt;
  \set Staff.pedalSustainStyle = #&#039;text&lt;br /&gt;
  a&#039;&lt;br /&gt;
  \sustainHalfOn&lt;br /&gt;
  a&#039; a&#039; a&#039; a&#039;&lt;br /&gt;
  \sustainHalfOff&lt;br /&gt;
  a&#039;&lt;br /&gt;
  \sustainOn&lt;br /&gt;
  a&#039; a&#039; a&#039; a&#039; a&#039;&lt;br /&gt;
  \sustainOff&lt;br /&gt;
  a&#039;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lilypond&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Scheme]]&lt;br /&gt;
[[Category:Contexts and engravers]]&lt;br /&gt;
[[Category:Expressive marks]]&lt;br /&gt;
[[Category:Workaround]]&lt;br /&gt;
[[Category:Tweaks and overrides]]&lt;br /&gt;
[[Category:Snippet]]&lt;/div&gt;</summary>
		<author><name>Ksnortum</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=Talk:Airy_tone&amp;diff=6461</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=6461"/>
		<updated>2026-03-18T16:40:56Z</updated>

		<summary type="html">&lt;p&gt;Ksnortum: /* Circles not displaying in Wiki */ new section&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;/div&gt;</summary>
		<author><name>Ksnortum</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=Key_signatures_for_small_staves&amp;diff=6460</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=6460"/>
		<updated>2026-03-18T16:10:58Z</updated>

		<summary type="html">&lt;p&gt;Ksnortum: Does not need full page layout&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>Ksnortum</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=Box_around_notes&amp;diff=6458</id>
		<title>Box around notes</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=Box_around_notes&amp;diff=6458"/>
		<updated>2026-03-16T21:46:51Z</updated>

		<summary type="html">&lt;p&gt;Ksnortum: Fix cropping problem&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This snippet demonstrates how to add boxes around/behind notes. Boxes are automatically sized.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lilypond version=&amp;quot;2.24&amp;quot; full&amp;gt;&lt;br /&gt;
#(define-event-class &#039;music-boxer-event &#039;span-event)&lt;br /&gt;
&lt;br /&gt;
#(define-event-class &#039;box-event &#039;music-event)&lt;br /&gt;
&lt;br /&gt;
#(define (add-grob-definition grob-name grob-entry)&lt;br /&gt;
   (set! all-grob-descriptions&lt;br /&gt;
         (cons ((@@ (lily) completize-grob-entry)&lt;br /&gt;
                (cons grob-name grob-entry))&lt;br /&gt;
               all-grob-descriptions)))&lt;br /&gt;
&lt;br /&gt;
#(add-grob-definition&lt;br /&gt;
  &#039;LyricWord&lt;br /&gt;
  `(;(stencil . ,ly:lyric-word::print)&lt;br /&gt;
     (meta . ((class . Spanner)&lt;br /&gt;
              (interfaces . (lyric-hyphen-interface&lt;br /&gt;
                             lyric-word-interface&lt;br /&gt;
                             text-interface))))))&lt;br /&gt;
&lt;br /&gt;
#(define (make-box thick padding xext yext)&lt;br /&gt;
   (let ((xext (interval-widen xext padding))&lt;br /&gt;
         (yext (interval-widen yext padding)))&lt;br /&gt;
   (ly:stencil-add&lt;br /&gt;
    (make-filled-box-stencil xext (cons (- (car yext) thick) (car yext)))&lt;br /&gt;
    (make-filled-box-stencil xext (cons (cdr yext) (+ (cdr yext) thick)))&lt;br /&gt;
    (make-filled-box-stencil (cons (cdr xext) (+ (cdr xext) thick)) yext)&lt;br /&gt;
    (make-filled-box-stencil (cons (- (car xext) thick) (car xext)) yext))))&lt;br /&gt;
&lt;br /&gt;
#(define (music-boxer-stencil grob)&lt;br /&gt;
   (let* ((elts (ly:grob-object grob &#039;elements))&lt;br /&gt;
          (refp-X (ly:grob-common-refpoint-of-array grob elts X))&lt;br /&gt;
          (X-ext (ly:relative-group-extent elts refp-X X))&lt;br /&gt;
          (refp-Y (ly:grob-common-refpoint-of-array grob elts Y))&lt;br /&gt;
          (Y-ext (ly:relative-group-extent elts refp-Y Y))&lt;br /&gt;
          (padding (ly:grob-property grob &#039;padding 0.3))&lt;br /&gt;
          (stil (make-box 0.1 padding X-ext Y-ext))&lt;br /&gt;
          (offset (ly:grob-relative-coordinate grob refp-X X)))&lt;br /&gt;
     (ly:stencil-translate-axis stil (- offset) X)))&lt;br /&gt;
&lt;br /&gt;
#(define box-stil music-boxer-stencil)&lt;br /&gt;
&lt;br /&gt;
#(add-grob-definition&lt;br /&gt;
  &#039;Box&lt;br /&gt;
  `(&lt;br /&gt;
     (stencil . ,box-stil)&lt;br /&gt;
     (meta . ((class . Item)&lt;br /&gt;
              (interfaces . ())))))&lt;br /&gt;
&lt;br /&gt;
#(add-grob-definition&lt;br /&gt;
  &#039;MusicBoxer&lt;br /&gt;
  `(&lt;br /&gt;
     (stencil . ,music-boxer-stencil)&lt;br /&gt;
     (meta . ((class . Spanner)&lt;br /&gt;
              (interfaces . ())))))&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
#(define box-types&lt;br /&gt;
   &#039;(&lt;br /&gt;
      (BoxEvent&lt;br /&gt;
       . ((description . &amp;quot;A box encompassing music at a single timestep.&amp;quot;)&lt;br /&gt;
          (types . (general-music box-event music-event event))&lt;br /&gt;
          ))&lt;br /&gt;
      ))&lt;br /&gt;
&lt;br /&gt;
#(define music-boxer-types&lt;br /&gt;
   &#039;(&lt;br /&gt;
      (MusicBoxerEvent&lt;br /&gt;
       . ((description . &amp;quot;Used to signal where boxes encompassing music start and stop.&amp;quot;)&lt;br /&gt;
          (types . (general-music music-boxer-event span-event event))&lt;br /&gt;
          ))&lt;br /&gt;
      ))&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
#(set!&lt;br /&gt;
  music-boxer-types&lt;br /&gt;
  (map (lambda (x)&lt;br /&gt;
         (set-object-property! (car x)&lt;br /&gt;
           &#039;music-description&lt;br /&gt;
           (cdr (assq &#039;description (cdr x))))&lt;br /&gt;
         (let ((lst (cdr x)))&lt;br /&gt;
           (set! lst (assoc-set! lst &#039;name (car x)))&lt;br /&gt;
           (set! lst (assq-remove! lst &#039;description))&lt;br /&gt;
           (hashq-set! music-name-to-property-table (car x) lst)&lt;br /&gt;
           (cons (car x) lst)))&lt;br /&gt;
    music-boxer-types))&lt;br /&gt;
&lt;br /&gt;
#(set!&lt;br /&gt;
  box-types&lt;br /&gt;
  (map (lambda (x)&lt;br /&gt;
         (set-object-property! (car x)&lt;br /&gt;
           &#039;music-description&lt;br /&gt;
           (cdr (assq &#039;description (cdr x))))&lt;br /&gt;
         (let ((lst (cdr x)))&lt;br /&gt;
           (set! lst (assoc-set! lst &#039;name (car x)))&lt;br /&gt;
           (set! lst (assq-remove! lst &#039;description))&lt;br /&gt;
           (hashq-set! music-name-to-property-table (car x) lst)&lt;br /&gt;
           (cons (car x) lst)))&lt;br /&gt;
    box-types))&lt;br /&gt;
&lt;br /&gt;
#(set! music-descriptions&lt;br /&gt;
       (append music-boxer-types music-descriptions))&lt;br /&gt;
&lt;br /&gt;
#(set! music-descriptions&lt;br /&gt;
       (append box-types music-descriptions))&lt;br /&gt;
&lt;br /&gt;
#(set! music-descriptions&lt;br /&gt;
       (sort music-descriptions alist&amp;lt;?))&lt;br /&gt;
&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;
musicBoxerEngraver =&lt;br /&gt;
#(lambda (context)&lt;br /&gt;
   (let ((span &#039;())&lt;br /&gt;
         (finished &#039;())&lt;br /&gt;
         (current-event &#039;())&lt;br /&gt;
         (event-start &#039;())&lt;br /&gt;
         (event-stop &#039;()))&lt;br /&gt;
&lt;br /&gt;
     `((listeners&lt;br /&gt;
        (music-boxer-event .&lt;br /&gt;
          ,(lambda (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;
&lt;br /&gt;
       (acknowledgers&lt;br /&gt;
        (note-column-interface .&lt;br /&gt;
          ,(lambda (engraver grob source-engraver)&lt;br /&gt;
             (if (ly:spanner? span)&lt;br /&gt;
                 (begin&lt;br /&gt;
                  (ly:pointer-group-interface::add-grob span &#039;elements grob)&lt;br /&gt;
                  (add-bound-item span grob)))&lt;br /&gt;
             (if (ly:spanner? finished)&lt;br /&gt;
                 (begin&lt;br /&gt;
                  (ly:pointer-group-interface::add-grob finished &#039;elements grob)&lt;br /&gt;
                  (add-bound-item finished grob)))))&lt;br /&gt;
&lt;br /&gt;
        (inline-accidental-interface .&lt;br /&gt;
          ,(lambda (engraver grob source-engraver)&lt;br /&gt;
             (if (ly:spanner? span)&lt;br /&gt;
                 (begin&lt;br /&gt;
                  (ly:pointer-group-interface::add-grob span &#039;elements grob)))&lt;br /&gt;
             (if (ly:spanner? finished)&lt;br /&gt;
                 (ly:pointer-group-interface::add-grob finished &#039;elements grob))))&lt;br /&gt;
&lt;br /&gt;
        (script-interface .&lt;br /&gt;
          ,(lambda (engraver grob source-engraver)&lt;br /&gt;
             (if (ly:spanner? span)&lt;br /&gt;
                 (begin&lt;br /&gt;
                  (ly:pointer-group-interface::add-grob span &#039;elements grob)))&lt;br /&gt;
             (if (ly:spanner? finished)&lt;br /&gt;
                 (ly:pointer-group-interface::add-grob finished &#039;elements grob))))&lt;br /&gt;
&lt;br /&gt;
        (finger-interface .&lt;br /&gt;
          ,(lambda (engraver grob source-engraver)&lt;br /&gt;
             (if (ly:spanner? span)&lt;br /&gt;
                 (begin&lt;br /&gt;
                  (ly:pointer-group-interface::add-grob span &#039;elements grob)))&lt;br /&gt;
             (if (ly:spanner? finished)&lt;br /&gt;
                 (ly:pointer-group-interface::add-grob finished &#039;elements grob))))&lt;br /&gt;
&lt;br /&gt;
        ;; add additional interfaces to acknowledge here&lt;br /&gt;
&lt;br /&gt;
        )&lt;br /&gt;
&lt;br /&gt;
       (process-music .&lt;br /&gt;
         ,(lambda (trans)&lt;br /&gt;
            (if (ly:stream-event? event-stop)&lt;br /&gt;
                (if (null? span)&lt;br /&gt;
                    (ly:warning &amp;quot;No start to this box.&amp;quot;)&lt;br /&gt;
                    (begin&lt;br /&gt;
                     (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&lt;br /&gt;
                 (set! span (ly:engraver-make-grob trans &#039;MusicBoxer event-start))&lt;br /&gt;
                 (set! event-start &#039;())))))&lt;br /&gt;
&lt;br /&gt;
       (stop-translation-timestep .&lt;br /&gt;
         ,(lambda (trans)&lt;br /&gt;
            (if (and (ly:spanner? span)&lt;br /&gt;
                     (null? (ly:spanner-bound span LEFT)))&lt;br /&gt;
                (ly:spanner-set-bound! span LEFT&lt;br /&gt;
                  (ly:context-property context &#039;currentMusicalColumn)))&lt;br /&gt;
            (if (ly:spanner? finished)&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;currentMusicalColumn)))&lt;br /&gt;
                 (set! finished &#039;())&lt;br /&gt;
                 (set! event-start &#039;())&lt;br /&gt;
                 (set! event-stop &#039;())))))&lt;br /&gt;
&lt;br /&gt;
       (finalize&lt;br /&gt;
        (lambda (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;currentMusicalColumn)))&lt;br /&gt;
               (set! finished &#039;())))&lt;br /&gt;
          (if (ly:spanner? span)&lt;br /&gt;
              (begin&lt;br /&gt;
               (ly:warning &amp;quot;unterminated box :-(&amp;quot;)&lt;br /&gt;
               (ly:grob-suicide! span)&lt;br /&gt;
               (set! span &#039;()))))))))&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
boxEngraver =&lt;br /&gt;
#(lambda (context)&lt;br /&gt;
   (let ((box &#039;())&lt;br /&gt;
         (ev &#039;()))&lt;br /&gt;
&lt;br /&gt;
     `((listeners&lt;br /&gt;
        (box-event .&lt;br /&gt;
          ,(lambda (engraver event)&lt;br /&gt;
             (set! ev event))))&lt;br /&gt;
&lt;br /&gt;
       (acknowledgers&lt;br /&gt;
        (note-column-interface .&lt;br /&gt;
          ,(lambda (engraver grob source-engraver)&lt;br /&gt;
             (if (ly:grob? box)&lt;br /&gt;
                 (begin&lt;br /&gt;
                  ; (set! (ly:grob-parent box X) grob) ;; ??&lt;br /&gt;
                   (set! (ly:grob-parent box Y) grob)&lt;br /&gt;
                 (ly:pointer-group-interface::add-grob box &#039;elements grob)))))&lt;br /&gt;
&lt;br /&gt;
        (inline-accidental-interface .&lt;br /&gt;
          ,(lambda (engraver grob source-engraver)&lt;br /&gt;
             (if (ly:item? box)&lt;br /&gt;
                 (ly:pointer-group-interface::add-grob box &#039;elements grob))))&lt;br /&gt;
&lt;br /&gt;
        (script-interface .&lt;br /&gt;
          ,(lambda (engraver grob source-engraver)&lt;br /&gt;
             (if (ly:item? box)&lt;br /&gt;
                 (ly:pointer-group-interface::add-grob box &#039;elements grob))))&lt;br /&gt;
&lt;br /&gt;
        (finger-interface .&lt;br /&gt;
          ,(lambda (engraver grob source-engraver)&lt;br /&gt;
             (if (ly:item? box)&lt;br /&gt;
                 (ly:pointer-group-interface::add-grob box &#039;elements grob))))&lt;br /&gt;
&lt;br /&gt;
        ;; add additional interfaces to acknowledge here&lt;br /&gt;
&lt;br /&gt;
        )&lt;br /&gt;
&lt;br /&gt;
       (process-music .&lt;br /&gt;
         ,(lambda (trans)&lt;br /&gt;
            (if (ly:stream-event? ev)&lt;br /&gt;
                (begin&lt;br /&gt;
                 (set! box (ly:engraver-make-grob trans &#039;Box ev))&lt;br /&gt;
                 (set! ev &#039;())))))&lt;br /&gt;
       (stop-translation-timestep .&lt;br /&gt;
         ,(lambda (trans)&lt;br /&gt;
            (set! box &#039;()))))))&lt;br /&gt;
&lt;br /&gt;
musicBoxerStart =&lt;br /&gt;
#(make-span-event &#039;MusicBoxerEvent START)&lt;br /&gt;
&lt;br /&gt;
musicBoxerEnd =&lt;br /&gt;
#(make-span-event &#039;MusicBoxerEvent STOP)&lt;br /&gt;
&lt;br /&gt;
box = #(make-music &#039;BoxEvent)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% EXAMPLE %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%&lt;br /&gt;
&lt;br /&gt;
melody = \relative c&#039;&#039; {&lt;br /&gt;
  \set fingeringOrientations = #&#039;(left)&lt;br /&gt;
  %1&lt;br /&gt;
  \repeat volta 2 {&lt;br /&gt;
    \once\override Score.Box.padding = 0.5&lt;br /&gt;
    \box &amp;lt;g-3  c-2 f-1&amp;gt;1&lt;br /&gt;
    \musicBoxerStart d8-4 g,-0 d&#039; g, d&#039;-4 g,-0 d&#039; \musicBoxerEnd g,&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  %2&lt;br /&gt;
  \repeat volta 2 {&lt;br /&gt;
    \box &amp;lt;d&#039;-4  c&#039;-2 f-1&amp;gt;1\f\fermata&lt;br /&gt;
    \musicBoxerStart g8-3 d-0 g d g8-4 d-0 g \musicBoxerEnd d\accent&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
\score {&lt;br /&gt;
  \new Staff \melody&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
%% The following is only for display purposes only and can be removed&lt;br /&gt;
\paper {&lt;br /&gt;
  paper-height = 3.5\cm&lt;br /&gt;
  tagline = ##f&lt;br /&gt;
  indent = #0&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
\layout {&lt;br /&gt;
  \context {&lt;br /&gt;
    \Global&lt;br /&gt;
    \grobdescriptions #all-grob-descriptions&lt;br /&gt;
  }&lt;br /&gt;
  \context {&lt;br /&gt;
    \Score&lt;br /&gt;
    \consists \musicBoxerEngraver % for spans&lt;br /&gt;
    \consists \boxEngraver&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lilypond&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Education]]&lt;br /&gt;
[[Category:Editorial annotations]]&lt;br /&gt;
[[Category:Paper and layout]]&lt;br /&gt;
[[Category:Scheme]]&lt;br /&gt;
[[Category:Specific notation]]&lt;br /&gt;
[[Category:Snippet]]&lt;/div&gt;</summary>
		<author><name>Ksnortum</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=Flip&amp;diff=6457</id>
		<title>Flip</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=Flip&amp;diff=6457"/>
		<updated>2026-03-16T21:24:32Z</updated>

		<summary type="html">&lt;p&gt;Ksnortum: Full page layout not needed&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;code&amp;gt;\scale #&#039;(-1 . 1)&amp;lt;/code&amp;gt; workaround.&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=905&lt;br /&gt;
&lt;br /&gt;
% by P.P.Schneider on March 2014.&lt;br /&gt;
&lt;br /&gt;
\paper { tagline = ##f }&lt;br /&gt;
&lt;br /&gt;
%here starts the snippet:&lt;br /&gt;
&lt;br /&gt;
%%%% \flip:&lt;br /&gt;
#(define-markup-command (flip layout props arg) (markup?) &lt;br /&gt;
   (interpret-markup layout props&lt;br /&gt;
     (markup &lt;br /&gt;
      #:concat (&lt;br /&gt;
        #:null &lt;br /&gt;
        #:scale (cons -1 1)&lt;br /&gt;
          #:line (arg)))))&lt;br /&gt;
%%%% end \flip.&lt;br /&gt;
&lt;br /&gt;
myScr= { c&#039;1 }&lt;br /&gt;
&lt;br /&gt;
\markuplist {&lt;br /&gt;
  \italic\concat { &lt;br /&gt;
    &amp;quot;This markup uses &amp;quot; &lt;br /&gt;
    \typewriter &amp;quot;\scale #&#039;(-1 . 1)&amp;quot; &lt;br /&gt;
    &amp;quot; to flip a score&amp;quot;&lt;br /&gt;
    \hspace #0.3 &amp;quot;:&amp;quot; &lt;br /&gt;
  }&lt;br /&gt;
  \vspace #0.2&lt;br /&gt;
  \line { &lt;br /&gt;
    \concat { &lt;br /&gt;
      &amp;quot;This flipped score&amp;quot; &lt;br /&gt;
      \hspace#.3 &lt;br /&gt;
      &amp;quot;:&amp;quot; &lt;br /&gt;
    } &lt;br /&gt;
    \raise #1&lt;br /&gt;
    \scale #&#039;(-1 . 1)&lt;br /&gt;
    \score {&lt;br /&gt;
      \myScr&lt;br /&gt;
      \layout {&lt;br /&gt;
        indent = 0&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
    &amp;quot; is mine.&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
  \vspace#1&lt;br /&gt;
  \concat\italic { &lt;br /&gt;
    &amp;quot;Here&#039;s the side-effect when starting a markup with &amp;quot; &lt;br /&gt;
    \typewriter &amp;quot;\scale #&#039;(-1 . 1)&amp;quot;&lt;br /&gt;
    \hspace #0.3 &lt;br /&gt;
    &amp;quot;:&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
  \vspace#.2&lt;br /&gt;
  \line { &lt;br /&gt;
    \scale #&#039;(-1 . 1)&lt;br /&gt;
    \score {&lt;br /&gt;
      \myScr&lt;br /&gt;
      \layout {&lt;br /&gt;
        indent = 0&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
    \lower #1&lt;br /&gt;
    \concat { &lt;br /&gt;
      &amp;quot; My beloved score is leaving&amp;quot;&lt;br /&gt;
      \hspace #0.3 &lt;br /&gt;
      &amp;quot;!&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
  \vspace#1&lt;br /&gt;
  \concat\italic { &lt;br /&gt;
    &amp;quot;Here&#039;s a possible workaround using &amp;quot; &lt;br /&gt;
    \typewriter &amp;quot;\left-align&amp;quot;&lt;br /&gt;
    \hspace #0.3 &lt;br /&gt;
    &amp;quot;:&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
  \vspace#.2&lt;br /&gt;
  \left-align&lt;br /&gt;
  \line { &lt;br /&gt;
    \scale #&#039;(-1 . 1) &lt;br /&gt;
    \score {&lt;br /&gt;
      \myScr&lt;br /&gt;
      \layout {&lt;br /&gt;
        indent = 0&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
    \lower #1&lt;br /&gt;
    \concat { &lt;br /&gt;
      &amp;quot; It&#039;s coming back&amp;quot;&lt;br /&gt;
      \hspace #0.3 &lt;br /&gt;
      &amp;quot;!&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
  \vspace#1&lt;br /&gt;
  \concat\italic {&lt;br /&gt;
    &amp;quot;And this one uses a simple &amp;quot; &lt;br /&gt;
    \typewriter &amp;quot;\flip&amp;quot;&lt;br /&gt;
    &amp;quot; command that avoids using &amp;quot; &lt;br /&gt;
    \typewriter &amp;quot;\left-align&amp;quot;&lt;br /&gt;
    \hspace #0.3 &lt;br /&gt;
    &amp;quot;:&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
  \vspace#.2&lt;br /&gt;
  \line {&lt;br /&gt;
    \flip&lt;br /&gt;
    \score {&lt;br /&gt;
      \myScr&lt;br /&gt;
      \layout {&lt;br /&gt;
        indent = 0&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
    \lower #1&lt;br /&gt;
    \concat { &lt;br /&gt;
      &amp;quot; Now it&#039;s home.&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lilypond&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Text]]&lt;br /&gt;
[[Category:Scheme]]&lt;br /&gt;
[[Category:Workaround]]&lt;br /&gt;
[[Category:Snippet]]&lt;/div&gt;</summary>
		<author><name>Ksnortum</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=Combining_pedal_notes_with_clef_changes&amp;diff=6456</id>
		<title>Combining pedal notes with clef changes</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=Combining_pedal_notes_with_clef_changes&amp;diff=6456"/>
		<updated>2026-03-16T21:16:25Z</updated>

		<summary type="html">&lt;p&gt;Ksnortum: Full page layout not needed&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In piano music, you may occasionally come across a staff in which a held (pedal) note is followed by a clef change and further polyphonic notation.&lt;br /&gt;
&lt;br /&gt;
With a little bit of work involving clef settings, you can overcome this problematic situation.&lt;br /&gt;
&lt;br /&gt;
In the first figure, we can see that a clef change in one voice messes with the pedal note in a lower voice; the tie appears to have changed voices.&lt;br /&gt;
&lt;br /&gt;
You can create a “fake” treble clef which has the properties of a bass clef by overriding the following properties:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;\set Staff.clefGlyph = #&amp;amp;quot;clefs.G&amp;amp;quot;&amp;lt;/code&amp;gt; - show a G clef&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;\set Staff.clefPosition = #-2&amp;lt;/code&amp;gt; - set the staff position two half spaces below centre line (i.e., on G)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;\set Staff.middleCPosition = #6&amp;lt;/code&amp;gt; - set middle C to the same position as a bass clef&lt;br /&gt;
&lt;br /&gt;
The second figure shows the solution as applied to the final bar of a Wolf lied. The pedal note E flat is followed by a treble clef and a high octave E flat. Since we are effectively still in the bass clef, we have to input the octave E flat as an octave G to produce the required output. Using &amp;lt;code&amp;gt;\tag&amp;lt;/code&amp;gt; splits the musical layout and MIDI so you can use &amp;lt;code&amp;gt;\keepWithTag #&#039;midi&amp;lt;/code&amp;gt; in a MIDI &amp;lt;code&amp;gt;\score&amp;lt;/code&amp;gt; block.&lt;br /&gt;
&lt;br /&gt;
The third figure shows a more extended example from Debussy&#039;s &#039;&#039;L&#039;Isle joyeuse&#039;&#039; in which the bass clef is faked.&lt;br /&gt;
&lt;br /&gt;
Finally, the fourth figure shows the same Debussy excerpt with an additional feature you may encounter: the pedal note is preceded by a small cautionary clef printed after the barline.&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=326&lt;br /&gt;
&lt;br /&gt;
% Treble clef with properties of bass clef&lt;br /&gt;
fakeTrebleClef = {&lt;br /&gt;
  \set Staff.clefGlyph = #&amp;quot;clefs.G&amp;quot;&lt;br /&gt;
  \set Staff.clefPosition = #-2&lt;br /&gt;
  \set Staff.middleCPosition = #6&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
% Bass clef with properties of treble clef&lt;br /&gt;
fakeBassClef = {&lt;br /&gt;
  \set Staff.clefGlyph = #&amp;quot;clefs.F&amp;quot;&lt;br /&gt;
  \set Staff.clefPosition = #2&lt;br /&gt;
  \set Staff.middleCPosition = #-6&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
% Similar to above, but lower and positioned after barline&lt;br /&gt;
fakeBassClefShift = {&lt;br /&gt;
  % Change default prefatory item order so that clef is printed after barline&lt;br /&gt;
  \override Score.BreakAlignment.break-align-orders =&lt;br /&gt;
    #(make-vector 3 &#039;(span-bar&lt;br /&gt;
                      breathing-sign&lt;br /&gt;
                      staff-bar&lt;br /&gt;
                      clef&lt;br /&gt;
                      key&lt;br /&gt;
                      time-signature))&lt;br /&gt;
  \set Staff.clefGlyph = #&amp;quot;clefs.F&amp;quot;&lt;br /&gt;
  \set Staff.clefPosition = #-8&lt;br /&gt;
  \set Staff.middleCPosition = #-6&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
\markup {&lt;br /&gt;
  1. Without tweaking clef properties, output is nonsensical }&lt;br /&gt;
\score {&lt;br /&gt;
  \new Staff \relative c {&lt;br /&gt;
    \clef bass \voiceTwo&lt;br /&gt;
    c2 ~&lt;br /&gt;
    &amp;lt;&amp;lt;&lt;br /&gt;
      { c | }&lt;br /&gt;
      \new Voice \relative c&#039;&#039; {&lt;br /&gt;
        \clef treble \voiceOne&lt;br /&gt;
        c8 c g&#039; g |&lt;br /&gt;
      }&lt;br /&gt;
    &amp;gt;&amp;gt;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
\markup {&lt;br /&gt;
  2. Final bar of&lt;br /&gt;
  \italic &amp;quot;Gesegnet sei, durch den die Welt entstund...&amp;quot;&lt;br /&gt;
  from Wolf&#039;s \italic &amp;quot;Italienisches Liederbuch&amp;quot; }&lt;br /&gt;
\score {&lt;br /&gt;
  \new PianoStaff &amp;lt;&amp;lt;&lt;br /&gt;
    \new Staff \relative c&#039; {&lt;br /&gt;
      \key es \major&lt;br /&gt;
      \override DynamicLineSpanner.padding = #2.5&lt;br /&gt;
      &amp;lt;bes es g&amp;gt;8\ppp &amp;lt;bes es g&amp;gt;&lt;br /&gt;
      &amp;lt;bes es g&amp;gt;[ &amp;lt;bes es g&amp;gt;] ~ &amp;lt;bes es g&amp;gt;2\fermata \bar &amp;quot;||&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
    \new Staff \relative c \keepWithTag #&#039;layout {&lt;br /&gt;
      \clef bass \key es \major&lt;br /&gt;
      r8. \stemDown &amp;lt;es es,&amp;gt;16 &amp;lt;es es,&amp;gt;4 ~&lt;br /&gt;
      &amp;lt;&amp;lt;&lt;br /&gt;
        { \voiceTwo &amp;lt;es es,&amp;gt;2 }&lt;br /&gt;
        \new Voice {&lt;br /&gt;
          % The faked clef and notes&lt;br /&gt;
          \voiceOne \tag #&#039;layout { \fakeTrebleClef &amp;lt;g g&#039;&amp;gt;\fermata }&lt;br /&gt;
          % The real notes for MIDI output&lt;br /&gt;
          \tag #&#039;midi { &amp;lt;es&#039;&#039; es&#039;&amp;gt; }&lt;br /&gt;
        }&lt;br /&gt;
      &amp;gt;&amp;gt; \bar &amp;quot;|.&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
  &amp;gt;&amp;gt;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
\markup {&lt;br /&gt;
  3. Bars 148 - 151 from Debussy&#039;s \italic &amp;quot;L&#039;Isle joyeuse&amp;quot; }&lt;br /&gt;
\score {&lt;br /&gt;
  \new PianoStaff &amp;lt;&amp;lt;&lt;br /&gt;
    \new Staff \relative c&#039; {&lt;br /&gt;
      \time 3/8&lt;br /&gt;
      \set subdivideBeams = ##t&lt;br /&gt;
      \override TupletNumber.stencil = ##f&lt;br /&gt;
      \override TupletBracket.stencil = ##f&lt;br /&gt;
      \tieDotted&lt;br /&gt;
      &amp;lt;&amp;lt;&lt;br /&gt;
        {&lt;br /&gt;
          \voiceOne&lt;br /&gt;
          \tuplet 3/2 {&lt;br /&gt;
            fis16( e d \repeat unfold 5 { c d e fis e d } c d e) }&lt;br /&gt;
        }&lt;br /&gt;
        \new Voice {&lt;br /&gt;
          \voiceTwo&lt;br /&gt;
          bes4. ~ |&lt;br /&gt;
          bes |&lt;br /&gt;
          bes ~ |&lt;br /&gt;
          bes |&lt;br /&gt;
        }&lt;br /&gt;
      &amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
      &amp;lt;&amp;gt;^\markup {&lt;br /&gt;
          4. As above, but with small clefs on pedal notes }&lt;br /&gt;
      &amp;lt;&amp;lt;&lt;br /&gt;
        {&lt;br /&gt;
          \tuplet 3/2 {&lt;br /&gt;
            fis&#039;16( e d \repeat unfold 5 { c d e fis e d } c d e) }&lt;br /&gt;
        }&lt;br /&gt;
        \new Voice {&lt;br /&gt;
          \voiceTwo&lt;br /&gt;
          bes4. ~ |&lt;br /&gt;
          bes |&lt;br /&gt;
          bes ~ |&lt;br /&gt;
          bes |&lt;br /&gt;
        }&lt;br /&gt;
      &amp;gt;&amp;gt;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    \new Staff \relative c&#039;&#039; \keepWithTag #&#039;layout {&lt;br /&gt;
      \time 3/8&lt;br /&gt;
      &amp;lt;&amp;lt;&lt;br /&gt;
        {&lt;br /&gt;
          \voiceOne&lt;br /&gt;
          bes8\rest \clef treble as16( c as8)&lt;br /&gt;
          as16( c as8) as16( c)&lt;br /&gt;
          bes( d bes8. d16)&lt;br /&gt;
          bes8.( d16 bes8)&lt;br /&gt;
        }&lt;br /&gt;
        \new Voice {&lt;br /&gt;
          \voiceTwo&lt;br /&gt;
          \tag #&#039;layout {&lt;br /&gt;
            \fakeBassClef&lt;br /&gt;
            a,4. ~ |&lt;br /&gt;
            a ~ |&lt;br /&gt;
            a ~ |&lt;br /&gt;
            a |&lt;br /&gt;
          }&lt;br /&gt;
          \tag #&#039;midi {&lt;br /&gt;
            c,, ~ |&lt;br /&gt;
            c ~ |&lt;br /&gt;
            c ~ |&lt;br /&gt;
            c |&lt;br /&gt;
          }&lt;br /&gt;
        }&lt;br /&gt;
      &amp;gt;&amp;gt;&lt;br /&gt;
      % Make clefs visible for each bar, except at end of system&lt;br /&gt;
      \override Staff.Clef.break-visibility = #end-of-line-invisible&lt;br /&gt;
      &amp;lt;&amp;lt;&lt;br /&gt;
        {&lt;br /&gt;
          \voiceOne&lt;br /&gt;
          bes&#039;8\rest \clef treble as16( c as8)&lt;br /&gt;
          as16( c as8) as16( c)&lt;br /&gt;
          bes( d bes8. d16)&lt;br /&gt;
          bes8.( d16 bes8)&lt;br /&gt;
        }&lt;br /&gt;
        \new Voice {&lt;br /&gt;
          \voiceTwo&lt;br /&gt;
          \tag #&#039;layout {&lt;br /&gt;
            \fakeBassClef&lt;br /&gt;
            a,4. ~ |&lt;br /&gt;
            % Shrink clef to small size&lt;br /&gt;
            \override Staff.Clef.font-size = #-5&lt;br /&gt;
            % We want to prevent clef size changing,&lt;br /&gt;
            % otherwise first clef is smaller&lt;br /&gt;
            \override Staff.Clef.full-size-change = ##t&lt;br /&gt;
            % The faked bass clef, printed after the barline and next&lt;br /&gt;
            % to the pedal note&lt;br /&gt;
            \fakeBassClefShift&lt;br /&gt;
            a ~ |&lt;br /&gt;
            % Because we have overridden break-visibility,&lt;br /&gt;
            % the cautionary clef is also displayed here...&lt;br /&gt;
            a ~ |&lt;br /&gt;
            % ...and here&lt;br /&gt;
            a |&lt;br /&gt;
            % Return to default clef properties&lt;br /&gt;
            \revert Score.BreakAlignment.break-align-orders&lt;br /&gt;
            \revert Staff.Clef.font-size&lt;br /&gt;
            \revert Staff.Clef.full-size-change&lt;br /&gt;
          }&lt;br /&gt;
          \tag #&#039;midi {&lt;br /&gt;
            c,, ~ |&lt;br /&gt;
            c ~ |&lt;br /&gt;
            c ~ |&lt;br /&gt;
            c |&lt;br /&gt;
          }&lt;br /&gt;
        }&lt;br /&gt;
      &amp;gt;&amp;gt;&lt;br /&gt;
    }&lt;br /&gt;
  &amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  \layout {&lt;br /&gt;
    \context {&lt;br /&gt;
      \Score&lt;br /&gt;
      \remove &amp;quot;Bar_number_engraver&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lilypond&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Instrument-specific]]&lt;br /&gt;
[[Category:Pitches]]&lt;br /&gt;
[[Category:Keyboards]]&lt;br /&gt;
[[Category:Specific notation]]&lt;br /&gt;
[[Category:Really cool]]&lt;br /&gt;
[[Category:Real music]]&lt;br /&gt;
[[Category:Snippet]]&lt;/div&gt;</summary>
		<author><name>Ksnortum</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=Feta_font_chart&amp;diff=6455</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=6455"/>
		<updated>2026-03-16T21:04:10Z</updated>

		<summary type="html">&lt;p&gt;Ksnortum: No need for full page layout&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;
%% http://lsr.di.unimi.it/LSR/Item?id=132&lt;br /&gt;
&lt;br /&gt;
\score {&lt;br /&gt;
    &amp;lt;&amp;lt;&lt;br /&gt;
      \override Score.LyricText.font-family = #&#039;typewriter&lt;br /&gt;
      \override Score.LyricText.font-shape = #&#039;upright&lt;br /&gt;
      \context Staff  {&lt;br /&gt;
	\set Score.timing = ##f&lt;br /&gt;
	\set Score.forbidBreakBetweenBarLines = ##f&lt;br /&gt;
	\override Staff.BarLine.transparent = ##t&lt;br /&gt;
        c&#039;&#039;\accent             c&#039;&#039;\marcato            c&#039;&#039;\staccatissimo&lt;br /&gt;
        c&#039;&#039;\staccato           c&#039;&#039;\tenuto             c&#039;&#039;\portato&lt;br /&gt;
        c&#039;&#039;\upbow              c&#039;&#039;\downbow            c&#039;&#039;\flageolet&lt;br /&gt;
        c&#039;&#039;\thumb              c&#039;&#039;^\lheel              c&#039;&#039;\rheel&lt;br /&gt;
        c&#039;&#039;^\ltoe               c&#039;&#039;\rtoe               c&#039;&#039;\open&lt;br /&gt;
        c&#039;&#039;\stopped            c&#039;&#039;\turn               c&#039;&#039;\reverseturn&lt;br /&gt;
        c&#039;&#039;\trill              c&#039;&#039;\prall              c&#039;&#039;\mordent&lt;br /&gt;
        c&#039;&#039;\prallprall         c&#039;&#039;\prallmordent       c&#039;&#039;\upprall&lt;br /&gt;
        c&#039;&#039;\downprall          c&#039;&#039;\upmordent          c&#039;&#039;\downmordent&lt;br /&gt;
        c&#039;&#039;\pralldown          c&#039;&#039;\prallup            c&#039;&#039;\lineprall&lt;br /&gt;
        c&#039;&#039;\signumcongruentiae c&#039;&#039;\shortfermata       c&#039;&#039;\fermata&lt;br /&gt;
        c&#039;&#039;\longfermata        c&#039;&#039;\verylongfermata    c&#039;&#039;\segno&lt;br /&gt;
        c&#039;&#039;\coda               c&#039;&#039;\varcoda&lt;br /&gt;
      }&lt;br /&gt;
      \context 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;
&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>Ksnortum</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=Positioning_a_%5Cfermata_over_the_last_bar_line&amp;diff=6453</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=6453"/>
		<updated>2026-03-15T16:07:16Z</updated>

		<summary type="html">&lt;p&gt;Ksnortum: Remove old syntax from text&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;
%% http://lsr.di.unimi.it/LSR/Item?id=1&lt;br /&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>Ksnortum</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=Manipulating_slurs_via_%27positions_and_%27extra-offset&amp;diff=6451</id>
		<title>Manipulating slurs via &#039;positions and &#039;extra-offset</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=Manipulating_slurs_via_%27positions_and_%27extra-offset&amp;diff=6451"/>
		<updated>2026-03-12T21:43:58Z</updated>

		<summary type="html">&lt;p&gt;Ksnortum: Undo revision 6450 by Ksnortum (talk)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;There is a command to change slurs, &amp;lt;code&amp;gt;\override Slur.positions&amp;lt;/code&amp;gt;. Actually the influence of this command is limited, e.g. if you like the shape of the slur and you want to shift it a little bit,&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;\override Slur.positions&amp;lt;/code&amp;gt; does not exactly what you want.&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;slurShift&amp;lt;/code&amp;gt; shifts the slur exactly the amount you want without changing the shape, &amp;lt;code&amp;gt;slurShiftx&amp;lt;/code&amp;gt; combines &amp;lt;code&amp;gt;slurShift&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;Slur.positions&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lilypond version=&amp;quot;2.24&amp;quot; full&amp;gt;&lt;br /&gt;
\paper { tagline = ##f }&lt;br /&gt;
&lt;br /&gt;
slurShift=&lt;br /&gt;
#(define-music-function (amount)&lt;br /&gt;
   (pair?)&lt;br /&gt;
   #{&lt;br /&gt;
     \once \override Slur.extra-offset = $amount&lt;br /&gt;
   #})&lt;br /&gt;
&lt;br /&gt;
slurShiftx=&lt;br /&gt;
#(define-music-function (amount offsets)&lt;br /&gt;
   (pair? pair?)&lt;br /&gt;
   #{&lt;br /&gt;
     \once \override Slur.positions = $offsets&lt;br /&gt;
     \once \override Slur.extra-offset = $amount&lt;br /&gt;
   #})&lt;br /&gt;
&lt;br /&gt;
\relative c, {&lt;br /&gt;
  \clef bass&lt;br /&gt;
  c8(-&amp;quot;default slur&amp;quot; g&#039;&#039; e&#039; g, c g c g )&lt;br /&gt;
  \slurShift  #&#039;(0 . 1)&lt;br /&gt;
  c,,8(-&amp;quot;slurShift #&#039;(0 . 1)&amp;quot; g&#039;&#039; e&#039; g, c g c g )&lt;br /&gt;
  \slurShiftx  #&#039;(2 . 2) #&#039;(0 . 6)&lt;br /&gt;
  c,,8(-&amp;quot;slurShiftx #&#039;(2 . 2) #&#039;(0 . 6)&amp;quot;&lt;br /&gt;
  g&#039;&#039; e&#039; g, c g c g )&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lilypond&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Tweaks and overrides]]&lt;br /&gt;
[[Category:Scheme]]&lt;br /&gt;
[[Category:Snippet]]&lt;/div&gt;</summary>
		<author><name>Ksnortum</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=Manipulating_slurs_via_%27positions_and_%27extra-offset&amp;diff=6450</id>
		<title>Manipulating slurs via &#039;positions and &#039;extra-offset</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=Manipulating_slurs_via_%27positions_and_%27extra-offset&amp;diff=6450"/>
		<updated>2026-03-12T21:40:29Z</updated>

		<summary type="html">&lt;p&gt;Ksnortum: Does not need full page layout&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;There is a command to change slurs, &amp;lt;code&amp;gt;\override Slur.positions&amp;lt;/code&amp;gt;. Actually the influence of this command is limited, e.g. if you like the shape of the slur and you want to shift it a little bit,&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;\override Slur.positions&amp;lt;/code&amp;gt; does not exactly what you want.&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;slurShift&amp;lt;/code&amp;gt; shifts the slur exactly the amount you want without changing the shape, &amp;lt;code&amp;gt;slurShiftx&amp;lt;/code&amp;gt; combines &amp;lt;code&amp;gt;slurShift&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;Slur.positions&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;
slurShift=&lt;br /&gt;
#(define-music-function (amount)&lt;br /&gt;
   (pair?)&lt;br /&gt;
   #{&lt;br /&gt;
     \once \override Slur.extra-offset = $amount&lt;br /&gt;
   #})&lt;br /&gt;
&lt;br /&gt;
slurShiftx=&lt;br /&gt;
#(define-music-function (amount offsets)&lt;br /&gt;
   (pair? pair?)&lt;br /&gt;
   #{&lt;br /&gt;
     \once \override Slur.positions = $offsets&lt;br /&gt;
     \once \override Slur.extra-offset = $amount&lt;br /&gt;
   #})&lt;br /&gt;
&lt;br /&gt;
\relative c, {&lt;br /&gt;
  \clef bass&lt;br /&gt;
  c8(-&amp;quot;default slur&amp;quot; g&#039;&#039; e&#039; g, c g c g )&lt;br /&gt;
  \slurShift  #&#039;(0 . 1)&lt;br /&gt;
  c,,8(-&amp;quot;slurShift #&#039;(0 . 1)&amp;quot; g&#039;&#039; e&#039; g, c g c g )&lt;br /&gt;
  \slurShiftx  #&#039;(2 . 2) #&#039;(0 . 6)&lt;br /&gt;
  c,,8(-&amp;quot;slurShiftx #&#039;(2 . 2) #&#039;(0 . 6)&amp;quot;&lt;br /&gt;
  g&#039;&#039; e&#039; g, c g c g )&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lilypond&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Tweaks and overrides]]&lt;br /&gt;
[[Category:Scheme]]&lt;br /&gt;
[[Category:Snippet]]&lt;/div&gt;</summary>
		<author><name>Ksnortum</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=Automatic_beams_two_per_two_in_4/4_or_2/2_time_signature&amp;diff=6449</id>
		<title>Automatic beams two per two in 4/4 or 2/2 time signature</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=Automatic_beams_two_per_two_in_4/4_or_2/2_time_signature&amp;diff=6449"/>
		<updated>2026-03-12T16:24:15Z</updated>

		<summary type="html">&lt;p&gt;Ksnortum: Use modern syntax for beaming exceptions&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In a simple time signature of 2/2 or 4/4, 8th notes are beamed by default as two sets of four.&lt;br /&gt;
&lt;br /&gt;
Using a macro which overrides the autobeaming behavior, this snippet changes the beaming to quarter note beats.&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=605&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
% Automatic beams two per two in 4/4 or 2/2 time signature&lt;br /&gt;
%              _____&lt;br /&gt;
% Default     | | | |&lt;br /&gt;
%              _   _&lt;br /&gt;
% Required    | | | |&lt;br /&gt;
&lt;br /&gt;
% LSR: The good way adapted from David Bobroff&lt;br /&gt;
&lt;br /&gt;
% macro for beamed two per two in 2/2 and 4/4 time signature&lt;br /&gt;
qBeam = {&lt;br /&gt;
  \set beamExceptions = \beamExceptions{ 8[ 8] 8[ 8] 8[ 8] 8[ 8] }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
\score {&lt;br /&gt;
  &amp;lt;&amp;lt;&lt;br /&gt;
    \new Staff {&lt;br /&gt;
      \relative c&#039;&#039; {&lt;br /&gt;
        \time 4/4&lt;br /&gt;
        g8-&amp;quot;without the macro&amp;quot; g g g g g g g&lt;br /&gt;
        g8 g g g4 g8 g g&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
    %Use the macro&lt;br /&gt;
    \new Staff {&lt;br /&gt;
      \relative c&#039;&#039; {&lt;br /&gt;
        \time 4/4&lt;br /&gt;
        \qBeam &lt;br /&gt;
        g8-&amp;quot;with the macro&amp;quot; g g g g g g g&lt;br /&gt;
        g8 g g g4 g8 g g&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  &amp;gt;&amp;gt;&lt;br /&gt;
  \layout {&lt;br /&gt;
    \context {&lt;br /&gt;
      \Staff&lt;br /&gt;
      \numericTimeSignature&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lilypond&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Rhythms]]&lt;br /&gt;
[[Category:Version-specific]]&lt;br /&gt;
[[Category:Snippet]]&lt;/div&gt;</summary>
		<author><name>Ksnortum</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=Adding_the_current_date_to_the_tagline&amp;diff=6442</id>
		<title>Adding the current date to the tagline</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=Adding_the_current_date_to_the_tagline&amp;diff=6442"/>
		<updated>2026-03-10T19:58:15Z</updated>

		<summary type="html">&lt;p&gt;Ksnortum: Use https protocol: missed one in the text&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;There are a couple ways to get the current date in your score - using Scheme and a header that suits you (as you may find in the “Adding the current date to a score” example), or placing the same Scheme code in a &amp;lt;code&amp;gt;\markup&amp;lt;/code&amp;gt; block.&lt;br /&gt;
&lt;br /&gt;
One more option is to place the date in the tagline. This places the date at the bottom of the last page and appears like this -&lt;br /&gt;
&lt;br /&gt;
Engraved on April 26, 2009 with Lilypond 2.12.2 (https://lilypond.org)&lt;br /&gt;
&lt;br /&gt;
The format of the date can be changed according to these parameters:&lt;br /&gt;
&lt;br /&gt;
* %a - is replaced by the locale&#039;s abbreviated weekday name.&lt;br /&gt;
* %A - is replaced by the locale&#039;s full weekday name.&lt;br /&gt;
* %b - is replaced by the locale&#039;s abbreviated month name.&lt;br /&gt;
* %B - is replaced by the locale&#039;s full month name.&lt;br /&gt;
* %c - is replaced by the locale&#039;s appropriate date and time representation.&lt;br /&gt;
* %d - is replaced by the day of the month as a decimal number [01,31].&lt;br /&gt;
* %I - is replaced by the hour (12-hour clock) as a decimal number [01,12].&lt;br /&gt;
* %j - is replaced by the day of the year as a decimal number [001,366].&lt;br /&gt;
* %m - is replaced by the month as a decimal number [01,12].&lt;br /&gt;
* %M - is replaced by the minute as a decimal number [00,59].&lt;br /&gt;
* %p - is replaced by the locale&#039;s equivalent of either a.m. or p.m.&lt;br /&gt;
* %U - is replaced by the week number of the year (Sunday as the first day of the week) as a decimal number [00,53].&lt;br /&gt;
* %w - is replaced by the weekday as a decimal number [0,6], with 0 representing Sunday.&lt;br /&gt;
* %W - is replaced by the week number of the year (Monday as the first day of the week) as a decimal number [00,53]. All days in a new year preceding the first Monday are considered to be in week 0.&lt;br /&gt;
* %x - is replaced by the locale&#039;s appropriate date representation.&lt;br /&gt;
* %X - is replaced by the locale&#039;s appropriate time representation.&lt;br /&gt;
* %y - is replaced by the year without century as a decimal number [00,99].&lt;br /&gt;
* %Y - is replaced by the year with century as a decimal number.&lt;br /&gt;
* %Z - is replaced by the timezone name or abbreviation, or by no bytes if no timezone information exists.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lilypond version=&amp;quot;2.24&amp;quot; full&amp;gt;&lt;br /&gt;
%% http://lsr.di.unimi.it/LSR/Item?id=563&lt;br /&gt;
&lt;br /&gt;
\header {&lt;br /&gt;
  title = &amp;quot;Title&amp;quot;&lt;br /&gt;
  composer = &amp;quot;Composer&amp;quot;&lt;br /&gt;
  arranger = &amp;quot;Arranger&amp;quot;&lt;br /&gt;
  tagline = \markup {&lt;br /&gt;
    Engraved on&lt;br /&gt;
    #(strftime &amp;quot;%x at %X&amp;quot; (localtime (current-time)))&lt;br /&gt;
    with&lt;br /&gt;
    \with-url &amp;quot;https://lilypond.org&amp;quot; {&lt;br /&gt;
      LilyPond #(lilypond-version) (https://lilypond.org)&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
\paper {&lt;br /&gt;
  paper-height = 6\cm &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
\relative c&#039; {&lt;br /&gt;
  c4 d e f&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lilypond&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Text]]&lt;br /&gt;
[[Category:Scheme]]&lt;br /&gt;
[[Category:Titles]]&lt;br /&gt;
[[Category:Tweaks and overrides]]&lt;br /&gt;
[[Category:Snippet]]&lt;/div&gt;</summary>
		<author><name>Ksnortum</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=Adding_the_current_date_to_the_tagline&amp;diff=6441</id>
		<title>Adding the current date to the tagline</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=Adding_the_current_date_to_the_tagline&amp;diff=6441"/>
		<updated>2026-03-10T19:55:42Z</updated>

		<summary type="html">&lt;p&gt;Ksnortum: Remove redundant category&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;There are a couple ways to get the current date in your score - using Scheme and a header that suits you (as you may find in the “Adding the current date to a score” example), or placing the same Scheme code in a &amp;lt;code&amp;gt;\markup&amp;lt;/code&amp;gt; block.&lt;br /&gt;
&lt;br /&gt;
One more option is to place the date in the tagline. This places the date at the bottom of the last page and appears like this -&lt;br /&gt;
&lt;br /&gt;
Engraved on April 26, 2009 with Lilypond 2.12.2 (http://lilypond.org)&lt;br /&gt;
&lt;br /&gt;
The format of the date can be changed according to these parameters:&lt;br /&gt;
&lt;br /&gt;
* %a - is replaced by the locale&#039;s abbreviated weekday name.&lt;br /&gt;
* %A - is replaced by the locale&#039;s full weekday name.&lt;br /&gt;
* %b - is replaced by the locale&#039;s abbreviated month name.&lt;br /&gt;
* %B - is replaced by the locale&#039;s full month name.&lt;br /&gt;
* %c - is replaced by the locale&#039;s appropriate date and time representation.&lt;br /&gt;
* %d - is replaced by the day of the month as a decimal number [01,31].&lt;br /&gt;
* %I - is replaced by the hour (12-hour clock) as a decimal number [01,12].&lt;br /&gt;
* %j - is replaced by the day of the year as a decimal number [001,366].&lt;br /&gt;
* %m - is replaced by the month as a decimal number [01,12].&lt;br /&gt;
* %M - is replaced by the minute as a decimal number [00,59].&lt;br /&gt;
* %p - is replaced by the locale&#039;s equivalent of either a.m. or p.m.&lt;br /&gt;
* %U - is replaced by the week number of the year (Sunday as the first day of the week) as a decimal number [00,53].&lt;br /&gt;
* %w - is replaced by the weekday as a decimal number [0,6], with 0 representing Sunday.&lt;br /&gt;
* %W - is replaced by the week number of the year (Monday as the first day of the week) as a decimal number [00,53]. All days in a new year preceding the first Monday are considered to be in week 0.&lt;br /&gt;
* %x - is replaced by the locale&#039;s appropriate date representation.&lt;br /&gt;
* %X - is replaced by the locale&#039;s appropriate time representation.&lt;br /&gt;
* %y - is replaced by the year without century as a decimal number [00,99].&lt;br /&gt;
* %Y - is replaced by the year with century as a decimal number.&lt;br /&gt;
* %Z - is replaced by the timezone name or abbreviation, or by no bytes if no timezone information exists.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lilypond version=&amp;quot;2.24&amp;quot; full&amp;gt;&lt;br /&gt;
%% http://lsr.di.unimi.it/LSR/Item?id=563&lt;br /&gt;
&lt;br /&gt;
\header {&lt;br /&gt;
  title = &amp;quot;Title&amp;quot;&lt;br /&gt;
  composer = &amp;quot;Composer&amp;quot;&lt;br /&gt;
  arranger = &amp;quot;Arranger&amp;quot;&lt;br /&gt;
  tagline = \markup {&lt;br /&gt;
    Engraved on&lt;br /&gt;
    #(strftime &amp;quot;%x at %X&amp;quot; (localtime (current-time)))&lt;br /&gt;
    with&lt;br /&gt;
    \with-url &amp;quot;https://lilypond.org&amp;quot; {&lt;br /&gt;
      LilyPond #(lilypond-version) (https://lilypond.org)&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
\paper {&lt;br /&gt;
  paper-height = 6\cm &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
\relative c&#039; {&lt;br /&gt;
  c4 d e f&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lilypond&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Text]]&lt;br /&gt;
[[Category:Scheme]]&lt;br /&gt;
[[Category:Titles]]&lt;br /&gt;
[[Category:Tweaks and overrides]]&lt;br /&gt;
[[Category:Snippet]]&lt;/div&gt;</summary>
		<author><name>Ksnortum</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=Adding_the_current_date_to_the_tagline&amp;diff=6440</id>
		<title>Adding the current date to the tagline</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=Adding_the_current_date_to_the_tagline&amp;diff=6440"/>
		<updated>2026-03-10T19:54:14Z</updated>

		<summary type="html">&lt;p&gt;Ksnortum: Use https protocol in URL&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;There are a couple ways to get the current date in your score - using Scheme and a header that suits you (as you may find in the “Adding the current date to a score” example), or placing the same Scheme code in a &amp;lt;code&amp;gt;\markup&amp;lt;/code&amp;gt; block.&lt;br /&gt;
&lt;br /&gt;
One more option is to place the date in the tagline. This places the date at the bottom of the last page and appears like this -&lt;br /&gt;
&lt;br /&gt;
Engraved on April 26, 2009 with Lilypond 2.12.2 (http://lilypond.org)&lt;br /&gt;
&lt;br /&gt;
The format of the date can be changed according to these parameters:&lt;br /&gt;
&lt;br /&gt;
* %a - is replaced by the locale&#039;s abbreviated weekday name.&lt;br /&gt;
* %A - is replaced by the locale&#039;s full weekday name.&lt;br /&gt;
* %b - is replaced by the locale&#039;s abbreviated month name.&lt;br /&gt;
* %B - is replaced by the locale&#039;s full month name.&lt;br /&gt;
* %c - is replaced by the locale&#039;s appropriate date and time representation.&lt;br /&gt;
* %d - is replaced by the day of the month as a decimal number [01,31].&lt;br /&gt;
* %I - is replaced by the hour (12-hour clock) as a decimal number [01,12].&lt;br /&gt;
* %j - is replaced by the day of the year as a decimal number [001,366].&lt;br /&gt;
* %m - is replaced by the month as a decimal number [01,12].&lt;br /&gt;
* %M - is replaced by the minute as a decimal number [00,59].&lt;br /&gt;
* %p - is replaced by the locale&#039;s equivalent of either a.m. or p.m.&lt;br /&gt;
* %U - is replaced by the week number of the year (Sunday as the first day of the week) as a decimal number [00,53].&lt;br /&gt;
* %w - is replaced by the weekday as a decimal number [0,6], with 0 representing Sunday.&lt;br /&gt;
* %W - is replaced by the week number of the year (Monday as the first day of the week) as a decimal number [00,53]. All days in a new year preceding the first Monday are considered to be in week 0.&lt;br /&gt;
* %x - is replaced by the locale&#039;s appropriate date representation.&lt;br /&gt;
* %X - is replaced by the locale&#039;s appropriate time representation.&lt;br /&gt;
* %y - is replaced by the year without century as a decimal number [00,99].&lt;br /&gt;
* %Y - is replaced by the year with century as a decimal number.&lt;br /&gt;
* %Z - is replaced by the timezone name or abbreviation, or by no bytes if no timezone information exists.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lilypond version=&amp;quot;2.24&amp;quot; full&amp;gt;&lt;br /&gt;
%% http://lsr.di.unimi.it/LSR/Item?id=563&lt;br /&gt;
&lt;br /&gt;
\header {&lt;br /&gt;
  title = &amp;quot;Title&amp;quot;&lt;br /&gt;
  composer = &amp;quot;Composer&amp;quot;&lt;br /&gt;
  arranger = &amp;quot;Arranger&amp;quot;&lt;br /&gt;
  tagline = \markup {&lt;br /&gt;
    Engraved on&lt;br /&gt;
    #(strftime &amp;quot;%x at %X&amp;quot; (localtime (current-time)))&lt;br /&gt;
    with&lt;br /&gt;
    \with-url &amp;quot;https://lilypond.org&amp;quot; {&lt;br /&gt;
      LilyPond #(lilypond-version) (https://lilypond.org)&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
\paper {&lt;br /&gt;
  paper-height = 6\cm &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
\relative c&#039; {&lt;br /&gt;
  c4 d e f&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lilypond&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Text]]&lt;br /&gt;
[[Category:Text]]&lt;br /&gt;
[[Category:Scheme]]&lt;br /&gt;
[[Category:Titles]]&lt;br /&gt;
[[Category:Tweaks and overrides]]&lt;br /&gt;
[[Category:Snippet]]&lt;/div&gt;</summary>
		<author><name>Ksnortum</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=Adding_the_current_date_to_the_tagline&amp;diff=6439</id>
		<title>Adding the current date to the tagline</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=Adding_the_current_date_to_the_tagline&amp;diff=6439"/>
		<updated>2026-03-10T19:52:30Z</updated>

		<summary type="html">&lt;p&gt;Ksnortum: Shorten paper height so that the tagline is more obvious&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;There are a couple ways to get the current date in your score - using Scheme and a header that suits you (as you may find in the “Adding the current date to a score” example), or placing the same Scheme code in a &amp;lt;code&amp;gt;\markup&amp;lt;/code&amp;gt; block.&lt;br /&gt;
&lt;br /&gt;
One more option is to place the date in the tagline. This places the date at the bottom of the last page and appears like this -&lt;br /&gt;
&lt;br /&gt;
Engraved on April 26, 2009 with Lilypond 2.12.2 (http://lilypond.org)&lt;br /&gt;
&lt;br /&gt;
The format of the date can be changed according to these parameters:&lt;br /&gt;
&lt;br /&gt;
* %a - is replaced by the locale&#039;s abbreviated weekday name.&lt;br /&gt;
* %A - is replaced by the locale&#039;s full weekday name.&lt;br /&gt;
* %b - is replaced by the locale&#039;s abbreviated month name.&lt;br /&gt;
* %B - is replaced by the locale&#039;s full month name.&lt;br /&gt;
* %c - is replaced by the locale&#039;s appropriate date and time representation.&lt;br /&gt;
* %d - is replaced by the day of the month as a decimal number [01,31].&lt;br /&gt;
* %I - is replaced by the hour (12-hour clock) as a decimal number [01,12].&lt;br /&gt;
* %j - is replaced by the day of the year as a decimal number [001,366].&lt;br /&gt;
* %m - is replaced by the month as a decimal number [01,12].&lt;br /&gt;
* %M - is replaced by the minute as a decimal number [00,59].&lt;br /&gt;
* %p - is replaced by the locale&#039;s equivalent of either a.m. or p.m.&lt;br /&gt;
* %U - is replaced by the week number of the year (Sunday as the first day of the week) as a decimal number [00,53].&lt;br /&gt;
* %w - is replaced by the weekday as a decimal number [0,6], with 0 representing Sunday.&lt;br /&gt;
* %W - is replaced by the week number of the year (Monday as the first day of the week) as a decimal number [00,53]. All days in a new year preceding the first Monday are considered to be in week 0.&lt;br /&gt;
* %x - is replaced by the locale&#039;s appropriate date representation.&lt;br /&gt;
* %X - is replaced by the locale&#039;s appropriate time representation.&lt;br /&gt;
* %y - is replaced by the year without century as a decimal number [00,99].&lt;br /&gt;
* %Y - is replaced by the year with century as a decimal number.&lt;br /&gt;
* %Z - is replaced by the timezone name or abbreviation, or by no bytes if no timezone information exists.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lilypond version=&amp;quot;2.24&amp;quot; full&amp;gt;&lt;br /&gt;
%% http://lsr.di.unimi.it/LSR/Item?id=563&lt;br /&gt;
&lt;br /&gt;
\header {&lt;br /&gt;
  title = &amp;quot;Title&amp;quot;&lt;br /&gt;
  composer = &amp;quot;Composer&amp;quot;&lt;br /&gt;
  arranger = &amp;quot;Arranger&amp;quot;&lt;br /&gt;
  tagline = \markup {&lt;br /&gt;
    Engraved on&lt;br /&gt;
    #(strftime &amp;quot;%x at %X&amp;quot; (localtime (current-time)))&lt;br /&gt;
    with&lt;br /&gt;
    \with-url &amp;quot;http://lilypond.org/web/&amp;quot; {&lt;br /&gt;
      LilyPond #(lilypond-version) (http://lilypond.org/)&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
\paper {&lt;br /&gt;
  paper-height = 6\cm &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
\relative c&#039; {&lt;br /&gt;
  c4 d e f&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lilypond&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Text]]&lt;br /&gt;
[[Category:Text]]&lt;br /&gt;
[[Category:Scheme]]&lt;br /&gt;
[[Category:Titles]]&lt;br /&gt;
[[Category:Tweaks and overrides]]&lt;br /&gt;
[[Category:Snippet]]&lt;/div&gt;</summary>
		<author><name>Ksnortum</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=Extracting_text_from_markup&amp;diff=6438</id>
		<title>Extracting text from markup</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=Extracting_text_from_markup&amp;diff=6438"/>
		<updated>2026-03-10T19:40:10Z</updated>

		<summary type="html">&lt;p&gt;Ksnortum: Use newer \relative syntax&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This scheme function extracts a string from markup, removing any formatting information.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lilypond version=&amp;quot;2.24&amp;quot; full&amp;gt;&lt;br /&gt;
%% http://lsr.di.unimi.it/LSR/Item?id=747&lt;br /&gt;
&lt;br /&gt;
#(define-markup-command (plain-text layout props arg)(markup?)&lt;br /&gt;
                        (interpret-markup layout props (markup (markup-&amp;gt;string arg))))&lt;br /&gt;
&lt;br /&gt;
ttt = \markup {&lt;br /&gt;
  \normal-text { good day and \concat { hello \bold { world } } \italic { and moon }  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
\header {&lt;br /&gt;
  title = \ttt&lt;br /&gt;
  subtitle = \markup { \normal-text { \italic { \plain-text \ttt } } }&lt;br /&gt;
  tagline = ##f&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
\paper {&lt;br /&gt;
  paper-height = 5\cm &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
\relative {&lt;br /&gt;
  c&#039;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lilypond&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Text]]&lt;br /&gt;
[[Category:Scheme]]&lt;br /&gt;
[[Category:Snippet]]&lt;/div&gt;</summary>
		<author><name>Ksnortum</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=Extracting_text_from_markup&amp;diff=6437</id>
		<title>Extracting text from markup</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=Extracting_text_from_markup&amp;diff=6437"/>
		<updated>2026-03-10T19:39:00Z</updated>

		<summary type="html">&lt;p&gt;Ksnortum: Remove redundant category&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This scheme function extracts a string from markup, removing any formatting information.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lilypond version=&amp;quot;2.24&amp;quot; full&amp;gt;&lt;br /&gt;
%% http://lsr.di.unimi.it/LSR/Item?id=747&lt;br /&gt;
&lt;br /&gt;
#(define-markup-command (plain-text layout props arg)(markup?)&lt;br /&gt;
                        (interpret-markup layout props (markup (markup-&amp;gt;string arg))))&lt;br /&gt;
&lt;br /&gt;
ttt = \markup {&lt;br /&gt;
  \normal-text { good day and \concat { hello \bold { world } } \italic { and moon }  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
\header {&lt;br /&gt;
  title = \ttt&lt;br /&gt;
  subtitle = \markup { \normal-text { \italic { \plain-text \ttt } } }&lt;br /&gt;
  tagline = ##f&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
\paper {&lt;br /&gt;
  paper-height = 5\cm &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
\relative c&#039; {&lt;br /&gt;
  c&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lilypond&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Text]]&lt;br /&gt;
[[Category:Scheme]]&lt;br /&gt;
[[Category:Snippet]]&lt;/div&gt;</summary>
		<author><name>Ksnortum</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=Extracting_text_from_markup&amp;diff=6436</id>
		<title>Extracting text from markup</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=Extracting_text_from_markup&amp;diff=6436"/>
		<updated>2026-03-10T19:35:20Z</updated>

		<summary type="html">&lt;p&gt;Ksnortum: Needs full page layout to be able to see the headers&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This scheme function extracts a string from markup, removing any formatting information.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lilypond version=&amp;quot;2.24&amp;quot; full&amp;gt;&lt;br /&gt;
%% http://lsr.di.unimi.it/LSR/Item?id=747&lt;br /&gt;
&lt;br /&gt;
#(define-markup-command (plain-text layout props arg)(markup?)&lt;br /&gt;
                        (interpret-markup layout props (markup (markup-&amp;gt;string arg))))&lt;br /&gt;
&lt;br /&gt;
ttt = \markup {&lt;br /&gt;
  \normal-text { good day and \concat { hello \bold { world } } \italic { and moon }  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
\header {&lt;br /&gt;
  title = \ttt&lt;br /&gt;
  subtitle = \markup { \normal-text { \italic { \plain-text \ttt } } }&lt;br /&gt;
  tagline = ##f&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
\paper {&lt;br /&gt;
  paper-height = 5\cm &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
\relative c&#039; {&lt;br /&gt;
  c&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lilypond&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Text]]&lt;br /&gt;
[[Category:Text]]&lt;br /&gt;
[[Category:Scheme]]&lt;br /&gt;
[[Category:Snippet]]&lt;/div&gt;</summary>
		<author><name>Ksnortum</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=Repeat_with_brackets&amp;diff=6431</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=6431"/>
		<updated>2026-03-07T15:49:09Z</updated>

		<summary type="html">&lt;p&gt;Ksnortum: Clearer text&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 bars. This is very useful when dealing with minimal music, for instance. To execute 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>Ksnortum</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=Repeat_with_brackets&amp;diff=6429</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=6429"/>
		<updated>2026-03-07T15:37:27Z</updated>

		<summary type="html">&lt;p&gt;Ksnortum: No need for full page&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;/code&amp;gt;&amp;lt;code&amp;gt;N&amp;lt;/code&amp;gt;&amp;lt;code&amp;gt; &amp;lt;/code&amp;gt;&amp;lt;code&amp;gt;music&amp;lt;/code&amp;gt;, where &amp;lt;code&amp;gt;N&amp;lt;/code&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;
% repeatBracket snippet&lt;br /&gt;
% will add .----Nx----. above a bar, where N is the number of repetitions&lt;br /&gt;
% based on the wonderful spanner by David Nalesnik (see: 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 (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>Ksnortum</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=Expect_a_warning_several_times&amp;diff=6419</id>
		<title>Expect a warning several times</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=Expect_a_warning_several_times&amp;diff=6419"/>
		<updated>2026-03-02T15:24:49Z</updated>

		<summary type="html">&lt;p&gt;Ksnortum: Add Category&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;There are times when your LilyPond source file prints warnings when compiled and you may want to suppress these warnings from the output.  LilyPond has a Scheme function for this: &amp;lt;code&amp;gt;ly:expect-warning&amp;lt;/code&amp;gt;. However, there are times when the same warning is printed  several times and &amp;lt;code&amp;gt;ly:expect-warning&amp;lt;/code&amp;gt; will only hide one warning at a time.  Typing this function several times in a row is tedious.&lt;br /&gt;
&lt;br /&gt;
The [https://lilypond.org/doc/v2.24/Documentation/internals/scheme-functions Scheme function] below takes a string that will match some part of the warning, just like &amp;lt;code&amp;gt;ly:expect-warning&amp;lt;/code&amp;gt;, but it also takes an integer for the number of times the warning is printed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#(define (expect-warning-times n . arg)&lt;br /&gt;
   (for-each (lambda _ (apply ly:expect-warning arg))&lt;br /&gt;
             (iota n)))&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A usage example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;#(expect-warning-times 4 &amp;quot;omitting tuplet bracket&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Scheme]]&lt;/div&gt;</summary>
		<author><name>Ksnortum</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=Expect_a_warning_several_times&amp;diff=6410</id>
		<title>Expect a warning several times</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=Expect_a_warning_several_times&amp;diff=6410"/>
		<updated>2026-02-28T14:52:05Z</updated>

		<summary type="html">&lt;p&gt;Ksnortum: Inline the Scheme function URL and change to version 2.24&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;There are times when your LilyPond source file prints warnings when compiled and you may want to suppress these warnings from the output.  LilyPond has a Scheme function for this: &amp;lt;code&amp;gt;ly:expect-warning&amp;lt;/code&amp;gt;. However, there are times when the same warning is printed  several times and &amp;lt;code&amp;gt;ly:expect-warning&amp;lt;/code&amp;gt; will only hide one warning at a time.  Typing this function several times in a row is tedious.&lt;br /&gt;
&lt;br /&gt;
The [https://lilypond.org/doc/v2.24/Documentation/internals/scheme-functions Scheme function] below takes a string that will match some part of the warning, just like &amp;lt;code&amp;gt;ly:expect-warning&amp;lt;/code&amp;gt;, but it also takes an integer for the number of times the warning is printed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#(define (expect-warning-times n . arg)&lt;br /&gt;
   (for-each (lambda _ (apply ly:expect-warning arg))&lt;br /&gt;
             (iota n)))&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A usage example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;#(expect-warning-times 4 &amp;quot;omitting tuplet bracket&amp;quot;)&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Ksnortum</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=Expect_a_warning_several_times&amp;diff=6409</id>
		<title>Expect a warning several times</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=Expect_a_warning_several_times&amp;diff=6409"/>
		<updated>2026-02-28T14:46:25Z</updated>

		<summary type="html">&lt;p&gt;Ksnortum: args -&amp;gt; arg&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;There are times when your LilyPond source file prints warnings when compiled and you may want to suppress these warnings from the output.  LilyPond has a Scheme function for this: &amp;lt;code&amp;gt;ly:expect-warning&amp;lt;/code&amp;gt;. However, there are times when the same warning is printed  several times and &amp;lt;code&amp;gt;ly:expect-warning&amp;lt;/code&amp;gt; will only hide one warning at a time.  Typing this function several times in a row is tedious.&lt;br /&gt;
&lt;br /&gt;
The Scheme function below takes a string that will match some part of the warning, just like &amp;lt;code&amp;gt;ly:expect-warning&amp;lt;/code&amp;gt;, but it also takes an integer for the number of times the warning is printed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#(define (expect-warning-times n . arg)&lt;br /&gt;
   (for-each (lambda _ (apply ly:expect-warning arg))&lt;br /&gt;
             (iota n)))&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A usage example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;#(expect-warning-times 4 &amp;quot;omitting tuplet bracket&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The hint from the documentation: [https://lilypond.org/doc/v2.25/Documentation/internals/scheme-functions scheme-functions]&lt;/div&gt;</summary>
		<author><name>Ksnortum</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=Expect_a_warning_several_times&amp;diff=6392</id>
		<title>Expect a warning several times</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=Expect_a_warning_several_times&amp;diff=6392"/>
		<updated>2026-02-27T23:43:28Z</updated>

		<summary type="html">&lt;p&gt;Ksnortum: Scheme function to suppress several warnings&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;There are times when your LilyPond source file prints warnings when compiled and you may want to suppress these warnings from the output.  LilyPond has a Scheme function for this: &amp;lt;code&amp;gt;ly:expect-warning&amp;lt;/code&amp;gt;. However, there are times when the same warning is printed  several times and &amp;lt;code&amp;gt;ly:expect-warning&amp;lt;/code&amp;gt; will only hide one warning at a time.  Typing this function several times in a row is tedious.&lt;br /&gt;
&lt;br /&gt;
The Scheme function below takes a string that will match some part of the warning, just like &amp;lt;code&amp;gt;ly:expect-warning&amp;lt;/code&amp;gt;, but it also takes an integer for the number of times the warning is printed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#(define expect-warning-times (lambda args&lt;br /&gt;
   (for-each (lambda _ (apply ly:expect-warning (cdr args)))&lt;br /&gt;
             (iota (car args)))))&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A usage example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;#(expect-warning-times 4 &amp;quot;omitting tuplet bracket&amp;quot;)&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Ksnortum</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=User:Ksnortum&amp;diff=6388</id>
		<title>User:Ksnortum</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=User:Ksnortum&amp;diff=6388"/>
		<updated>2026-02-25T15:24:16Z</updated>

		<summary type="html">&lt;p&gt;Ksnortum: Add a link to The Mutopia Project&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I am a neurotic programmer/musician and an Admin here at the LilyPond wiki.  If you want to learn more about me, see [https://snortum.net/knute/ my webpage].  (Please note that I am &#039;&#039;not&#039;&#039; a web designer!)  You can see the scores I&#039;ve done in [https://github.com/search?q=owner%3Aksnortum+lilypond&amp;amp;type=repositories LilyPond on GitHub] and [https://www.mutopiaproject.org/cgibin/make-table.cgi?searchingfor=snortum&amp;amp;Composer=&amp;amp;Instrument=&amp;amp;Style=&amp;amp;timelength=1&amp;amp;timeunit=week&amp;amp;lilyversion=&amp;amp;preview=1 The Mupotia Project].&lt;/div&gt;</summary>
		<author><name>Ksnortum</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=User:Ksnortum&amp;diff=6387</id>
		<title>User:Ksnortum</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=User:Ksnortum&amp;diff=6387"/>
		<updated>2026-02-23T15:56:39Z</updated>

		<summary type="html">&lt;p&gt;Ksnortum: Add link to GitHub Lilypond scores&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I am a neurotic programmer/musician and an Admin here at the LilyPond wiki.  If you want to learn more about me, see [https://snortum.net/knute/ my webpage].  (Please note that I am &#039;&#039;not&#039;&#039; a web designer!)  You can see the scores I&#039;ve done in [https://github.com/search?q=owner%3Aksnortum+lilypond&amp;amp;type=repositories LilyPond on GitHub].&lt;/div&gt;</summary>
		<author><name>Ksnortum</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=Talk:Automatically_display_key_names_above_key_signatures&amp;diff=6379</id>
		<title>Talk:Automatically display key names above key signatures</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=Talk:Automatically_display_key_names_above_key_signatures&amp;diff=6379"/>
		<updated>2026-02-22T20:28:53Z</updated>

		<summary type="html">&lt;p&gt;Ksnortum: /* Avoid key cancellation signs? */ Reply&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Avoid key cancellation signs? ==&lt;br /&gt;
&lt;br /&gt;
Wouldn&#039;t it be better to cancel the KeyCancellation objects? Add &amp;lt;code&amp;gt;\override KeyCancellation.break-visibility = #all-invisible&amp;lt;/code&amp;gt; to the layout statement. Another suggestion is to alter the engraver so that the notes do not start after the complete text, analog to &amp;lt;code&amp;gt;\textLengthOff&amp;lt;/code&amp;gt; [[User:Manuela|Manuela]] ([[User talk:Manuela|talk]]) 10:20, 21 February 2026 (UTC)&lt;br /&gt;
&lt;br /&gt;
:I think removing the key cancelation is best done with &amp;lt;code&amp;gt;\set Staff.printKeyCancellation = ##f&amp;lt;/code&amp;gt;, but that&#039;s my opinion. [[User:Ksnortum|Ksnortum]] ([[User talk:Ksnortum|talk]]) 20:54, 21 February 2026 (UTC)&lt;br /&gt;
::I tested it, &amp;lt;code&amp;gt;\set Staff.printKeyCancellation = ##f&amp;lt;/code&amp;gt; killed the engraver, too. [[User:Manuela|Manuela]] ([[User talk:Manuela|talk]]) 16:58, 22 February 2026 (UTC)&lt;br /&gt;
:::I made the change to the page and I think it looks better. [[User:Ksnortum|Ksnortum]] ([[User talk:Ksnortum|talk]]) 20:28, 22 February 2026 (UTC)&lt;/div&gt;</summary>
		<author><name>Ksnortum</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=Automatically_display_key_names_above_key_signatures&amp;diff=6378</id>
		<title>Automatically display key names above key signatures</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=Automatically_display_key_names_above_key_signatures&amp;diff=6378"/>
		<updated>2026-02-22T20:25:50Z</updated>

		<summary type="html">&lt;p&gt;Ksnortum: Don&amp;#039;t use key cancelation&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This snippet automatically displays the name of the key above the key signature. This is helpful when learning the key signatures, or to easily see whether a key is major, minor, or modal (dorian, phrygian, lydian, etc.). It works by creating a custom key signature engraver.&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=856&lt;br /&gt;
&lt;br /&gt;
\paper { tagline = ##f }&lt;br /&gt;
&lt;br /&gt;
%% see also lists.gnu.org/archive/html/lilypond-user/2013-12/msg00828.html&lt;br /&gt;
% by Paul Morris&lt;br /&gt;
&lt;br /&gt;
% tonic-num: number of the tonic note 0-6, C=0, B=6&lt;br /&gt;
% acc-type: the accidental sign type, 1/2=sharp, -1/2=flat&lt;br /&gt;
% acc-count: the number and type of accidentals in the key signature&lt;br /&gt;
%                  values are: -7 -6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6 7&lt;br /&gt;
%                  (negative = flats, positive = sharps)&lt;br /&gt;
% tonic-acc: #f if the tonic note is not sharp or flat, otherwise a pair&lt;br /&gt;
% maj-num: number of the tonic note 0-6, if the key sig were major&lt;br /&gt;
% mode-num: number of the mode 0-6&lt;br /&gt;
% txt-size: size of key name text&lt;br /&gt;
% padd: padding between key signature and key name&lt;br /&gt;
% mult: for correct resizing when the staff is resized&lt;br /&gt;
&lt;br /&gt;
#(define Custom_key_engraver&lt;br /&gt;
   (make-engraver&lt;br /&gt;
    (acknowledgers&lt;br /&gt;
     ((key-signature-interface engraver grob source-engraver)&lt;br /&gt;
      ;; if key cancellation then do nothing,&lt;br /&gt;
      ;; else modify the key signature stencil&lt;br /&gt;
      (if (not (eq? &#039;KeyCancellation&lt;br /&gt;
                    (grob::name grob)))&lt;br /&gt;
          (let* ((context (ly:translator-context engraver))&lt;br /&gt;
                 (tonic-pitch (ly:context-property context &#039;tonic))&lt;br /&gt;
                 (tonic-num (ly:pitch-notename tonic-pitch))&lt;br /&gt;
                 (acc-list (ly:grob-property grob &#039;alteration-alist))&lt;br /&gt;
&lt;br /&gt;
                 (acc-type (if (null? acc-list)&lt;br /&gt;
                               0 (cdr (list-ref acc-list 0))))&lt;br /&gt;
&lt;br /&gt;
                 (acc-count (* (length acc-list)&lt;br /&gt;
                              (if (&amp;lt; acc-type 0) -1 1)))&lt;br /&gt;
&lt;br /&gt;
                 (maj-num (case acc-count&lt;br /&gt;
                            ((0) 0)&lt;br /&gt;
                            ((1) 4) ((2) 1) ((3) 5) ((4) 2) ((5) 6) ((6) 3) ((7) 0)&lt;br /&gt;
                            ((-1) 3) ((-2) 6) ((-3) 2) ((-4) 5) ((-5) 1) ((-6) 4) ((-7) 0)))&lt;br /&gt;
&lt;br /&gt;
                 (mode-num (modulo (- tonic-num maj-num) 7))&lt;br /&gt;
                 (key-letter (case tonic-num&lt;br /&gt;
                               ((0) &amp;quot;C&amp;quot; ) ((1) &amp;quot;D&amp;quot; ) ((2) &amp;quot;E&amp;quot; ) ((3) &amp;quot;F&amp;quot; )&lt;br /&gt;
                               ((4) &amp;quot;G&amp;quot; ) ((5) &amp;quot;A&amp;quot; ) ((6) &amp;quot;B&amp;quot; )))&lt;br /&gt;
&lt;br /&gt;
                 (mult (magstep (ly:grob-property grob &#039;font-size 0.0)))&lt;br /&gt;
&lt;br /&gt;
                 (txt-sharp #{ \markup {&lt;br /&gt;
                   \translate #(cons (* mult -0.3) (* mult 0.8))&lt;br /&gt;
                   \magnify #(* mult 0.9) \sharp&lt;br /&gt;
                   } #})&lt;br /&gt;
&lt;br /&gt;
                 (txt-flat #{ \markup {&lt;br /&gt;
                   \translate #(cons (* mult -0.2) (* mult 0.4))&lt;br /&gt;
                   \magnify #(* mult 0.9) \flat&lt;br /&gt;
                   } #})&lt;br /&gt;
&lt;br /&gt;
                 (tonic-acc (if (pair? (assq tonic-num acc-list))&lt;br /&gt;
                                (if (= acc-type 0.5) txt-sharp txt-flat)&lt;br /&gt;
                                &amp;quot;&amp;quot;))&lt;br /&gt;
&lt;br /&gt;
                 (key-mode (case mode-num&lt;br /&gt;
                             ((0) &amp;quot;Major&amp;quot;) ((1) &amp;quot;Dorian&amp;quot;) ((2) &amp;quot;Phrygian&amp;quot;) ((3) &amp;quot;Lydian&amp;quot;)&lt;br /&gt;
                             ((4) &amp;quot;Mixolydian&amp;quot;) ((5) &amp;quot;Minor&amp;quot;) ((6) &amp;quot;Locrian&amp;quot;)))&lt;br /&gt;
&lt;br /&gt;
                 ;; F Major and D Minor each get extra padding&lt;br /&gt;
                 ;; so the name appears above the staff&lt;br /&gt;
                 (padd (if (= acc-count -1)&lt;br /&gt;
                           (+ 0.5 (* mult 1.2))&lt;br /&gt;
                           0.5))&lt;br /&gt;
&lt;br /&gt;
                 (txt-size 0.7)&lt;br /&gt;
                 (key-name #{ \markup { #key-letter #tonic-acc #key-mode } #})&lt;br /&gt;
                 (key-name-scaled (ly:stencil-scale&lt;br /&gt;
                                   (grob-interpret-markup grob key-name)&lt;br /&gt;
                                   txt-size txt-size))&lt;br /&gt;
&lt;br /&gt;
                 (key-sig-stencil (ly:key-signature-interface::print grob))&lt;br /&gt;
                 (grob-y-ext (ly:grob-property grob &#039;Y-extent)))&lt;br /&gt;
&lt;br /&gt;
            ;; Names for C Major, A Minor, etc. have to be moved up above the staff&lt;br /&gt;
            ;; padd has no effect if there are no sharps or flats in the key signature&lt;br /&gt;
            (if (equal? grob-y-ext (cons +inf.0 -inf.0))&lt;br /&gt;
                (set! key-name-scaled&lt;br /&gt;
                      (ly:stencil-translate-axis key-name-scaled 3 Y)))&lt;br /&gt;
&lt;br /&gt;
            (ly:grob-set-property! grob &#039;stencil&lt;br /&gt;
              (ly:stencil-combine-at-edge key-sig-stencil 1 1&lt;br /&gt;
                key-name-scaled padd))))))))&lt;br /&gt;
&lt;br /&gt;
\layout {&lt;br /&gt;
  \context {&lt;br /&gt;
    \Staff&lt;br /&gt;
    \consists \Custom_key_engraver&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
\markup \null % avoid clipped text&lt;br /&gt;
&lt;br /&gt;
\new Staff \relative f&#039;&#039; {&lt;br /&gt;
  \set Staff.printKeyCancellation = ##f&lt;br /&gt;
  \key c \major&lt;br /&gt;
  c1&lt;br /&gt;
  \key a \minor&lt;br /&gt;
  a1&lt;br /&gt;
  \key a \major&lt;br /&gt;
  a1&lt;br /&gt;
  \key fis \minor&lt;br /&gt;
  fis1&lt;br /&gt;
  \key ees \major&lt;br /&gt;
  ees1&lt;br /&gt;
  \key c \minor&lt;br /&gt;
  c&#039;1&lt;br /&gt;
  \key c \dorian&lt;br /&gt;
  c1&lt;br /&gt;
  \key c \phrygian&lt;br /&gt;
  c1&lt;br /&gt;
  \key c \lydian&lt;br /&gt;
  c1&lt;br /&gt;
  \key c \mixolydian&lt;br /&gt;
  c1&lt;br /&gt;
  \key c \locrian&lt;br /&gt;
  c1&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lilypond&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Tweaks and overrides]]&lt;br /&gt;
[[Category:Contexts and engravers]]&lt;br /&gt;
[[Category:Snippet]]&lt;/div&gt;</summary>
		<author><name>Ksnortum</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=Automatically_display_key_names_above_key_signatures&amp;diff=6377</id>
		<title>Automatically display key names above key signatures</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=Automatically_display_key_names_above_key_signatures&amp;diff=6377"/>
		<updated>2026-02-22T20:23:00Z</updated>

		<summary type="html">&lt;p&gt;Ksnortum: Don&amp;#039;t use &amp;quot;full&amp;quot; modifier in lilypond version tag to remove empty place from the bottom of the displayed area&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This snippet automatically displays the name of the key above the key signature. This is helpful when learning the key signatures, or to easily see whether a key is major, minor, or modal (dorian, phrygian, lydian, etc.). It works by creating a custom key signature engraver.&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=856&lt;br /&gt;
&lt;br /&gt;
\paper { tagline = ##f }&lt;br /&gt;
&lt;br /&gt;
%% see also lists.gnu.org/archive/html/lilypond-user/2013-12/msg00828.html&lt;br /&gt;
% by Paul Morris&lt;br /&gt;
&lt;br /&gt;
% tonic-num: number of the tonic note 0-6, C=0, B=6&lt;br /&gt;
% acc-type: the accidental sign type, 1/2=sharp, -1/2=flat&lt;br /&gt;
% acc-count: the number and type of accidentals in the key signature&lt;br /&gt;
%                  values are: -7 -6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6 7&lt;br /&gt;
%                  (negative = flats, positive = sharps)&lt;br /&gt;
% tonic-acc: #f if the tonic note is not sharp or flat, otherwise a pair&lt;br /&gt;
% maj-num: number of the tonic note 0-6, if the key sig were major&lt;br /&gt;
% mode-num: number of the mode 0-6&lt;br /&gt;
% txt-size: size of key name text&lt;br /&gt;
% padd: padding between key signature and key name&lt;br /&gt;
% mult: for correct resizing when the staff is resized&lt;br /&gt;
&lt;br /&gt;
#(define Custom_key_engraver&lt;br /&gt;
   (make-engraver&lt;br /&gt;
    (acknowledgers&lt;br /&gt;
     ((key-signature-interface engraver grob source-engraver)&lt;br /&gt;
      ;; if key cancellation then do nothing,&lt;br /&gt;
      ;; else modify the key signature stencil&lt;br /&gt;
      (if (not (eq? &#039;KeyCancellation&lt;br /&gt;
                    (grob::name grob)))&lt;br /&gt;
          (let* ((context (ly:translator-context engraver))&lt;br /&gt;
                 (tonic-pitch (ly:context-property context &#039;tonic))&lt;br /&gt;
                 (tonic-num (ly:pitch-notename tonic-pitch))&lt;br /&gt;
                 (acc-list (ly:grob-property grob &#039;alteration-alist))&lt;br /&gt;
&lt;br /&gt;
                 (acc-type (if (null? acc-list)&lt;br /&gt;
                               0 (cdr (list-ref acc-list 0))))&lt;br /&gt;
&lt;br /&gt;
                 (acc-count (* (length acc-list)&lt;br /&gt;
                              (if (&amp;lt; acc-type 0) -1 1)))&lt;br /&gt;
&lt;br /&gt;
                 (maj-num (case acc-count&lt;br /&gt;
                            ((0) 0)&lt;br /&gt;
                            ((1) 4) ((2) 1) ((3) 5) ((4) 2) ((5) 6) ((6) 3) ((7) 0)&lt;br /&gt;
                            ((-1) 3) ((-2) 6) ((-3) 2) ((-4) 5) ((-5) 1) ((-6) 4) ((-7) 0)))&lt;br /&gt;
&lt;br /&gt;
                 (mode-num (modulo (- tonic-num maj-num) 7))&lt;br /&gt;
                 (key-letter (case tonic-num&lt;br /&gt;
                               ((0) &amp;quot;C&amp;quot; ) ((1) &amp;quot;D&amp;quot; ) ((2) &amp;quot;E&amp;quot; ) ((3) &amp;quot;F&amp;quot; )&lt;br /&gt;
                               ((4) &amp;quot;G&amp;quot; ) ((5) &amp;quot;A&amp;quot; ) ((6) &amp;quot;B&amp;quot; )))&lt;br /&gt;
&lt;br /&gt;
                 (mult (magstep (ly:grob-property grob &#039;font-size 0.0)))&lt;br /&gt;
&lt;br /&gt;
                 (txt-sharp #{ \markup {&lt;br /&gt;
                   \translate #(cons (* mult -0.3) (* mult 0.8))&lt;br /&gt;
                   \magnify #(* mult 0.9) \sharp&lt;br /&gt;
                   } #})&lt;br /&gt;
&lt;br /&gt;
                 (txt-flat #{ \markup {&lt;br /&gt;
                   \translate #(cons (* mult -0.2) (* mult 0.4))&lt;br /&gt;
                   \magnify #(* mult 0.9) \flat&lt;br /&gt;
                   } #})&lt;br /&gt;
&lt;br /&gt;
                 (tonic-acc (if (pair? (assq tonic-num acc-list))&lt;br /&gt;
                                (if (= acc-type 0.5) txt-sharp txt-flat)&lt;br /&gt;
                                &amp;quot;&amp;quot;))&lt;br /&gt;
&lt;br /&gt;
                 (key-mode (case mode-num&lt;br /&gt;
                             ((0) &amp;quot;Major&amp;quot;) ((1) &amp;quot;Dorian&amp;quot;) ((2) &amp;quot;Phrygian&amp;quot;) ((3) &amp;quot;Lydian&amp;quot;)&lt;br /&gt;
                             ((4) &amp;quot;Mixolydian&amp;quot;) ((5) &amp;quot;Minor&amp;quot;) ((6) &amp;quot;Locrian&amp;quot;)))&lt;br /&gt;
&lt;br /&gt;
                 ;; F Major and D Minor each get extra padding&lt;br /&gt;
                 ;; so the name appears above the staff&lt;br /&gt;
                 (padd (if (= acc-count -1)&lt;br /&gt;
                           (+ 0.5 (* mult 1.2))&lt;br /&gt;
                           0.5))&lt;br /&gt;
&lt;br /&gt;
                 (txt-size 0.7)&lt;br /&gt;
                 (key-name #{ \markup { #key-letter #tonic-acc #key-mode } #})&lt;br /&gt;
                 (key-name-scaled (ly:stencil-scale&lt;br /&gt;
                                   (grob-interpret-markup grob key-name)&lt;br /&gt;
                                   txt-size txt-size))&lt;br /&gt;
&lt;br /&gt;
                 (key-sig-stencil (ly:key-signature-interface::print grob))&lt;br /&gt;
                 (grob-y-ext (ly:grob-property grob &#039;Y-extent)))&lt;br /&gt;
&lt;br /&gt;
            ;; Names for C Major, A Minor, etc. have to be moved up above the staff&lt;br /&gt;
            ;; padd has no effect if there are no sharps or flats in the key signature&lt;br /&gt;
            (if (equal? grob-y-ext (cons +inf.0 -inf.0))&lt;br /&gt;
                (set! key-name-scaled&lt;br /&gt;
                      (ly:stencil-translate-axis key-name-scaled 3 Y)))&lt;br /&gt;
&lt;br /&gt;
            (ly:grob-set-property! grob &#039;stencil&lt;br /&gt;
              (ly:stencil-combine-at-edge key-sig-stencil 1 1&lt;br /&gt;
                key-name-scaled padd))))))))&lt;br /&gt;
&lt;br /&gt;
\layout {&lt;br /&gt;
  \context {&lt;br /&gt;
    \Staff&lt;br /&gt;
    \consists \Custom_key_engraver&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
\markup \null % avoid clipped text&lt;br /&gt;
&lt;br /&gt;
\new Staff \relative f&#039;&#039; {&lt;br /&gt;
  \key c \major&lt;br /&gt;
  c1&lt;br /&gt;
  \key a \minor&lt;br /&gt;
  a1&lt;br /&gt;
  \key a \major&lt;br /&gt;
  a1&lt;br /&gt;
  \key fis \minor&lt;br /&gt;
  fis1&lt;br /&gt;
  \key ees \major&lt;br /&gt;
  ees1&lt;br /&gt;
  \key c \minor&lt;br /&gt;
  c&#039;1&lt;br /&gt;
  \key c \dorian&lt;br /&gt;
  c1&lt;br /&gt;
  \key c \phrygian&lt;br /&gt;
  c1&lt;br /&gt;
  \key c \lydian&lt;br /&gt;
  c1&lt;br /&gt;
  \key c \mixolydian&lt;br /&gt;
  c1&lt;br /&gt;
  \key c \locrian&lt;br /&gt;
  c1&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lilypond&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Tweaks and overrides]]&lt;br /&gt;
[[Category:Contexts and engravers]]&lt;br /&gt;
[[Category:Snippet]]&lt;/div&gt;</summary>
		<author><name>Ksnortum</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=Talk:Automatically_display_key_names_above_key_signatures&amp;diff=6374</id>
		<title>Talk:Automatically display key names above key signatures</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=Talk:Automatically_display_key_names_above_key_signatures&amp;diff=6374"/>
		<updated>2026-02-21T20:54:42Z</updated>

		<summary type="html">&lt;p&gt;Ksnortum: /* Avoid key cancellation signs? */ Reply&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Avoid key cancellation signs? ==&lt;br /&gt;
&lt;br /&gt;
Wouldn&#039;t it be better to cancel the KeyCancellation objects? Add &amp;lt;code&amp;gt;\override KeyCancellation.break-visibility = #all-invisible&amp;lt;/code&amp;gt; to the layout statement. Another suggestion is to alter the engraver so that the notes do not start after the complete text, analog to &amp;lt;code&amp;gt;\textLengthOff&amp;lt;/code&amp;gt; [[User:Manuela|Manuela]] ([[User talk:Manuela|talk]]) 10:20, 21 February 2026 (UTC)&lt;br /&gt;
&lt;br /&gt;
:I think removing the key cancelation is best done with &amp;lt;code&amp;gt;\set Staff.printKeyCancellation = ##f&amp;lt;/code&amp;gt;, but that&#039;s my opinion. [[User:Ksnortum|Ksnortum]] ([[User talk:Ksnortum|talk]]) 20:54, 21 February 2026 (UTC)&lt;/div&gt;</summary>
		<author><name>Ksnortum</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=Frescobaldi&amp;diff=6348</id>
		<title>Frescobaldi</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=Frescobaldi&amp;diff=6348"/>
		<updated>2026-02-18T17:05:01Z</updated>

		<summary type="html">&lt;p&gt;Ksnortum: Frescobaldi is a GUI editor for LilyPond&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[https://www.frescobaldi.org/ Frescobaldi] is a free GUI LilyPond sheet music editor. It strives to be lightweight and easy to use, yet powerful. Some of its features include:&lt;br /&gt;
&lt;br /&gt;
* Syntax highlighting&lt;br /&gt;
* Auto-completion&lt;br /&gt;
* Point and click from the PDF display&lt;br /&gt;
* A MIDI player for audio &amp;quot;proof-listen&amp;quot;&lt;br /&gt;
* A Score Wizard to set up templates for editing&lt;br /&gt;
* A snippets library&lt;br /&gt;
&lt;br /&gt;
(The Frescobaldi website is out of date.)&lt;br /&gt;
&lt;br /&gt;
You can download the latest release and get the source code at the Frescobaldi [https://github.com/frescobaldi/frescobaldi GitHub repository].&lt;/div&gt;</summary>
		<author><name>Ksnortum</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=Talk:Displaying_LilyPond%E2%80%99s_data_directory&amp;diff=6347</id>
		<title>Talk:Displaying LilyPond’s data directory</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=Talk:Displaying_LilyPond%E2%80%99s_data_directory&amp;diff=6347"/>
		<updated>2026-02-18T16:42:43Z</updated>

		<summary type="html">&lt;p&gt;Ksnortum: /* No LilyPond tag on scheme code */ new section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== No LilyPond tag on scheme code ==&lt;br /&gt;
&lt;br /&gt;
I purposely did not use the &amp;lt;code&amp;gt;&amp;lt;lilypond&amp;gt;&amp;lt;/code&amp;gt; tag on this code because I didn&#039;t want to expose the Wiki&#039;s internal structure.  If I&#039;m being overly paranoid we can add it later. [[User:Ksnortum|Ksnortum]] ([[User talk:Ksnortum|talk]]) 16:42, 18 February 2026 (UTC)&lt;/div&gt;</summary>
		<author><name>Ksnortum</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=Displaying_LilyPond%E2%80%99s_data_directory&amp;diff=6346</id>
		<title>Displaying LilyPond’s data directory</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=Displaying_LilyPond%E2%80%99s_data_directory&amp;diff=6346"/>
		<updated>2026-02-18T16:38:04Z</updated>

		<summary type="html">&lt;p&gt;Ksnortum: Add categories&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In [[Frescobaldi]], you can install LilyPond while editing the Settings options.  However, it is not always clear what directory LilyPond is installed in.  Using the following code will display LilyPond&#039;s data directory.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
\version &amp;quot;2.24.4&amp;quot;&lt;br /&gt;
#(display&lt;br /&gt;
  (string-append &amp;quot;\nThe LilyPond data directory is located at: &amp;quot;&lt;br /&gt;
                 (ly:get-option &#039;datadir)))&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(Thanks to Mark Knoop for this code.)&lt;br /&gt;
&lt;br /&gt;
[[Category:Snippet]] [[Category:Scheme]]&lt;/div&gt;</summary>
		<author><name>Ksnortum</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=Displaying_LilyPond%E2%80%99s_data_directory&amp;diff=6345</id>
		<title>Displaying LilyPond’s data directory</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=Displaying_LilyPond%E2%80%99s_data_directory&amp;diff=6345"/>
		<updated>2026-02-18T16:33:53Z</updated>

		<summary type="html">&lt;p&gt;Ksnortum: How to display LilyPond&amp;#039;s data directory&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In [[Frescobaldi]], you can install LilyPond while editing the Settings options.  However, it is not always clear what directory LilyPond is installed in.  Using the following code will display LilyPond&#039;s data directory.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
\version &amp;quot;2.24.4&amp;quot;&lt;br /&gt;
#(display&lt;br /&gt;
  (string-append &amp;quot;\nThe LilyPond data directory is located at: &amp;quot;&lt;br /&gt;
                 (ly:get-option &#039;datadir)))&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(Thanks to Mark Knoop for this code.)&lt;/div&gt;</summary>
		<author><name>Ksnortum</name></author>
	</entry>
</feed>