<?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=Gabriel+Ellsworth</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=Gabriel+Ellsworth"/>
	<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/wiki/Special:Contributions/Gabriel_Ellsworth"/>
	<updated>2026-05-01T09:53:12Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.44.2</generator>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=Aligning_lyrics_based_on_vowels&amp;diff=6548</id>
		<title>Aligning lyrics based on vowels</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=Aligning_lyrics_based_on_vowels&amp;diff=6548"/>
		<updated>2026-04-30T16:27:34Z</updated>

		<summary type="html">&lt;p&gt;Gabriel Ellsworth: Created page with &amp;quot;This snippet shows how, in music with lyrics, you can align lyrics based on where vowels fall within &amp;lt;code&amp;gt;LyricText&amp;lt;/code&amp;gt; items.  In each measure of this snippet, &amp;#039;&amp;#039;&amp;#039;the first note demonstrates the use of these functions&amp;#039;&amp;#039;&amp;#039;, and the second note shows LilyPond’s default alignment.  &amp;#039;&amp;#039;&amp;#039;Source:&amp;#039;&amp;#039;&amp;#039; Solution by Kieren MacMillan posted to the mailing list [https://lists.gnu.org/archive/html/lilypond-user/2026-01/msg00334.html in this thread]. The code for this solution was...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This snippet shows how, in music with lyrics, you can align lyrics based on where vowels fall within &amp;lt;code&amp;gt;LyricText&amp;lt;/code&amp;gt; items.&lt;br /&gt;
&lt;br /&gt;
In each measure of this snippet, &#039;&#039;&#039;the first note demonstrates the use of these functions&#039;&#039;&#039;, and the second note shows LilyPond’s default alignment.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Source:&#039;&#039;&#039; Solution by Kieren MacMillan posted to the mailing list [https://lists.gnu.org/archive/html/lilypond-user/2026-01/msg00334.html in this thread]. The code for this solution was inspired by [[Center lyric syllables (ignoring punctuation)]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lilypond version=&amp;quot;2.26&amp;quot;&amp;gt;&lt;br /&gt;
% View this snippet online:&lt;br /&gt;
% https://wiki.lilypond.community/wiki/Aligning_lyrics_based_on_vowels&lt;br /&gt;
&lt;br /&gt;
% Define the set of characters that will be&lt;br /&gt;
% classified as vowels for these commands:&lt;br /&gt;
#(define vowel-set&lt;br /&gt;
   (list-&amp;gt;char-set&lt;br /&gt;
    (string-&amp;gt;list &amp;quot;AÁÀÃÂÆǼEÉÈÊIÍÌÎOÓÒÕÔŒU&lt;br /&gt;
        ÚÙÛYaáàãâæǽeéèêiíìîoóòõôœuúùûy&amp;quot;)))&lt;br /&gt;
% Tweak this set based on your needs.&lt;br /&gt;
% For example, if your lyrics are in a language&lt;br /&gt;
% in which ⟨y⟩ is *always* pronounced as a vowel,&lt;br /&gt;
% you will want to make sure that Y and y are in your list.&lt;br /&gt;
&lt;br /&gt;
% This function returns the width of the&lt;br /&gt;
% grob (stencil) for a given piece of text.&lt;br /&gt;
#(define (width grob text)&lt;br /&gt;
   (let* ((X-extent&lt;br /&gt;
           (ly:stencil-extent (grob-interpret-markup grob text) X)))&lt;br /&gt;
     (if (interval-empty? X-extent)&lt;br /&gt;
         0&lt;br /&gt;
         (cdr X-extent))))&lt;br /&gt;
&lt;br /&gt;
% This callback sets the alignment point of a LyricText grob&lt;br /&gt;
% to the centre of the first vowel that it contains.&lt;br /&gt;
#(define (center-on-first-vowel grob)&lt;br /&gt;
   (let* ((text (ly:grob-property-data grob &#039;text))&lt;br /&gt;
          (syllable (markup-&amp;gt;string text))&lt;br /&gt;
          (vowel-position&lt;br /&gt;
           (if (string-index syllable vowel-set)&lt;br /&gt;
               (string-index syllable vowel-set)&lt;br /&gt;
               0))&lt;br /&gt;
          (vowel-end&lt;br /&gt;
           (if (string-index syllable vowel-set)&lt;br /&gt;
               (+ (string-index syllable vowel-set) 1)&lt;br /&gt;
               (string-length syllable)))&lt;br /&gt;
          (preword (substring syllable 0 vowel-position))&lt;br /&gt;
          (word (substring syllable vowel-position vowel-end))&lt;br /&gt;
          (preword-width (width grob preword))&lt;br /&gt;
          (word-width (width grob&lt;br /&gt;
                             (if (string-null? syllable) text word)))&lt;br /&gt;
          (note-column (ly:grob-parent grob X))&lt;br /&gt;
          (note-column-extent (ly:grob-extent&lt;br /&gt;
                               note-column note-column X))&lt;br /&gt;
          (note-column-width (interval-length note-column-extent))&lt;br /&gt;
          (self-X (ly:grob-property-data grob &#039;self-alignment-X)))&lt;br /&gt;
     (-&lt;br /&gt;
      (*&lt;br /&gt;
       (/ (- note-column-width word-width) 2)&lt;br /&gt;
       (1+ (if (procedure? self-X) (self-X grob) self-X)))&lt;br /&gt;
      preword-width)))&lt;br /&gt;
&lt;br /&gt;
% This callback sets the alignment point of a LyricText grob&lt;br /&gt;
% to the point midway between its first and last vowels.&lt;br /&gt;
#(define (center-between-vowels grob)&lt;br /&gt;
   (let* ((text (ly:grob-property-data grob &#039;text))&lt;br /&gt;
          (syllable (markup-&amp;gt;string text))&lt;br /&gt;
          (word-position&lt;br /&gt;
           (if (string-index syllable vowel-set)&lt;br /&gt;
               (string-index syllable vowel-set)&lt;br /&gt;
               0))&lt;br /&gt;
          (word-end&lt;br /&gt;
           (if (string-index-right syllable vowel-set)&lt;br /&gt;
               (+ (string-index-right syllable vowel-set) 1)&lt;br /&gt;
               (string-length syllable)))&lt;br /&gt;
          (preword (substring syllable 0 word-position))&lt;br /&gt;
          (word (substring syllable word-position word-end))&lt;br /&gt;
          (preword-width (width grob preword))&lt;br /&gt;
          (word-width (width grob&lt;br /&gt;
                             (if (string-null? syllable) text word)))&lt;br /&gt;
          (note-column (ly:grob-parent grob X))&lt;br /&gt;
          (note-column-extent (ly:grob-extent&lt;br /&gt;
                               note-column note-column X))&lt;br /&gt;
          (note-column-width (interval-length note-column-extent))&lt;br /&gt;
          (self-X (ly:grob-property-data grob &#039;self-alignment-X)))&lt;br /&gt;
&lt;br /&gt;
     (-&lt;br /&gt;
      (*&lt;br /&gt;
       (/ (- note-column-width word-width) 2)&lt;br /&gt;
       (1+ (if (procedure? self-X) (self-X grob) self-X)))&lt;br /&gt;
      preword-width)))&lt;br /&gt;
&lt;br /&gt;
% Helper functions that use the above code:&lt;br /&gt;
cvs = \once \override LyricText.X-offset = #center-between-vowels&lt;br /&gt;
cfv = \once \override LyricText.X-offset = #center-on-first-vowel&lt;br /&gt;
&lt;br /&gt;
\fixed c&#039; {&lt;br /&gt;
  \*8 { f2 f }&lt;br /&gt;
  % The command \* requires&lt;br /&gt;
  % version 2.25 or later.&lt;br /&gt;
  % For version 2.24, use&lt;br /&gt;
  % \repeat unfold 8&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
\addlyrics {&lt;br /&gt;
  \cfv piste piste&lt;br /&gt;
  \cfv “O—!!!” “O—!!!”&lt;br /&gt;
  \cvs “O—!!!” “O—!!!”&lt;br /&gt;
  \cfv blessed blessed&lt;br /&gt;
  \cfv heaven heaven&lt;br /&gt;
  \cvs heav’n heav’n&lt;br /&gt;
  \cvs youths youths&lt;br /&gt;
  \cvs each each&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lilypond&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to apply one of these functions globally, you can place either of the following in your &amp;lt;code&amp;gt;\layout&amp;lt;/code&amp;gt; block:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;\override Score.LyricText.X-offset = #center-between-vowels&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;\override Score.LyricText.X-offset = #center-on-first-vowel&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you then need to switch off the function locally, use &amp;lt;code&amp;gt;\once \revert LyricText.X-offset&amp;lt;/code&amp;gt;.&lt;br /&gt;
[[Category:Vocal music]]&lt;br /&gt;
[[Category:Text]]&lt;br /&gt;
[[Category:Tweaks and overrides]]&lt;br /&gt;
[[Category:Scheme]]&lt;br /&gt;
[[Category:Spacing]]&lt;br /&gt;
[[Category:Snippet]]&lt;/div&gt;</summary>
		<author><name>Gabriel Ellsworth</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=Slurs_with_stemless_note_heads&amp;diff=6427</id>
		<title>Slurs with stemless note heads</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=Slurs_with_stemless_note_heads&amp;diff=6427"/>
		<updated>2026-03-06T11:32:58Z</updated>

		<summary type="html">&lt;p&gt;Gabriel Ellsworth: Created page with &amp;quot;If you do not want your notes to have stems, &amp;lt;code&amp;gt;\omit Stem&amp;lt;/code&amp;gt; is very useful. But you may find that LilyPond positions the start or end points of some slurs incorrectly.  By setting &amp;lt;code&amp;gt;\override NoteHead.stem-attachment = #&amp;#039;(0 . 0)&amp;lt;/code&amp;gt; you can move the stem attachment point to the center of the note head, which results in better slur positioning for stemless note heads.  Source of music: [https://archive.org/details/manualofgregoria00dela/page/266/mode/1up A...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;If you do not want your notes to have stems, &amp;lt;code&amp;gt;\omit Stem&amp;lt;/code&amp;gt; is very useful. But you may find that LilyPond positions the start or end points of some slurs incorrectly.&lt;br /&gt;
&lt;br /&gt;
By setting &amp;lt;code&amp;gt;\override NoteHead.stem-attachment = #&#039;(0 . 0)&amp;lt;/code&amp;gt; you can move the stem attachment point to the center of the note head, which results in better slur positioning for stemless note heads.&lt;br /&gt;
&lt;br /&gt;
Source of music: [https://archive.org/details/manualofgregoria00dela/page/266/mode/1up A manual of Gregorian chant compiled from the Solesmes books and from ancient manuscripts].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lilypond version=&amp;quot;2.24&amp;quot;&amp;gt;&lt;br /&gt;
chant = \relative c&#039; {&lt;br /&gt;
  \key d \dorian&lt;br /&gt;
  \slurUp&lt;br /&gt;
  &lt;br /&gt;
  \time 18/4&lt;br /&gt;
  d( a&#039;) g( f g) a( bes) a2&lt;br /&gt;
  a4 g( f) g( f) d2( f) | \bar &amp;quot;,&amp;quot;&lt;br /&gt;
  &lt;br /&gt;
  \time 17/4 a4 a( g f) g( f a) a2&lt;br /&gt;
  a4 c( b g) b( c a2) | \bar &amp;quot;&#039;&amp;quot;&lt;br /&gt;
  &lt;br /&gt;
  \time 20/4&lt;br /&gt;
  d4( c b g) b( c a) ~&lt;br /&gt;
  a( g f) g( a d,) ~&lt;br /&gt;
  d( c f) e( d) d2 | \bar &amp;quot;||&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
words = \lyricmode {&lt;br /&gt;
  Ad -- o -- ré -- mus&lt;br /&gt;
  in ae -- tér -- num&lt;br /&gt;
  sanc -- tís -- si -- mum&lt;br /&gt;
  Sa -- cra -- _ _ _ _ mén -- tum.&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
% Top-level layout (applying to all scores):&lt;br /&gt;
\layout {&lt;br /&gt;
  \set Score.forbidBreakBetweenBarLines = ##f&lt;br /&gt;
  \omit Score.TimeSignature&lt;br /&gt;
  \context {&lt;br /&gt;
    \Voice&lt;br /&gt;
    \consists Melody_engraver&lt;br /&gt;
    \omit Stem&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
scoreContent = &amp;lt;&amp;lt; \new Voice = &amp;quot;chant&amp;quot; \chant&lt;br /&gt;
   \new Lyrics \lyricsto chant \words &amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
\markup { \circle 1 LilyPond’s default: }&lt;br /&gt;
\score {&lt;br /&gt;
  \scoreContent&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
\markup { \circle 2 With adjustment to stem-attachment: }&lt;br /&gt;
\score {&lt;br /&gt;
  % score-specific layout:&lt;br /&gt;
  \layout {&lt;br /&gt;
    \context {&lt;br /&gt;
      \Voice&lt;br /&gt;
      \override NoteHead.stem-attachment = #&#039;(0 . 0)&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
  \scoreContent&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lilypond&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Ancient notation]]&lt;br /&gt;
[[Category:Connecting notes]]&lt;br /&gt;
[[Category:Expressive marks]]&lt;br /&gt;
[[Category:Real music]]&lt;br /&gt;
[[Category:Snippet]]&lt;br /&gt;
[[Category:Tweaks and overrides]]&lt;br /&gt;
[[Category:Vocal music]]&lt;/div&gt;</summary>
		<author><name>Gabriel Ellsworth</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=Text_and_translation_template&amp;diff=6367</id>
		<title>Text and translation template</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=Text_and_translation_template&amp;diff=6367"/>
		<updated>2026-02-20T12:25:08Z</updated>

		<summary type="html">&lt;p&gt;Gabriel Ellsworth: Created page with &amp;quot;This snippet shows an example of how you can typeset a &amp;lt;code&amp;gt;\markup&amp;lt;/code&amp;gt; block before or after your score to display your piece’s text, a translation, and (if desired) a transcription in IPA (the International Phonetic Alphabet).  Source: Vaughan McAlley via the lilypond-user mailing list (posted to the LilyPond wiki with his permission).  See also Typesetting IPA transcriptions for lyrics. &amp;lt;lilypond version=&amp;quot;2.24&amp;quot;&amp;gt; \markup \abs-fontsize #10 {   \left-column {...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This snippet shows an example of how you can typeset a &amp;lt;code&amp;gt;\markup&amp;lt;/code&amp;gt; block before or after your score to display your piece’s text, a translation, and (if desired) a transcription in IPA (the International Phonetic Alphabet).&lt;br /&gt;
&lt;br /&gt;
Source: Vaughan McAlley via the lilypond-user mailing list (posted to the LilyPond wiki with his permission).&lt;br /&gt;
&lt;br /&gt;
See also [[Typesetting IPA transcriptions for lyrics]].&lt;br /&gt;
&amp;lt;lilypond version=&amp;quot;2.24&amp;quot;&amp;gt;&lt;br /&gt;
\markup \abs-fontsize #10 {&lt;br /&gt;
  \left-column {&lt;br /&gt;
    \vspace #3&lt;br /&gt;
    \fill-line {&lt;br /&gt;
      \left-column {&lt;br /&gt;
        &amp;quot;Madame, ye ben of al beaute shryne&amp;quot;&lt;br /&gt;
        &amp;quot;As fer as cercled is the mapamounde,&amp;quot;&lt;br /&gt;
        &amp;quot;For as the cristal glorious ye shyne,&amp;quot;&lt;br /&gt;
        &amp;quot;And lyke ruby ben your chekes rounde.&amp;quot;&lt;br /&gt;
        &amp;quot;Therwith ye ben so mery and so jocounde&amp;quot;&lt;br /&gt;
        &amp;quot;That at a revel whan that I see you daunce,&amp;quot;&lt;br /&gt;
        &amp;quot;It is an oynement unto my wounde,&amp;quot;&lt;br /&gt;
        &amp;quot;Thogh ye to me ne do no daliaunce.&amp;quot;&lt;br /&gt;
        \null&lt;br /&gt;
        \concat { &amp;quot;Text from &amp;quot; \italic &amp;quot;The poetical works of Geoffrey Chaucer&amp;quot; }&lt;br /&gt;
        &amp;quot;London : Bell and Daldy, 1891&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
      \left-column {&lt;br /&gt;
        &amp;quot;mada:mə je bɛn ɔf al beautɛ ʃri:nə&amp;quot;&lt;br /&gt;
        &amp;quot;az fɛ:r az sɛ:rkləd ɪz θə mapamu:ndə&amp;quot;&lt;br /&gt;
        &amp;quot;for az θə krɪstal glo:rɪəs jɛ ʃi:nə&amp;quot;&lt;br /&gt;
        &amp;quot;and likə ru:bɪ bɛn ju:r tʃɛkəz ru:ndə&amp;quot;&lt;br /&gt;
        &amp;quot;θɛrwɪθ je bɛn so meri and so dʒɔku:ndə&amp;quot;&lt;br /&gt;
        &amp;quot;θat at a rɛvəl hwan θat i: se: yu: daunsə&amp;quot;&lt;br /&gt;
        &amp;quot;it iz an ɔinəmənt unto: mi wu:ndə&amp;quot;&lt;br /&gt;
        &amp;quot;θox je to me ne do no dalɪaunsə&amp;quot;&lt;br /&gt;
        \null&lt;br /&gt;
        &amp;quot;http://en.wikipedia.org/wiki/&amp;quot;&lt;br /&gt;
        &amp;quot;International_Phonetic_Alphabet&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
    \vspace #3&lt;br /&gt;
    \fill-line {&lt;br /&gt;
      \left-column {&lt;br /&gt;
        &amp;quot;Madam, you are the shrine of all beauty&amp;quot;&lt;br /&gt;
        &amp;quot;as far as the world-map encompasses,&amp;quot;&lt;br /&gt;
        &amp;quot;for you shine like a glorious crystal,&amp;quot;&lt;br /&gt;
        &amp;quot;and your round cheeks are like rubies.&amp;quot;&lt;br /&gt;
        &amp;quot;Thereupon you are so merry and jocund&amp;quot;&lt;br /&gt;
        &amp;quot;that when I see you dancing at a revel,&amp;quot;&lt;br /&gt;
        &amp;quot;it is an ointment for my wound,&amp;quot;&lt;br /&gt;
        &amp;quot;even though you are not encouraging to me.&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
    \vspace #3&lt;br /&gt;
    \fill-line {&lt;br /&gt;
      \left-column {&lt;br /&gt;
        &amp;quot;A rough guide to IPA pronunciation:&amp;quot;&lt;br /&gt;
        \concat { &amp;quot;a - f&amp;quot; \italic a &amp;quot;ther (British English)&amp;quot; }&lt;br /&gt;
        \concat { &amp;quot;e - et&amp;quot; \italic é &amp;quot; (French)&amp;quot; }&lt;br /&gt;
        \concat { &amp;quot;ɛ - b&amp;quot; \italic ê &amp;quot;te (French)&amp;quot; }&lt;br /&gt;
        \concat { &amp;quot;ə - pris&amp;quot; \italic o &amp;quot;n (British English)&amp;quot; }&lt;br /&gt;
        \concat { &amp;quot;i - l&amp;quot; \italic ie &amp;quot;ber (German)&amp;quot; }&lt;br /&gt;
        \concat { &amp;quot;ɪ - p&amp;quot; \italic i &amp;quot;t (British English)&amp;quot; }&lt;br /&gt;
        \concat { &amp;quot;ɔ - p&amp;quot; \italic o &amp;quot;t (British English)&amp;quot; }&lt;br /&gt;
        \concat { &amp;quot;o - &amp;quot; \italic au &amp;quot; (French)&amp;quot; }&lt;br /&gt;
        \concat { &amp;quot;u - &amp;quot; \italic ou &amp;quot; (French)&amp;quot; }&lt;br /&gt;
        \null&lt;br /&gt;
        \concat { &amp;quot;dʒ - &amp;quot; \italic j &amp;quot;udge (British English)*&amp;quot; }&lt;br /&gt;
        \concat { &amp;quot;r - ca&amp;quot; \italic r &amp;quot;a (Italian)&amp;quot; }&lt;br /&gt;
        \concat { &amp;quot;j - &amp;quot; \italic y &amp;quot;es (British English)*&amp;quot; }&lt;br /&gt;
        \concat { &amp;quot;ʃ - &amp;quot; \italic sh &amp;quot;ip (British English)*&amp;quot; }&lt;br /&gt;
        \concat { &amp;quot;θ - &amp;quot; \italic th &amp;quot;orn (British English)&amp;quot; }&lt;br /&gt;
        \concat { &amp;quot;x - a&amp;quot; \italic ch &amp;quot; (German)&amp;quot; }&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
    \vspace #2&lt;br /&gt;
    \wordwrap {&lt;br /&gt;
      Consonants not indicated should be pronounced as an English speaker would.&lt;br /&gt;
      Starred consonants look unusual in IPA but the original letter(s) are pronounced&lt;br /&gt;
      as they are in Modern English. Diphthongs should move between the two pure vowels.&lt;br /&gt;
      An exception to the generally phonetic pronunciation is that \italic ou denotes a&lt;br /&gt;
      lengthened \italic u: sound. Also note that the initial \italic th in words like&lt;br /&gt;
      \italic the and \italic thogh is unvoiced, unlike modern practice.&lt;br /&gt;
    }\vspace #1&lt;br /&gt;
    \fill-line { \null \center-column { &amp;quot;Vaughan McAlley&amp;quot; &amp;quot;May 2015&amp;quot; } }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lilypond&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Template]]&lt;br /&gt;
[[Category:Text]]&lt;br /&gt;
[[Category:Vocal music]]&lt;br /&gt;
[[Category:World music]]&lt;br /&gt;
[[Category:Editorial annotations]]&lt;br /&gt;
[[Category:Education]]&lt;br /&gt;
[[Category:Non-music]]&lt;br /&gt;
[[Category:Snippet]]&lt;/div&gt;</summary>
		<author><name>Gabriel Ellsworth</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=Displaying_LilyPond%27s_data_directory&amp;diff=6355</id>
		<title>Displaying LilyPond&#039;s data directory</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=Displaying_LilyPond%27s_data_directory&amp;diff=6355"/>
		<updated>2026-02-19T14:33:05Z</updated>

		<summary type="html">&lt;p&gt;Gabriel Ellsworth: I changed an apostrophe to curly (typographical) punctuation and clarified where the directory will display.&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.&lt;br /&gt;
&lt;br /&gt;
Using the following code will display LilyPond’s data directory in the LilyPond log.&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>Gabriel Ellsworth</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=Unmetered_music:_An_alternative_to_%5CcadenzaOn&amp;diff=6326</id>
		<title>Unmetered music: An alternative to \cadenzaOn</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=Unmetered_music:_An_alternative_to_%5CcadenzaOn&amp;diff=6326"/>
		<updated>2026-02-12T13:58:52Z</updated>

		<summary type="html">&lt;p&gt;Gabriel Ellsworth: I changed the music example.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;If your music is unmetered, you might use &amp;lt;code&amp;gt;\cadenzaOn&amp;lt;/code&amp;gt;. But &amp;lt;code&amp;gt;\cadenzaOn&amp;lt;/code&amp;gt; will disable automatic measure demarcation, and when it is applied, the &amp;lt;code&amp;gt;\bar&amp;lt;/code&amp;gt; command will &#039;&#039;not&#039;&#039; start a new measure.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;If you want the features that come with measure demarcation&amp;lt;/u&amp;gt; (e.g., resetting &#039;&#039;&#039;accidentals&#039;&#039;&#039;, automatic &#039;&#039;&#039;bar numbering&#039;&#039;&#039;, automatic &#039;&#039;&#039;beaming&#039;&#039;&#039;), the following approach may be useful. It combines &amp;lt;code&amp;gt;\omit TimeSignature&amp;lt;/code&amp;gt; with [https://lilypond.org/doc/v2.24/Documentation/internals/devnull a &amp;lt;code&amp;gt;Devnull&amp;lt;/code&amp;gt; context] containing a timing (measure demarcation) variable.&lt;br /&gt;
&lt;br /&gt;
If you use Frescobaldi, you may find its built-in duration counter helpful for computing values to enter into your measure-demarcation variable. Look below your code window for “Length: #/#” to the right of the Line and Col counters. Highlight a measure of music input in your code to see Frescobaldi’s automatic counting of its length.&lt;br /&gt;
&lt;br /&gt;
See also [https://lilypond.org/doc/v2.24/Documentation/notation/displaying-rhythms#unmetered-music “Unmetered music” in the Notation Reference] and the snippet [[Free meter – increasing the bar number wherever you want]].&lt;br /&gt;
&lt;br /&gt;
This approach is useful for opera recitative, as demonstrated in the following example from &#039;&#039;Patience&#039;&#039; by Gilbert &amp;amp; Sullivan.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lilypond version=&amp;quot;2.24&amp;quot;&amp;gt;&lt;br /&gt;
\header {&lt;br /&gt;
  title = &amp;quot;Example from a recitative&amp;quot;&lt;br /&gt;
  subtitle = \markup \concat {&lt;br /&gt;
    &amp;quot;“Still brooding on their mad infatuation”&amp;quot;&lt;br /&gt;
    &amp;quot; from &amp;quot; \italic Patience&lt;br /&gt;
  }&lt;br /&gt;
  subsubtitle = &amp;quot;Source: IMSLP #251595&amp;quot;&lt;br /&gt;
  poet = Gilbert&lt;br /&gt;
  composer = Sullivan&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
\layout {&lt;br /&gt;
  \context {&lt;br /&gt;
    \Staff&lt;br /&gt;
    % If you enable the following line,&lt;br /&gt;
    % you will see that \measures works&lt;br /&gt;
    % to create measure boundaries&lt;br /&gt;
    % for automatic accidentals:&lt;br /&gt;
    % \accidentalStyle dodecaphonic-first&lt;br /&gt;
  }&lt;br /&gt;
  \context {&lt;br /&gt;
    \Score&lt;br /&gt;
    forbidBreakBetweenBarLines = ##f&lt;br /&gt;
    \override BarNumber.break-visibility = ##(#f #t #t)&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
%% Define a variable that will go in a Devnull context:&lt;br /&gt;
measures = {&lt;br /&gt;
  % The source has a common time signature. To reproduce it:&lt;br /&gt;
  % Have LilyPond print a text grob instead of a usual time signature:&lt;br /&gt;
  \once \override Score.TimeSignature.stencil = #ly:text-interface::print &lt;br /&gt;
  % Specify that the text grob should be the symbol for common time:&lt;br /&gt;
  \once \override Score.TimeSignature.text = \markup \musicglyph &amp;quot;timesig.C44&amp;quot; &lt;br /&gt;
  \time 17/8 s8*17&lt;br /&gt;
  &lt;br /&gt;
  % measure 2: &lt;br /&gt;
  \omit Score.TimeSignature&lt;br /&gt;
  \time 13/8 s8*13&lt;br /&gt;
  &lt;br /&gt;
  % measure 3: &lt;br /&gt;
  \time 4/4 s4*4&lt;br /&gt;
  &lt;br /&gt;
  % measure 4:&lt;br /&gt;
  \time 8/4 s4*8&lt;br /&gt;
  &lt;br /&gt;
  % measures 5 and 6:&lt;br /&gt;
  \time 4/4&lt;br /&gt;
  &lt;br /&gt;
  % Continue adding time signatures, spacer rests,&lt;br /&gt;
  % and (if desired) custom bar lines&lt;br /&gt;
  % for each subsequent “measure” of your music:&lt;br /&gt;
  % \time XX/4 s4*XX&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
global = {&lt;br /&gt;
  \key f \major&lt;br /&gt;
  % Notice that if you enable \cadenzaOn,&lt;br /&gt;
  % you will lose the features of&lt;br /&gt;
  % automatic measure demarcation:&lt;br /&gt;
  % \cadenzaOn&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
soprano = \relative c&#039;&#039; {&lt;br /&gt;
  \global&lt;br /&gt;
  \autoBeamOff&lt;br /&gt;
  r4 c bes8 a r a bes c c d e g4 f |&lt;br /&gt;
  % Barchecks with | are helpful&lt;br /&gt;
  % to confirm that your \measures variable&lt;br /&gt;
  % has correct durations in it&lt;br /&gt;
  r4 f8 f8. f,16 f4 r8 f&lt;br /&gt;
  ees&#039; ees d8. c16 |&lt;br /&gt;
  d8 r r4 r2 |&lt;br /&gt;
  d4 d8 d f4 d8 d16 d&lt;br /&gt;
  c8 d c bes r bes c d |&lt;br /&gt;
  d8. g,16 g8 g f&#039;4. e8 |&lt;br /&gt;
  c4 r r2 |&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
text = \lyricmode {&lt;br /&gt;
  Still brood -- ing on their&lt;br /&gt;
  mad in -- fat -- u -- a -- tion!&lt;br /&gt;
  I thank thee, Love, thou&lt;br /&gt;
  com -- est not to me;&lt;br /&gt;
  Far hap -- pier I, free from&lt;br /&gt;
  thy min -- is -- tra -- tion,&lt;br /&gt;
  Than dukes or duch -- es -- ses&lt;br /&gt;
  who love, can be!&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
pianoRH = \relative c&#039; {&lt;br /&gt;
  \global&lt;br /&gt;
  &amp;lt;f a,&amp;gt;8 r r4 s4 r1 s4. |&lt;br /&gt;
  &amp;lt;f c&amp;gt;2 s4. r2 s4 |&lt;br /&gt;
  r4 &amp;lt;d bes&amp;gt; r2 |&lt;br /&gt;
  r2 s2 r2 s2 |&lt;br /&gt;
  &amp;lt;f d&amp;gt;2 r2 |&lt;br /&gt;
  r4 &amp;lt;e c&amp;gt; r2 |&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
pianoLH = \relative {&lt;br /&gt;
  \global&lt;br /&gt;
  \clef bass&lt;br /&gt;
  &amp;lt;f f,&amp;gt;8 r r4 s4 r1 s4. |&lt;br /&gt;
  &amp;lt;f a,&amp;gt;2 s4. r2 s4 |&lt;br /&gt;
  r4 &amp;lt;f bes,&amp;gt; r2 |&lt;br /&gt;
  r2 s2 r2 s2 |&lt;br /&gt;
  &amp;lt;g b,&amp;gt;2 r2 |&lt;br /&gt;
  r4 &amp;lt;g c,&amp;gt;4 r2 |&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
\score {&lt;br /&gt;
  &amp;lt;&amp;lt;&lt;br /&gt;
    %% Add your variable to a Devnull context:&lt;br /&gt;
    \new Devnull \measures&lt;br /&gt;
    \new Staff &amp;lt;&amp;lt;&lt;br /&gt;
      \new Voice = &amp;quot;soprano&amp;quot; \soprano&lt;br /&gt;
      \new Lyrics \lyricsto &amp;quot;soprano&amp;quot; \text&lt;br /&gt;
    &amp;gt;&amp;gt;&lt;br /&gt;
    \new PianoStaff &amp;lt;&amp;lt;&lt;br /&gt;
      \new Staff = &amp;quot;right&amp;quot; \pianoRH&lt;br /&gt;
      \new Staff = &amp;quot;left&amp;quot; { \clef bass \pianoLH }&lt;br /&gt;
    &amp;gt;&amp;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:Rhythms]]&lt;br /&gt;
[[Category:Workaround]]&lt;br /&gt;
[[Category:Snippet]]&lt;br /&gt;
[[Category:Real music]]&lt;/div&gt;</summary>
		<author><name>Gabriel Ellsworth</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=Modify_only_the_current_system&amp;diff=6316</id>
		<title>Modify only the current system</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=Modify_only_the_current_system&amp;diff=6316"/>
		<updated>2026-02-02T17:55:06Z</updated>

		<summary type="html">&lt;p&gt;Gabriel Ellsworth: I deleted the full keyword because, as far as I can tell, this snippet does not need to demonstrate page layout features.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Starting bars usually are all clones of the first one. The only way to affect one system and not the others is to collect all the grobs using the &amp;lt;code&amp;gt;all-elements&amp;lt;/code&amp;gt; property of any grob on the system in question (for example a &amp;lt;code&amp;gt;NoteHead&amp;lt;/code&amp;gt;) and filter the target grob, which you can then modify.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lilypond version=&amp;quot;2.24&amp;quot;&amp;gt;&lt;br /&gt;
%% Thanks to David Nalesnik:&lt;br /&gt;
%% https://lists.gnu.org/archive/html/lilypond-user/2019-03/msg00205.html&lt;br /&gt;
&lt;br /&gt;
#(define drop-in-on-spanner&lt;br /&gt;
   (lambda (grob)&lt;br /&gt;
     (let* ((elts (ly:grob-array-&amp;gt;list (ly:grob-object (ly:grob-system grob) &#039;all-elements)))&lt;br /&gt;
            (ssb (filter (lambda (e) (grob::has-interface e &#039;system-start-delimiter-interface))&lt;br /&gt;
                         elts)))&lt;br /&gt;
       (set! (ly:grob-property (car ssb) &#039;color) red))))&lt;br /&gt;
&lt;br /&gt;
\new StaffGroup &amp;lt;&amp;lt;&lt;br /&gt;
  \new Staff {&lt;br /&gt;
    c&#039;1 \break&lt;br /&gt;
    \tweak after-line-breaking #drop-in-on-spanner&lt;br /&gt;
    c&#039; \break&lt;br /&gt;
    c&#039; \break&lt;br /&gt;
  }&lt;br /&gt;
  \new Staff {&lt;br /&gt;
    c&#039; c&#039; c&#039;&lt;br /&gt;
  }&lt;br /&gt;
&amp;gt;&amp;gt;&lt;br /&gt;
&amp;lt;/lilypond&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Staff notation]]&lt;br /&gt;
[[Category:Tweaks and overrides]]&lt;br /&gt;
[[Category:Snippet]]&lt;/div&gt;</summary>
		<author><name>Gabriel Ellsworth</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=Box_around_notes&amp;diff=6315</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=6315"/>
		<updated>2026-02-02T17:23:37Z</updated>

		<summary type="html">&lt;p&gt;Gabriel Ellsworth: I deleted the full keyword because, as far as I can tell, this snippet does not need to demonstrate page layout features.&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;&amp;gt;&lt;br /&gt;
\version &amp;quot;2.19.15&amp;quot;&lt;br /&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;
\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>Gabriel Ellsworth</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=Grouping_contexts&amp;diff=6314</id>
		<title>Grouping contexts</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=Grouping_contexts&amp;diff=6314"/>
		<updated>2026-02-02T17:22:17Z</updated>

		<summary type="html">&lt;p&gt;Gabriel Ellsworth: I deleted the full keyword because, as far as I can tell, this snippet does not need to demonstrate page layout features.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In polyphonic notation, many voices can share a staff: In this situation, the accidentals and staff are shared, but the stems, slurs, beams, etc., are private to each voice. Hence, engravers should be grouped. The engravers for note head, stems, slurs, etc., go into a group called “Voice context”, while the engravers for key, accidental, bar, etc., go into a group called “Staff context”. In the case of polyphony, a single Staff context contains more than one Voice context. Similarly, more Staff contexts can be put into a single Score context.&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=108&lt;br /&gt;
&lt;br /&gt;
\layout {&lt;br /&gt;
  indent = 0&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
topVoice = \relative c&#039; {&lt;br /&gt;
  \key d\major&lt;br /&gt;
  es8([ g] a[ fis])&lt;br /&gt;
  b4&lt;br /&gt;
  b16[-. b-. b-. cis-.]&lt;br /&gt;
  d4-&amp;gt;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
botVoice = \relative c&#039; {&lt;br /&gt;
  \key d\major&lt;br /&gt;
  c8[( f] b[ a)]&lt;br /&gt;
  es4&lt;br /&gt;
  es16[-. es-. es-. fis-.]&lt;br /&gt;
  b4-&amp;gt;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
hoom = \relative c {&lt;br /&gt;
  \key d \major&lt;br /&gt;
  \clef bass&lt;br /&gt;
  g8-. r&lt;br /&gt;
  r4&lt;br /&gt;
  fis8-.&lt;br /&gt;
  r8&lt;br /&gt;
  r4&lt;br /&gt;
  b&#039;4-&amp;gt;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
pah = \relative c&#039; {&lt;br /&gt;
  r8 b-.&lt;br /&gt;
  r4&lt;br /&gt;
  r8 g8-.&lt;br /&gt;
  r16 g-. r8&lt;br /&gt;
  \clef treble&lt;br /&gt;
  fis&#039;4-&amp;gt;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
\score {&lt;br /&gt;
  \context Staff &amp;lt;&amp;lt; \topVoice \\ \botVoice &amp;gt;&amp;gt;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
\score {&lt;br /&gt;
  &amp;lt;&amp;lt; &lt;br /&gt;
    \new Staff &amp;lt;&amp;lt; \topVoice \\ \botVoice &amp;gt;&amp;gt;&lt;br /&gt;
    \new Staff &amp;lt;&amp;lt; \pah \\ \hoom &amp;gt;&amp;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:Rhythms]]&lt;br /&gt;
[[Category:Contexts and engravers]]&lt;br /&gt;
[[Category:Real music]]&lt;br /&gt;
[[Category:Snippet]]&lt;/div&gt;</summary>
		<author><name>Gabriel Ellsworth</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=Typesetting_IPA_transcriptions_for_lyrics&amp;diff=6287</id>
		<title>Typesetting IPA transcriptions for lyrics</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=Typesetting_IPA_transcriptions_for_lyrics&amp;diff=6287"/>
		<updated>2026-01-31T12:16:15Z</updated>

		<summary type="html">&lt;p&gt;Gabriel Ellsworth: Created page with &amp;quot;Singers may find it useful if you add International Phonetic Alphabet (IPA) transcriptions to some or all of your lyrics. This snippet shows four ways to typeset IPA transcriptions in LilyPond. # As a &amp;#039;&amp;#039;&amp;#039;stanza of lyrics&amp;#039;&amp;#039;&amp;#039;. This approach works well when you want &amp;#039;&amp;#039;&amp;#039;exhaustive IPA&amp;#039;&amp;#039;&amp;#039; (i.e., transcriptions of every lyric). # In a &amp;#039;&amp;#039;&amp;#039;markup block&amp;#039;&amp;#039;&amp;#039; separate from your score. Also good for exhaustive IPA. Tip: As you are editing, you can [https://lilypond.org/doc/v2.25/Docu...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Singers may find it useful if you add International Phonetic Alphabet (IPA) transcriptions to some or all of your lyrics. This snippet shows four ways to typeset IPA transcriptions in LilyPond.&lt;br /&gt;
# As a &#039;&#039;&#039;stanza of lyrics&#039;&#039;&#039;. This approach works well when you want &#039;&#039;&#039;exhaustive IPA&#039;&#039;&#039; (i.e., transcriptions of every lyric).&lt;br /&gt;
# In a &#039;&#039;&#039;markup block&#039;&#039;&#039; separate from your score. Also good for exhaustive IPA. Tip: As you are editing, you can [https://lilypond.org/doc/v2.25/Documentation/notation/formatting-text#text-alignment put &amp;lt;code&amp;gt;\hspace&amp;lt;/code&amp;gt; commands into boxes to see their effects].&lt;br /&gt;
# Using a &#039;&#039;&#039;dedicated music function&#039;&#039;&#039;, &amp;lt;code&amp;gt;\withIPA&amp;lt;/code&amp;gt;, and an IPA Lyrics context. Best when you want &#039;&#039;&#039;selective IPA&#039;&#039;&#039; (i.e., transcriptions for only &#039;&#039;some&#039;&#039; lyrics).&lt;br /&gt;
# Using a &#039;&#039;&#039;custom markup command&#039;&#039;&#039;, &amp;lt;code&amp;gt;\IPA&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;
\paper { score-markup-spacing.padding = 4 }&lt;br /&gt;
&lt;br /&gt;
%%  OPTION 1&lt;br /&gt;
\markup { \circle 1 When you want IPA &lt;br /&gt;
  under every lyric, you can add a stanza: }&lt;br /&gt;
&lt;br /&gt;
melodyUnmarked = \relative c&#039;&#039; {&lt;br /&gt;
  \key e \major \time 3/4 &lt;br /&gt;
  r2 b4 | e2 gis,8. fis16 | e2 cis&#039;4 | &lt;br /&gt;
  a4.( gis8) a4 | gis gis r |&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
textUnmarked = \lyricmode {&lt;br /&gt;
  I know that _ my Re -- &lt;br /&gt;
  dee -- mer li -- veth, &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
stanzaExhaustiveIPA = \lyricmode {&lt;br /&gt;
  % If needed, change typeface &lt;br /&gt;
  % or font size to your preferences: &lt;br /&gt;
  \override LyricText.font-name = &amp;quot;Times New Roman,&amp;quot;&lt;br /&gt;
  \override LyricText.font-size = #-1&lt;br /&gt;
  aɪ noʊ ðæt _ maɪ ɹɪ ˈdiː mə lɪ vɛθ&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
\score {&lt;br /&gt;
  &amp;lt;&amp;lt;&lt;br /&gt;
    \new Voice = &amp;quot;sop&amp;quot; \melodyUnmarked&lt;br /&gt;
    \new Lyrics &lt;br /&gt;
      % The following line reduces&lt;br /&gt;
      % the vertical space between the text&lt;br /&gt;
      % and the IPA line underneath it: &lt;br /&gt;
      \with { \override VerticalAxisGroup.nonstaff-nonstaff-spacing.minimum-distance = 2 }&lt;br /&gt;
      \lyricsto &amp;quot;sop&amp;quot; \textUnmarked&lt;br /&gt;
    \new Lyrics \lyricsto &amp;quot;sop&amp;quot; \stanzaExhaustiveIPA&lt;br /&gt;
  &amp;gt;&amp;gt;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
%%  OPTION 2&lt;br /&gt;
\markup { \circle 2 Or you can put the IPA transcription &lt;br /&gt;
  in a markup block separate from your score: }&lt;br /&gt;
&lt;br /&gt;
\markup \null&lt;br /&gt;
&lt;br /&gt;
\markup {&lt;br /&gt;
  \justify-line {&lt;br /&gt;
    \hspace #20&lt;br /&gt;
    \left-column {&lt;br /&gt;
      &amp;quot;I know that my Redeemer liveth,&amp;quot;&lt;br /&gt;
      &amp;quot;and that he shall stand …&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
    \override #&#039;(font-name . &amp;quot;Times New Roman,&amp;quot;) &lt;br /&gt;
    \left-column {&lt;br /&gt;
      &amp;quot;aɪ noʊ ðæt maɪ ɹɪˈdiːmə lɪvɛθ&amp;quot;&lt;br /&gt;
      &amp;quot;ænd ðæt hiː ʃæl stænd&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
    \hspace #20&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
\score {&lt;br /&gt;
  &amp;lt;&amp;lt;&lt;br /&gt;
    \new Voice = &amp;quot;sop&amp;quot; \melodyUnmarked&lt;br /&gt;
    \new Lyrics \lyricsto &amp;quot;sop&amp;quot; \textUnmarked&lt;br /&gt;
  &amp;gt;&amp;gt;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
%%  OPTION 3&lt;br /&gt;
\markup \wordwrap { \circle 3 &lt;br /&gt;
  When you want IPA only under certain lyrics, &lt;br /&gt;
  you can use a dedicated &amp;quot;\withIPA&amp;quot; function &lt;br /&gt;
  that works with a dedicated Lyrics context for IPA: }&lt;br /&gt;
&lt;br /&gt;
% Approach by Lukas-Fabian Moser&lt;br /&gt;
% https://lists.gnu.org/archive/html/lilypond-user/2026-01/msg00269.html &lt;br /&gt;
% Define the \withIPA function: &lt;br /&gt;
withIPA =&lt;br /&gt;
#(define-music-function (IPA word) (ly:music? ly:music?)&lt;br /&gt;
   #{&lt;br /&gt;
     &amp;lt;&amp;lt;&lt;br /&gt;
       \context Lyrics = IPA { #IPA }&lt;br /&gt;
       #word&lt;br /&gt;
     &amp;gt;&amp;gt;&lt;br /&gt;
   #})&lt;br /&gt;
&lt;br /&gt;
textMarked = \lyricmode {&lt;br /&gt;
  I know that _ \withIPA maɪ my Re --&lt;br /&gt;
  dee -- mer \withIPA lɪ li -- veth,&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
\score {&lt;br /&gt;
  &amp;lt;&amp;lt;&lt;br /&gt;
    \new Voice = &amp;quot;sop&amp;quot; \melodyUnmarked&lt;br /&gt;
    \new Lyrics &lt;br /&gt;
      \with { \override VerticalAxisGroup.nonstaff-nonstaff-spacing.minimum-distance = 2 }&lt;br /&gt;
      \lyricsto &amp;quot;sop&amp;quot; \textMarked&lt;br /&gt;
    \new Lyrics = IPA \with {&lt;br /&gt;
      \override LyricText.font-name = &amp;quot;Times New Roman,&amp;quot;&lt;br /&gt;
      \override LyricText.font-size = #-1&lt;br /&gt;
    } \lyricsto &amp;quot;sop&amp;quot; { &lt;br /&gt;
      \repeat unfold #(length (music-pitches &lt;br /&gt;
      melodyUnmarked)) \skip 1 }&lt;br /&gt;
  &amp;gt;&amp;gt;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
%%  OPTION 4&lt;br /&gt;
\markup { \circle 4 Or you can use a custom &amp;quot;\IPA&amp;quot; &lt;br /&gt;
  markup command to put IPA in markups on notes: }&lt;br /&gt;
&lt;br /&gt;
% Approach by Kieren MacMillan &lt;br /&gt;
% https://lists.gnu.org/archive/html/lilypond-user/2025-11/msg00161.html &lt;br /&gt;
% Define a custom markup command &lt;br /&gt;
% for the IPA transcriptions: &lt;br /&gt;
#(define-markup-command (IPA layout props arg) (markup?)&lt;br /&gt;
   (interpret-markup layout props&lt;br /&gt;
     (markup #:override &#039;(font-name . &amp;quot;Times New Roman,&amp;quot;) #:fontsize -2 arg)))&lt;br /&gt;
% In the preceding line, change typeface &lt;br /&gt;
% or font size to your preferences.&lt;br /&gt;
&lt;br /&gt;
melodyMarkup = \relative c&#039;&#039; {&lt;br /&gt;
  \key e \major \time 3/4 &lt;br /&gt;
  % Set the alignment point on &lt;br /&gt;
  % the markup’s parent (the note) &lt;br /&gt;
  % to be the center of the note: &lt;br /&gt;
  \override TextScript.parent-alignment-X = #CENTER&lt;br /&gt;
  % Set the alignment point on the markup itself &lt;br /&gt;
  % to be the center of the markup: &lt;br /&gt;
  \override TextScript.self-alignment-X = #CENTER&lt;br /&gt;
  % Thus, the center of each TextScript will be &lt;br /&gt;
  % at the center of the note &lt;br /&gt;
  r2 b4 | e2 gis,8. fis16 | &lt;br /&gt;
  e2^\markup \IPA { /maɪ/ }&lt;br /&gt;
  cis&#039;4 | a4.( gis8) a4 | &lt;br /&gt;
  gis_\markup \IPA { /lɪ/ }&lt;br /&gt;
  gis r | &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
\score {&lt;br /&gt;
  &amp;lt;&amp;lt;&lt;br /&gt;
    \new Voice = &amp;quot;sop&amp;quot; \melodyMarkup&lt;br /&gt;
    \new Lyrics \lyricsto &amp;quot;sop&amp;quot; \textUnmarked&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:Vocal_music]]&lt;br /&gt;
[[Category:Text]]&lt;br /&gt;
[[Category:Editorial_annotations]]&lt;br /&gt;
[[Category:Education]]&lt;br /&gt;
[[Category:World_music]]&lt;br /&gt;
[[Category:Really_cool]]&lt;br /&gt;
[[Category:Scheme]]&lt;br /&gt;
[[Category:Snippet]]&lt;br /&gt;
[[Category:Real_music]]&lt;/div&gt;</summary>
		<author><name>Gabriel Ellsworth</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=Talk:Mozart%E2%80%99s_Musikalisches_W%C3%BCrfelspiel&amp;diff=6279</id>
		<title>Talk:Mozart’s Musikalisches Würfelspiel</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=Talk:Mozart%E2%80%99s_Musikalisches_W%C3%BCrfelspiel&amp;diff=6279"/>
		<updated>2026-01-30T11:13:14Z</updated>

		<summary type="html">&lt;p&gt;Gabriel Ellsworth: /* Apostrophe in page title */ Reply&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Volte in wrong order? ==&lt;br /&gt;
&lt;br /&gt;
It seems to me that the prima volta bar should be seconda volta and vice versa. -- [[User:Lemzwerg|Lemzwerg]] ([[User talk:Lemzwerg|talk]]) 15:08, 7 January 2026 (UTC)&lt;br /&gt;
&lt;br /&gt;
:Indeed! Fixed, thanks. [[User:Jean Abou Samra|Jean Abou Samra]] ([[User talk:Jean Abou Samra|talk]]) 15:26, 7 January 2026 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Does not work with 2.25 ==&lt;br /&gt;
&lt;br /&gt;
What changed? Compiling with 2.25 produces an error message [[User:Manuela|Manuela]] ([[User talk:Manuela|talk]]) 18:52, 7 January 2026 (UTC)&lt;br /&gt;
&lt;br /&gt;
:Fixed, thanks. [[User:Jean Abou Samra|Jean Abou Samra]] ([[User talk:Jean Abou Samra|talk]]) 19:34, 7 January 2026 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Apostrophe in page title ==&lt;br /&gt;
&lt;br /&gt;
The first word of the page title, &amp;quot;Mozart&#039;s,&amp;quot; should change to “Mozart’s” with a curly (typographical) apostrophe. [[User:Gabriel Ellsworth|Gabriel Ellsworth]] ([[User talk:Gabriel Ellsworth|talk]]) 10:42, 30 January 2026 (UTC)&lt;br /&gt;
&lt;br /&gt;
:Please try doing that! :-) On the right side of the page there is an entry &#039;Move&#039;.&lt;br /&gt;
:After moving a page you should always check &#039;Special pages → Broken redirects&#039; whether there are problems. -- [[User:Lemzwerg|Lemzwerg]] ([[User talk:Lemzwerg|talk]]) 10:56, 30 January 2026 (UTC)&lt;br /&gt;
::Done! Thank you, Werner. I did not realize that “Move” — note the curly quotation marks 🙂 — was the place to go to change a page’s title. Now I know. [[User:Gabriel Ellsworth|Gabriel Ellsworth]] ([[User talk:Gabriel Ellsworth|talk]]) 11:13, 30 January 2026 (UTC)&lt;/div&gt;</summary>
		<author><name>Gabriel Ellsworth</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=Talk:Mozart%27s_Musikalisches_W%C3%BCrfelspiel&amp;diff=6278</id>
		<title>Talk:Mozart&#039;s Musikalisches Würfelspiel</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=Talk:Mozart%27s_Musikalisches_W%C3%BCrfelspiel&amp;diff=6278"/>
		<updated>2026-01-30T11:10:14Z</updated>

		<summary type="html">&lt;p&gt;Gabriel Ellsworth: Gabriel Ellsworth moved page Talk:Mozart&amp;#039;s Musikalisches Würfelspiel to Talk:Mozart’s Musikalisches Würfelspiel: Misspelled title: I changed the apostrophe in “Mozart’s” to curly (typographical) punctuation.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Talk:Mozart’s Musikalisches Würfelspiel]]&lt;/div&gt;</summary>
		<author><name>Gabriel Ellsworth</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=Talk:Mozart%E2%80%99s_Musikalisches_W%C3%BCrfelspiel&amp;diff=6277</id>
		<title>Talk:Mozart’s Musikalisches Würfelspiel</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=Talk:Mozart%E2%80%99s_Musikalisches_W%C3%BCrfelspiel&amp;diff=6277"/>
		<updated>2026-01-30T11:10:14Z</updated>

		<summary type="html">&lt;p&gt;Gabriel Ellsworth: Gabriel Ellsworth moved page Talk:Mozart&amp;#039;s Musikalisches Würfelspiel to Talk:Mozart’s Musikalisches Würfelspiel: Misspelled title: I changed the apostrophe in “Mozart’s” to curly (typographical) punctuation.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Volte in wrong order? ==&lt;br /&gt;
&lt;br /&gt;
It seems to me that the prima volta bar should be seconda volta and vice versa. -- [[User:Lemzwerg|Lemzwerg]] ([[User talk:Lemzwerg|talk]]) 15:08, 7 January 2026 (UTC)&lt;br /&gt;
&lt;br /&gt;
:Indeed! Fixed, thanks. [[User:Jean Abou Samra|Jean Abou Samra]] ([[User talk:Jean Abou Samra|talk]]) 15:26, 7 January 2026 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Does not work with 2.25 ==&lt;br /&gt;
&lt;br /&gt;
What changed? Compiling with 2.25 produces an error message [[User:Manuela|Manuela]] ([[User talk:Manuela|talk]]) 18:52, 7 January 2026 (UTC)&lt;br /&gt;
&lt;br /&gt;
:Fixed, thanks. [[User:Jean Abou Samra|Jean Abou Samra]] ([[User talk:Jean Abou Samra|talk]]) 19:34, 7 January 2026 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Apostrophe in page title ==&lt;br /&gt;
&lt;br /&gt;
The first word of the page title, &amp;quot;Mozart&#039;s,&amp;quot; should change to “Mozart’s” with a curly (typographical) apostrophe. [[User:Gabriel Ellsworth|Gabriel Ellsworth]] ([[User talk:Gabriel Ellsworth|talk]]) 10:42, 30 January 2026 (UTC)&lt;br /&gt;
&lt;br /&gt;
:Please try doing that! :-) On the right side of the page there is an entry &#039;Move&#039;.&lt;br /&gt;
:After moving a page you should always check &#039;Special pages → Broken redirects&#039; whether there are problems. -- [[User:Lemzwerg|Lemzwerg]] ([[User talk:Lemzwerg|talk]]) 10:56, 30 January 2026 (UTC)&lt;/div&gt;</summary>
		<author><name>Gabriel Ellsworth</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=Mozart%27s_Musikalisches_W%C3%BCrfelspiel&amp;diff=6276</id>
		<title>Mozart&#039;s Musikalisches Würfelspiel</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=Mozart%27s_Musikalisches_W%C3%BCrfelspiel&amp;diff=6276"/>
		<updated>2026-01-30T11:10:14Z</updated>

		<summary type="html">&lt;p&gt;Gabriel Ellsworth: Gabriel Ellsworth moved page Mozart&amp;#039;s Musikalisches Würfelspiel to Mozart’s Musikalisches Würfelspiel: Misspelled title: I changed the apostrophe in “Mozart’s” to curly (typographical) punctuation.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Mozart’s Musikalisches Würfelspiel]]&lt;/div&gt;</summary>
		<author><name>Gabriel Ellsworth</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=Mozart%E2%80%99s_Musikalisches_W%C3%BCrfelspiel&amp;diff=6275</id>
		<title>Mozart’s Musikalisches Würfelspiel</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=Mozart%E2%80%99s_Musikalisches_W%C3%BCrfelspiel&amp;diff=6275"/>
		<updated>2026-01-30T11:10:13Z</updated>

		<summary type="html">&lt;p&gt;Gabriel Ellsworth: Gabriel Ellsworth moved page Mozart&amp;#039;s Musikalisches Würfelspiel to Mozart’s Musikalisches Würfelspiel: Misspelled title: I changed the apostrophe in “Mozart’s” to curly (typographical) punctuation.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Mozart’s [https://en.wikipedia.org/wiki/Musikalisches_W%C3%BCrfelspiel Musikalisches Würfelspiel] (score [https://imslp.org/wiki/Musikalisches_W%C3%BCrfelspiel,_K.516f_(Mozart,_Wolfgang_Amadeus) available on IMSLP]) is a system to create a waltz by choosing each measure from a list of possibilities, with 759,499,667,166,482 possible waltzes in total. This is an implementation of the Würfelspiel using a bit of Scheme code to select the measures at random, producing a different waltz at each compilation. The code is an instructive example of creating music functions and manipulating music in Scheme.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lilypond version=&amp;quot;2.24&amp;quot;&amp;gt;&lt;br /&gt;
rhMeasureEight = \relative {&lt;br /&gt;
  \tag generation \alternative {&lt;br /&gt;
    \volta 1 { &amp;lt;g&#039; b d g&amp;gt;4 r8 }&lt;br /&gt;
    \volta 2 { &amp;lt;g b d g&amp;gt;4 r8 }&lt;br /&gt;
  }&lt;br /&gt;
  \tag table {&lt;br /&gt;
    &amp;lt;g b d g&amp;gt;4 r8&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
lhMeasureEight = \relative {&lt;br /&gt;
  \tag generation \alternative {&lt;br /&gt;
    \volta 1 { g,8 g&#039;16 f! e d }&lt;br /&gt;
    \volta 2 { g,8 b&#039;16 g fis e }&lt;br /&gt;
  }&lt;br /&gt;
  \tag table {&lt;br /&gt;
    &amp;lt;&amp;lt; { g,8^&amp;quot;Volta 2&amp;quot; b&#039;16 g fis e } \\ { g,8_&amp;quot;Volta 1&amp;quot; g&#039;16 f! e d } &amp;gt;&amp;gt;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
rhData = \relative {&lt;br /&gt;
  | f&#039;&#039;8 d g&lt;br /&gt;
  | a,8 fis16 g b g&#039;&lt;br /&gt;
  | g8 c, e&lt;br /&gt;
  | g8 d4\trill&lt;br /&gt;
  | \rhMeasureEight&lt;br /&gt;
  | g,8 c e&lt;br /&gt;
  | e16 c e g c g&lt;br /&gt;
  | c,4 r8&lt;br /&gt;
  | &amp;lt;c e&amp;gt;8 &amp;lt;b d&amp;gt; r8&lt;br /&gt;
  | b16 a b c d b&lt;br /&gt;
  | e16 c b a g fis&lt;br /&gt;
  | &amp;lt;e c&#039;&amp;gt;8 8 8&lt;br /&gt;
  | c&#039;8( g e)&lt;br /&gt;
  | c&#039;4 r8&lt;br /&gt;
  | e8 g16 e c8&lt;br /&gt;
  | a&#039;8( fis d)&lt;br /&gt;
  | c16 g c e g, c&lt;br /&gt;
  | g8( c e)&lt;br /&gt;
  | e16 c e8 g&lt;br /&gt;
  | g8 b16 d d,8&lt;br /&gt;
  | c16 e g d a fis&#039;&lt;br /&gt;
  | e8 c g&lt;br /&gt;
  | f&#039;16 e d e f g&lt;br /&gt;
  | \rhMeasureEight&lt;br /&gt;
  | d,16 fis a d fis a&lt;br /&gt;
  | &amp;lt;c, e&amp;gt;8 8 8&lt;br /&gt;
  | f16 e f d c b&lt;br /&gt;
  | fis&#039;16 d a a&#039; fis d&lt;br /&gt;
  | b16 d g d b8&lt;br /&gt;
  | \rhMeasureEight&lt;br /&gt;
  | e16[ c g8] e&#039;&lt;br /&gt;
  | g,8 c e&lt;br /&gt;
  | \rhMeasureEight&lt;br /&gt;
  | e16 c d b g8&lt;br /&gt;
  | a8 d fis&lt;br /&gt;
  | a,16 e&#039; d g fis a&lt;br /&gt;
  | g16 b g d b8&lt;br /&gt;
  | c8 g e&#039;&lt;br /&gt;
  | g8 g, g&lt;br /&gt;
  | c16 b c e g, c&lt;br /&gt;
  | c16 b c e g,8&lt;br /&gt;
  | b16 c d b a g&lt;br /&gt;
  | g&#039;8 f16 e d c&lt;br /&gt;
  | a8 f&#039;16 d a b&lt;br /&gt;
  | c16 b c g e c&lt;br /&gt;
  | g&#039;&#039;8 b16 g d b&lt;br /&gt;
  | g&#039;8 g16 d b&#039;8&lt;br /&gt;
  | e,8 c16 e g c&lt;br /&gt;
  | e,8( c g)&lt;br /&gt;
  | c8 e16 c g8&lt;br /&gt;
  | c16 g e&#039; c g&#039; e&lt;br /&gt;
  | d16( cis) d f g, b&lt;br /&gt;
  | &amp;lt;c e&amp;gt;8 16 &amp;lt;d f&amp;gt; &amp;lt;e g&amp;gt;8&lt;br /&gt;
  | &amp;lt;e, c&#039;&amp;gt;8 8 8&lt;br /&gt;
  | g&#039;8 b d,&lt;br /&gt;
  | d16 b g8 r8&lt;br /&gt;
  | e&#039;8 c g&lt;br /&gt;
  | g&#039;8 e c&lt;br /&gt;
  | g&#039;8 c, e&lt;br /&gt;
  | g8 f16 e d c&lt;br /&gt;
  | c8 e16 c g&#039;8&lt;br /&gt;
  | e16 c b g a fis&lt;br /&gt;
  | e&#039;16 c b c g8&lt;br /&gt;
  | e&#039;16 g c g e c&lt;br /&gt;
  | d16 a d8 fis&lt;br /&gt;
  | fis8 a fis&lt;br /&gt;
  | c16 b c e g, c&lt;br /&gt;
  | g&#039;8 b16 g d g&lt;br /&gt;
  | g8( e c)&lt;br /&gt;
  | fis8 a16 fis d fis&lt;br /&gt;
  | g16 b d b g8&lt;br /&gt;
  | f16 e d c b d&lt;br /&gt;
  | g8 e c&lt;br /&gt;
  | c&#039;16 b c g e c&lt;br /&gt;
  | &amp;lt;d fis&amp;gt;8 8 8&lt;br /&gt;
  | c&#039;16 b c g e c&lt;br /&gt;
  | g&#039;16 b g8 d&lt;br /&gt;
  | c8 c, r&lt;br /&gt;
  | c&#039;4 r8&lt;br /&gt;
  | d8 a\turn fis&#039;&lt;br /&gt;
  | \rhMeasureEight&lt;br /&gt;
  | d16[ b g8] g&#039;&lt;br /&gt;
  | c,4 r8&lt;br /&gt;
  | c16 g e&#039; c g&#039; e&lt;br /&gt;
  | c8 e g,&lt;br /&gt;
  | d&#039;8 d16 g b8&lt;br /&gt;
  | g8 c, e&lt;br /&gt;
  | g16 d g b g d&lt;br /&gt;
  | f16 e d8 g&lt;br /&gt;
  | fis16 a d a fis a&lt;br /&gt;
  | \rhMeasureEight&lt;br /&gt;
  | &amp;lt;b, d&amp;gt;8 g&#039;16 b d,8&lt;br /&gt;
  | c4 r8&lt;br /&gt;
  | \rhMeasureEight&lt;br /&gt;
  | g&#039;8 e c&lt;br /&gt;
  | e8 c g&lt;br /&gt;
  | g&#039;16 fis g d b g&lt;br /&gt;
  | c8 g e&#039;&lt;br /&gt;
  | fis8 a d,&lt;br /&gt;
  | \rhMeasureEight&lt;br /&gt;
  | e16 d e g c g&lt;br /&gt;
  | fis16 d a8 fis&#039;&lt;br /&gt;
  | c16 e c g e8&lt;br /&gt;
  | e&#039;16 d e g c g&lt;br /&gt;
  | fis8 a16 fis d fis&lt;br /&gt;
  | a,8 d16 c b a&lt;br /&gt;
  | \rhMeasureEight&lt;br /&gt;
  | e&#039;8( g c)&lt;br /&gt;
  | d,16 f d f b, d&lt;br /&gt;
  | &amp;lt;b d&amp;gt;16( &amp;lt;a c&amp;gt;) q( &amp;lt;g b&amp;gt;) q( &amp;lt;fis a&amp;gt;)&lt;br /&gt;
  | c&#039;4 r8&lt;br /&gt;
  | e8 c g&lt;br /&gt;
  | f&#039;8 d b&lt;br /&gt;
  | &amp;lt;b d&amp;gt;8 q q&lt;br /&gt;
  | c16 g e&#039; c g&#039; e&lt;br /&gt;
  | d16 f a f d b&lt;br /&gt;
  | d16 a d fis a fis&lt;br /&gt;
  | e16 a g b fis a&lt;br /&gt;
  | e16 c g&#039; e c&#039; g&lt;br /&gt;
  | d&#039;8 a16 fis d a&lt;br /&gt;
  | g&#039;8 b16 g d8&lt;br /&gt;
  | g16 fis g b d,8&lt;br /&gt;
  | \rhMeasureEight&lt;br /&gt;
  | &amp;lt;e, c&#039;&amp;gt;8 8 8&lt;br /&gt;
  | g&#039;16 e d b g8&lt;br /&gt;
  | c16 g c e g &amp;lt;c, e&amp;gt;&lt;br /&gt;
  | \rhMeasureEight&lt;br /&gt;
  | b8 d g&lt;br /&gt;
  | a16 g fis g d8&lt;br /&gt;
  | &amp;lt;e, c&#039;&amp;gt;8 8 8&lt;br /&gt;
  | c&#039;4 r8&lt;br /&gt;
  | &amp;lt;c e&amp;gt;8 &amp;lt;b d&amp;gt;16 &amp;lt;g b&amp;gt; g8&lt;br /&gt;
  | d&#039;8 g16 d b d&lt;br /&gt;
  | a16 e&#039; &amp;lt;b d&amp;gt; &amp;lt;a c&amp;gt; &amp;lt;g b&amp;gt; &amp;lt;fis a&amp;gt;&lt;br /&gt;
  | fis&#039;8 fis16 d a&#039;8&lt;br /&gt;
  | c16 b c g e c&lt;br /&gt;
  | c8 g e&#039;&lt;br /&gt;
  | &amp;lt;a, d fis&amp;gt;8 fis&#039;4\trill&lt;br /&gt;
  | g16 b g b d,8&lt;br /&gt;
  | a8 a16 d fis8&lt;br /&gt;
  | d16 e f d c b&lt;br /&gt;
  | c8 g e&#039;&lt;br /&gt;
  | g8 d16 b g8&lt;br /&gt;
  | g&#039;8 c, e&lt;br /&gt;
  | d16 f a, d b d&lt;br /&gt;
  | &amp;lt;fis, d&#039;&amp;gt;8 &amp;lt;d&#039; fis&amp;gt; &amp;lt;fis a&amp;gt;&lt;br /&gt;
  | e16 c&#039; b g a fis&lt;br /&gt;
  | c&#039;16 b c g e c&lt;br /&gt;
  | f16 d a8 b&lt;br /&gt;
  | &amp;lt;g c e&amp;gt;8 e&#039;4\trill&lt;br /&gt;
  | c4 r8&lt;br /&gt;
  | g&#039;8 f16 e d c&lt;br /&gt;
  | d16 a fis&#039; d a&#039; fis&lt;br /&gt;
  | d16 cis d fis a fis&lt;br /&gt;
  | g16 b g d b g&lt;br /&gt;
  | c16 g e&#039; c g&#039;8&lt;br /&gt;
  | e16 d e g c g&lt;br /&gt;
  | b,8 d16 b a g&lt;br /&gt;
  | e&#039;16 g d c b a&lt;br /&gt;
  | c16 b c e g, c&lt;br /&gt;
  | &amp;lt;fis, d&#039;&amp;gt;8 8 8&lt;br /&gt;
  | e&#039;16 d e g c g&lt;br /&gt;
  | g16 fis g d b g&lt;br /&gt;
  | d&#039;8 g,4&lt;br /&gt;
  | d&#039;8( b g)&lt;br /&gt;
  | d&#039;16 b&#039; g d b8&lt;br /&gt;
  | c8 c16 d e8&lt;br /&gt;
  | g8 f16 e d c&lt;br /&gt;
  | e16 g d g a, fis&#039;&lt;br /&gt;
  | c4 r8&lt;br /&gt;
  | b16 c d e f d&lt;br /&gt;
  | c4 r8&lt;br /&gt;
  | f16 a a,8 b16 d&lt;br /&gt;
  | g,8 c e&lt;br /&gt;
  | e16 c b d g8&lt;br /&gt;
  | a16 g b g d g&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
lhData = \relative {&lt;br /&gt;
  | f8 d g&lt;br /&gt;
  | &amp;lt;b, g&#039;&amp;gt;4 r8&lt;br /&gt;
  | &amp;lt;c e&amp;gt;4 r8&lt;br /&gt;
  | g16 b g&#039;8 b,&lt;br /&gt;
  | \lhMeasureEight&lt;br /&gt;
  | &amp;lt;c e&amp;gt;4 r8&lt;br /&gt;
  | &amp;lt;c g&#039;&amp;gt;4 r8&lt;br /&gt;
  | c8 g c,&lt;br /&gt;
  | g&#039;&#039;4 g,8&lt;br /&gt;
  | g&#039;4 r8&lt;br /&gt;
  | c,8 d d,&lt;br /&gt;
  | c&#039;8 8 8&lt;br /&gt;
  | &amp;lt;e g&amp;gt;4 8&lt;br /&gt;
  | c8 g c,&lt;br /&gt;
  | &amp;lt;c&#039; g&#039;&amp;gt;4 &amp;lt;c e&amp;gt;8&lt;br /&gt;
  | &amp;lt;d fis&amp;gt;4 &amp;lt;c fis&amp;gt;8&lt;br /&gt;
  | &amp;lt;e g&amp;gt;4 r8&lt;br /&gt;
  | &amp;lt;c e&amp;gt;4 &amp;lt;c g&#039;&amp;gt;8&lt;br /&gt;
  | &amp;lt;c g&#039;&amp;gt;4 &amp;lt;c e&amp;gt;8&lt;br /&gt;
  | b4 r8&lt;br /&gt;
  | c8 d d,&lt;br /&gt;
  | c&#039;4 r8&lt;br /&gt;
  | f16 e d e f g&lt;br /&gt;
  | \lhMeasureEight&lt;br /&gt;
  | d4 c8&lt;br /&gt;
  | c16 e g e c&#039; c,&lt;br /&gt;
  | &amp;lt;g&#039; b&amp;gt;4 r8&lt;br /&gt;
  | &amp;lt;c, a&#039;&amp;gt;4 r8&lt;br /&gt;
  | g&#039;4 g,8&lt;br /&gt;
  | \lhMeasureEight&lt;br /&gt;
  | &amp;lt;c g&#039;&amp;gt;4 8&lt;br /&gt;
  | &amp;lt;c e&amp;gt;4 r8&lt;br /&gt;
  | \lhMeasureEight&lt;br /&gt;
  | g&#039;4 r8&lt;br /&gt;
  | &amp;lt;d fis&amp;gt;4 &amp;lt;c a&#039;&amp;gt;8&lt;br /&gt;
  | c8 d d,&lt;br /&gt;
  | &amp;lt;b&#039; d&amp;gt;4 r8&lt;br /&gt;
  | &amp;lt;c e&amp;gt;16 g&#039; q g q g&lt;br /&gt;
  | b,16 d g d b g&lt;br /&gt;
  | &amp;lt;c e&amp;gt;4 r8&lt;br /&gt;
  | &amp;lt;c e&amp;gt;4 r8&lt;br /&gt;
  | g4 r8&lt;br /&gt;
  | &amp;lt;c e&amp;gt;4 r8&lt;br /&gt;
  | f4 g8&lt;br /&gt;
  | &amp;lt;e g&amp;gt;4 r8&lt;br /&gt;
  | &amp;lt;b d&amp;gt;4 r8&lt;br /&gt;
  | q4 r8&lt;br /&gt;
  | &amp;lt;c g&#039;&amp;gt;4 &amp;lt;c e&amp;gt;8&lt;br /&gt;
  | &amp;lt;c e&amp;gt;16 g&#039; q g q g&lt;br /&gt;
  | &amp;lt;e g&amp;gt;4 r8&lt;br /&gt;
  | &amp;lt;c e&amp;gt;4 r8&lt;br /&gt;
  | f4 g8&lt;br /&gt;
  | c,4 r8&lt;br /&gt;
  | c8 8 8&lt;br /&gt;
  | &amp;lt;b d&amp;gt;4 r8&lt;br /&gt;
  | &amp;lt;g g&#039;&amp;gt;4 g&#039;8&lt;br /&gt;
  | &amp;lt;c, e&amp;gt;16 g&#039; q g q g&lt;br /&gt;
  | q16 g q g q g&lt;br /&gt;
  | q16 g q g q g&lt;br /&gt;
  | &amp;lt;c, e&amp;gt;4 r8&lt;br /&gt;
  | &amp;lt;e g&amp;gt;4 r8&lt;br /&gt;
  | c8 d d,&lt;br /&gt;
  | c&#039;4 r8&lt;br /&gt;
  | &amp;lt;c g&#039;&amp;gt;4 8&lt;br /&gt;
  | &amp;lt;d fis&amp;gt;4 r8&lt;br /&gt;
  | &amp;lt;&amp;lt; { a&#039;8 fis d } \\ { d8 d c } &amp;gt;&amp;gt;&lt;br /&gt;
  | &amp;lt;c e&amp;gt;4 &amp;lt;e g&amp;gt;8&lt;br /&gt;
  | b4 r8&lt;br /&gt;
  | &amp;lt;c e&amp;gt;4 r8&lt;br /&gt;
  | d4 c8&lt;br /&gt;
  | &amp;lt;b d&amp;gt;4 8&lt;br /&gt;
  | f&#039;4 g8&lt;br /&gt;
  | &amp;lt;c, e&amp;gt;16 g&#039; q g q g&lt;br /&gt;
  | &amp;lt;c, e&amp;gt;4 r8&lt;br /&gt;
  | c8 8 8&lt;br /&gt;
  | &amp;lt;c e&amp;gt;4 &amp;lt;c g&#039;&amp;gt;8&lt;br /&gt;
  | &amp;lt;b d&amp;gt;4 &amp;lt;b g&#039;&amp;gt;8&lt;br /&gt;
  | c4 c,8&lt;br /&gt;
  | c&#039;8 g c,&lt;br /&gt;
  | c&#039;4 r8&lt;br /&gt;
  | \lhMeasureEight&lt;br /&gt;
  | &amp;lt;b g&#039;&amp;gt;4 &amp;lt;b d&amp;gt;8&lt;br /&gt;
  | c8 g c,&lt;br /&gt;
  | &amp;lt;c&#039; e&amp;gt;4 r8&lt;br /&gt;
  | &amp;lt;e g&amp;gt;4 r8&lt;br /&gt;
  | &amp;lt;b g&#039;&amp;gt;4 r8&lt;br /&gt;
  | &amp;lt;c e&amp;gt;4 &amp;lt;c g&#039;&amp;gt;8&lt;br /&gt;
  | &amp;lt;b d&amp;gt;4 8&lt;br /&gt;
  | f&#039;16 e d8 g&lt;br /&gt;
  | &amp;lt;c, a&#039;&amp;gt;4 8&lt;br /&gt;
  | \lhMeasureEight&lt;br /&gt;
  | &amp;lt;g g&#039;&amp;gt;4 g&#039;8&lt;br /&gt;
  | c,8 g c,&lt;br /&gt;
  | \lhMeasureEight&lt;br /&gt;
  | &amp;lt;c&#039; e&amp;gt;4 r8&lt;br /&gt;
  | c4 r8&lt;br /&gt;
  | &amp;lt;b d&amp;gt;4 &amp;lt;b g&#039;&amp;gt;8&lt;br /&gt;
  | &amp;lt;c e&amp;gt;16 g&#039; q g q g&lt;br /&gt;
  | &amp;lt;c, a&#039;&amp;gt;4 8&lt;br /&gt;
  | \lhMeasureEight&lt;br /&gt;
  | &amp;lt;c g&#039;&amp;gt;4 &amp;lt;c e&amp;gt;8&lt;br /&gt;
  | &amp;lt;c a&#039;&amp;gt;4 8&lt;br /&gt;
  | &amp;lt;e g&amp;gt;4 r8&lt;br /&gt;
  | c4 r8&lt;br /&gt;
  | c4 r8&lt;br /&gt;
  | c8 d d,&lt;br /&gt;
  | \lhMeasureEight&lt;br /&gt;
  | &amp;lt;c&#039; g&#039;&amp;gt;4 &amp;lt;c e&amp;gt;8&lt;br /&gt;
  | &amp;lt;f a&amp;gt;4 &amp;lt;g d&#039;&amp;gt;8&lt;br /&gt;
  | c,8 d d,&lt;br /&gt;
  | c&#039;8 g c,&lt;br /&gt;
  | &amp;lt;c&#039; e&amp;gt;16 g&#039; q g q g&lt;br /&gt;
  | &amp;lt;g b&amp;gt;4 r8&lt;br /&gt;
  | g8 8 8&lt;br /&gt;
  | &amp;lt;c, e&amp;gt;4 r8&lt;br /&gt;
  | f4 g8&lt;br /&gt;
  | &amp;lt;d fis&amp;gt;4 r8&lt;br /&gt;
  | c8 d d,&lt;br /&gt;
  | &amp;lt;c&#039; e&amp;gt;4 r8&lt;br /&gt;
  | &amp;lt;d fis&amp;gt;4 &amp;lt;c fis&amp;gt;8&lt;br /&gt;
  | &amp;lt;b g&#039;&amp;gt;4 r8&lt;br /&gt;
  | &amp;lt;b d&amp;gt;8 8 &amp;lt;b g&#039;&amp;gt;&lt;br /&gt;
  | \lhMeasureEight&lt;br /&gt;
  | c8 8 8&lt;br /&gt;
  | g&#039;8 g, r&lt;br /&gt;
  | e&#039;4 e16 c&lt;br /&gt;
  | \lhMeasureEight&lt;br /&gt;
  | g4 r8&lt;br /&gt;
  | &amp;lt;b d&amp;gt;8 8 &amp;lt;b g&#039;&amp;gt;&lt;br /&gt;
  | c8 8 8&lt;br /&gt;
  | c8 g c,&lt;br /&gt;
  | g&#039;&#039;8 g, r8&lt;br /&gt;
  | &amp;lt;b g&#039;&amp;gt;4 r8&lt;br /&gt;
  | c8 d d,&lt;br /&gt;
  | &amp;lt;&amp;lt; { d&#039;8 d d } \\ { c8 c c } &amp;gt;&amp;gt;&lt;br /&gt;
  | &amp;lt;&amp;lt; e4 \\ c4 &amp;gt;&amp;gt; r8&lt;br /&gt;
  | &amp;lt;c e&amp;gt;16 g&#039; q g q g&lt;br /&gt;
  | d,16 d&#039; cis d c d&lt;br /&gt;
  | b4 r8&lt;br /&gt;
  | &amp;lt;c fis&amp;gt;8 8 &amp;lt;c a&#039;&amp;gt;&lt;br /&gt;
  | &amp;lt;b g&#039;&amp;gt;4 g8&lt;br /&gt;
  | &amp;lt;c e&amp;gt;4 r8&lt;br /&gt;
  | &amp;lt;b d&amp;gt;4 8&lt;br /&gt;
  | &amp;lt;c e&amp;gt;16 g&#039; q g q g&lt;br /&gt;
  | f4 g8&lt;br /&gt;
  | c,8 8 8&lt;br /&gt;
  | c8 d d,&lt;br /&gt;
  | &amp;lt;c&#039; e&amp;gt;4 r8&lt;br /&gt;
  | f4 g8&lt;br /&gt;
  | c,16 b c d e fis&lt;br /&gt;
  | c8 g c,&lt;br /&gt;
  | &amp;lt;c&#039; e&amp;gt;4 r8&lt;br /&gt;
  | c4 r8&lt;br /&gt;
  | c4 r8&lt;br /&gt;
  | &amp;lt;b d&amp;gt;4 r8&lt;br /&gt;
  | &amp;lt;e g&amp;gt;4 r8&lt;br /&gt;
  | c4 r8&lt;br /&gt;
  | g4 r8&lt;br /&gt;
  | c8 d d,&lt;br /&gt;
  | &amp;lt;c&#039; e&amp;gt;4 8&lt;br /&gt;
  | c8 8 8&lt;br /&gt;
  | &amp;lt;c g&#039;&amp;gt;4 &amp;lt;c e&amp;gt;8&lt;br /&gt;
  | &amp;lt;b d&amp;gt;4 r8&lt;br /&gt;
  | g&#039;16 fis g d b g&lt;br /&gt;
  | b4 r8&lt;br /&gt;
  | &amp;lt;g&#039; b&amp;gt;4 r8&lt;br /&gt;
  | &amp;lt;c, e&amp;gt;4 r8&lt;br /&gt;
  | &amp;lt;c e&amp;gt;4 &amp;lt;e g&amp;gt;8&lt;br /&gt;
  | c8 d d,&lt;br /&gt;
  | c&#039;8 g c,&lt;br /&gt;
  | &amp;lt;g&#039; g&#039;&amp;gt;4 &amp;lt;b g&#039;&amp;gt;8&lt;br /&gt;
  | c8 g c,&lt;br /&gt;
  | f&#039;4 g8&lt;br /&gt;
  | &amp;lt;c, e&amp;gt;16 g&#039; q g q g&lt;br /&gt;
  | g8 g, r8&lt;br /&gt;
  | &amp;lt;b d&amp;gt;4 8&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
table = #&#039;(&lt;br /&gt;
#(96 32 69 40 148 104 152 119 98 3 54)&lt;br /&gt;
#(22 6 95 17 74 157 60 84 142 87 130)&lt;br /&gt;
#(141 128 158 113 163 27 171 114 42 165 10)&lt;br /&gt;
#(41 63 13 85 45 167 53 50 156 61 103)&lt;br /&gt;
#(105 146 153 161 80 154 99 140 75 135 28)&lt;br /&gt;
#(122 46 55 2 97 68 133 86 129 47 37)&lt;br /&gt;
#(11 134 110 159 36 118 21 169 62 147 106)&lt;br /&gt;
#(30 81 24 100 107 91 127 94 123 33 5)&lt;br /&gt;
#(70 117 66 90 25 138 16 120 65 102 35)&lt;br /&gt;
#(121 39 139 176 143 71 155 88 77 4 20)&lt;br /&gt;
#(26 126 15 7 64 150 57 48 19 31 108)&lt;br /&gt;
#(9 56 132 34 125 29 175 166 82 164 92)&lt;br /&gt;
#(112 174 73 67 76 101 43 51 137 144 12)&lt;br /&gt;
#(49 18 58 160 136 162 168 115 38 59 124)&lt;br /&gt;
#(109 116 145 52 1 23 89 72 149 173 44)&lt;br /&gt;
#(14 83 79 170 93 151 172 111 8 78 131)&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
#(define choices&lt;br /&gt;
   (map (lambda (possibilities)&lt;br /&gt;
          (1- (vector-ref possibilities (random 11))))&lt;br /&gt;
        table))&lt;br /&gt;
&lt;br /&gt;
#(define (split-measures music)&lt;br /&gt;
   (let ((elements (ly:music-property&lt;br /&gt;
                     (ly:music-property music &#039;element)&lt;br /&gt;
                     &#039;elements)))&lt;br /&gt;
     (let loop ((elts (reverse elements))&lt;br /&gt;
                (measure &#039;())&lt;br /&gt;
                (measures &#039;()))&lt;br /&gt;
       (cond&lt;br /&gt;
        ((null? elts)&lt;br /&gt;
         (list-&amp;gt;vector measures))&lt;br /&gt;
        ((or (music-is-of-type? (car elts) &#039;bar-check) ;; until 2.25.5&lt;br /&gt;
             (music-is-of-type? (car elts) &#039;bar-check-event)) ;; since 2.25.6&lt;br /&gt;
         (let ((measure-music (make-sequential-music measure)))&lt;br /&gt;
           (loop (cdr elts) &#039;() (cons measure-music measures))))&lt;br /&gt;
        (else&lt;br /&gt;
         (loop (cdr elts) (cons (car elts) measure) measures))))))&lt;br /&gt;
&lt;br /&gt;
applyChoices =&lt;br /&gt;
#(define-music-function (music) (ly:music?)&lt;br /&gt;
   (let* ((measures (split-measures music))&lt;br /&gt;
          (chosen-measures&lt;br /&gt;
           (map (lambda (i) (vector-ref measures i))&lt;br /&gt;
                choices))&lt;br /&gt;
          (first-part (make-sequential-music (take chosen-measures 8)))&lt;br /&gt;
          (second-part (make-sequential-music (drop chosen-measures 8))))&lt;br /&gt;
     #{&lt;br /&gt;
       \repeat volta 2 { #first-part }&lt;br /&gt;
       \repeat volta 2 { #second-part }&lt;br /&gt;
     #}))&lt;br /&gt;
&lt;br /&gt;
\header {&lt;br /&gt;
  title = &amp;quot;Valse&amp;quot;&lt;br /&gt;
  composer = &amp;quot;Mozart&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
randomWaltz =&lt;br /&gt;
\keepWithTag generation&lt;br /&gt;
\new PianoStaff &amp;lt;&amp;lt;&lt;br /&gt;
  \new Staff {&lt;br /&gt;
    \time 3/8&lt;br /&gt;
    \applyChoices \rhData&lt;br /&gt;
  }&lt;br /&gt;
  \new Staff {&lt;br /&gt;
    \clef bass&lt;br /&gt;
    \applyChoices \lhData&lt;br /&gt;
  }&lt;br /&gt;
&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
\score {&lt;br /&gt;
  \layout { }&lt;br /&gt;
  \randomWaltz&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
\score {&lt;br /&gt;
  \midi { }&lt;br /&gt;
  \unfoldRepeats \randomWaltz&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
% Uncomment to display the table of all possible measures (&amp;quot;Notentafel&amp;quot;)&lt;br /&gt;
%{&lt;br /&gt;
\score {&lt;br /&gt;
  \layout {&lt;br /&gt;
    \context {&lt;br /&gt;
      \Score&lt;br /&gt;
      barNumberVisibility = #all-bar-numbers-visible&lt;br /&gt;
      \override BarNumber.break-visibility = #end-of-line-invisible&lt;br /&gt;
      centerBarNumbers = ##t&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
  \keepWithTag table &amp;lt;&amp;lt;&lt;br /&gt;
    \new Staff {&lt;br /&gt;
      \time 3/8&lt;br /&gt;
      \rhData&lt;br /&gt;
    }&lt;br /&gt;
    \new Staff {&lt;br /&gt;
      \clef bass&lt;br /&gt;
      \lhData&lt;br /&gt;
    }&lt;br /&gt;
  &amp;gt;&amp;gt;&lt;br /&gt;
}&lt;br /&gt;
%}&lt;br /&gt;
&amp;lt;/lilypond&amp;gt;&lt;/div&gt;</summary>
		<author><name>Gabriel Ellsworth</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=Talk:Mozart%E2%80%99s_Musikalisches_W%C3%BCrfelspiel&amp;diff=6273</id>
		<title>Talk:Mozart’s Musikalisches Würfelspiel</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=Talk:Mozart%E2%80%99s_Musikalisches_W%C3%BCrfelspiel&amp;diff=6273"/>
		<updated>2026-01-30T10:42:44Z</updated>

		<summary type="html">&lt;p&gt;Gabriel Ellsworth: /* Apostrophe in page title */ new section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Volte in wrong order? ==&lt;br /&gt;
&lt;br /&gt;
It seems to me that the prima volta bar should be seconda volta and vice versa. -- [[User:Lemzwerg|Lemzwerg]] ([[User talk:Lemzwerg|talk]]) 15:08, 7 January 2026 (UTC)&lt;br /&gt;
&lt;br /&gt;
:Indeed! Fixed, thanks. [[User:Jean Abou Samra|Jean Abou Samra]] ([[User talk:Jean Abou Samra|talk]]) 15:26, 7 January 2026 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Does not work with 2.25 ==&lt;br /&gt;
&lt;br /&gt;
What changed? Compiling with 2.25 produces an error message [[User:Manuela|Manuela]] ([[User talk:Manuela|talk]]) 18:52, 7 January 2026 (UTC)&lt;br /&gt;
&lt;br /&gt;
:Fixed, thanks. [[User:Jean Abou Samra|Jean Abou Samra]] ([[User talk:Jean Abou Samra|talk]]) 19:34, 7 January 2026 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Apostrophe in page title ==&lt;br /&gt;
&lt;br /&gt;
The first word of the page title, &amp;quot;Mozart&#039;s,&amp;quot; should change to “Mozart’s” with a curly (typographical) apostrophe. [[User:Gabriel Ellsworth|Gabriel Ellsworth]] ([[User talk:Gabriel Ellsworth|talk]]) 10:42, 30 January 2026 (UTC)&lt;/div&gt;</summary>
		<author><name>Gabriel Ellsworth</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=Mozart%E2%80%99s_Musikalisches_W%C3%BCrfelspiel&amp;diff=6272</id>
		<title>Mozart’s Musikalisches Würfelspiel</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=Mozart%E2%80%99s_Musikalisches_W%C3%BCrfelspiel&amp;diff=6272"/>
		<updated>2026-01-30T10:39:20Z</updated>

		<summary type="html">&lt;p&gt;Gabriel Ellsworth: I changed the apostrophe in “Mozart’s” to curly (typographical) punctuation.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Mozart’s [https://en.wikipedia.org/wiki/Musikalisches_W%C3%BCrfelspiel Musikalisches Würfelspiel] (score [https://imslp.org/wiki/Musikalisches_W%C3%BCrfelspiel,_K.516f_(Mozart,_Wolfgang_Amadeus) available on IMSLP]) is a system to create a waltz by choosing each measure from a list of possibilities, with 759,499,667,166,482 possible waltzes in total. This is an implementation of the Würfelspiel using a bit of Scheme code to select the measures at random, producing a different waltz at each compilation. The code is an instructive example of creating music functions and manipulating music in Scheme.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lilypond version=&amp;quot;2.24&amp;quot;&amp;gt;&lt;br /&gt;
rhMeasureEight = \relative {&lt;br /&gt;
  \tag generation \alternative {&lt;br /&gt;
    \volta 1 { &amp;lt;g&#039; b d g&amp;gt;4 r8 }&lt;br /&gt;
    \volta 2 { &amp;lt;g b d g&amp;gt;4 r8 }&lt;br /&gt;
  }&lt;br /&gt;
  \tag table {&lt;br /&gt;
    &amp;lt;g b d g&amp;gt;4 r8&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
lhMeasureEight = \relative {&lt;br /&gt;
  \tag generation \alternative {&lt;br /&gt;
    \volta 1 { g,8 g&#039;16 f! e d }&lt;br /&gt;
    \volta 2 { g,8 b&#039;16 g fis e }&lt;br /&gt;
  }&lt;br /&gt;
  \tag table {&lt;br /&gt;
    &amp;lt;&amp;lt; { g,8^&amp;quot;Volta 2&amp;quot; b&#039;16 g fis e } \\ { g,8_&amp;quot;Volta 1&amp;quot; g&#039;16 f! e d } &amp;gt;&amp;gt;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
rhData = \relative {&lt;br /&gt;
  | f&#039;&#039;8 d g&lt;br /&gt;
  | a,8 fis16 g b g&#039;&lt;br /&gt;
  | g8 c, e&lt;br /&gt;
  | g8 d4\trill&lt;br /&gt;
  | \rhMeasureEight&lt;br /&gt;
  | g,8 c e&lt;br /&gt;
  | e16 c e g c g&lt;br /&gt;
  | c,4 r8&lt;br /&gt;
  | &amp;lt;c e&amp;gt;8 &amp;lt;b d&amp;gt; r8&lt;br /&gt;
  | b16 a b c d b&lt;br /&gt;
  | e16 c b a g fis&lt;br /&gt;
  | &amp;lt;e c&#039;&amp;gt;8 8 8&lt;br /&gt;
  | c&#039;8( g e)&lt;br /&gt;
  | c&#039;4 r8&lt;br /&gt;
  | e8 g16 e c8&lt;br /&gt;
  | a&#039;8( fis d)&lt;br /&gt;
  | c16 g c e g, c&lt;br /&gt;
  | g8( c e)&lt;br /&gt;
  | e16 c e8 g&lt;br /&gt;
  | g8 b16 d d,8&lt;br /&gt;
  | c16 e g d a fis&#039;&lt;br /&gt;
  | e8 c g&lt;br /&gt;
  | f&#039;16 e d e f g&lt;br /&gt;
  | \rhMeasureEight&lt;br /&gt;
  | d,16 fis a d fis a&lt;br /&gt;
  | &amp;lt;c, e&amp;gt;8 8 8&lt;br /&gt;
  | f16 e f d c b&lt;br /&gt;
  | fis&#039;16 d a a&#039; fis d&lt;br /&gt;
  | b16 d g d b8&lt;br /&gt;
  | \rhMeasureEight&lt;br /&gt;
  | e16[ c g8] e&#039;&lt;br /&gt;
  | g,8 c e&lt;br /&gt;
  | \rhMeasureEight&lt;br /&gt;
  | e16 c d b g8&lt;br /&gt;
  | a8 d fis&lt;br /&gt;
  | a,16 e&#039; d g fis a&lt;br /&gt;
  | g16 b g d b8&lt;br /&gt;
  | c8 g e&#039;&lt;br /&gt;
  | g8 g, g&lt;br /&gt;
  | c16 b c e g, c&lt;br /&gt;
  | c16 b c e g,8&lt;br /&gt;
  | b16 c d b a g&lt;br /&gt;
  | g&#039;8 f16 e d c&lt;br /&gt;
  | a8 f&#039;16 d a b&lt;br /&gt;
  | c16 b c g e c&lt;br /&gt;
  | g&#039;&#039;8 b16 g d b&lt;br /&gt;
  | g&#039;8 g16 d b&#039;8&lt;br /&gt;
  | e,8 c16 e g c&lt;br /&gt;
  | e,8( c g)&lt;br /&gt;
  | c8 e16 c g8&lt;br /&gt;
  | c16 g e&#039; c g&#039; e&lt;br /&gt;
  | d16( cis) d f g, b&lt;br /&gt;
  | &amp;lt;c e&amp;gt;8 16 &amp;lt;d f&amp;gt; &amp;lt;e g&amp;gt;8&lt;br /&gt;
  | &amp;lt;e, c&#039;&amp;gt;8 8 8&lt;br /&gt;
  | g&#039;8 b d,&lt;br /&gt;
  | d16 b g8 r8&lt;br /&gt;
  | e&#039;8 c g&lt;br /&gt;
  | g&#039;8 e c&lt;br /&gt;
  | g&#039;8 c, e&lt;br /&gt;
  | g8 f16 e d c&lt;br /&gt;
  | c8 e16 c g&#039;8&lt;br /&gt;
  | e16 c b g a fis&lt;br /&gt;
  | e&#039;16 c b c g8&lt;br /&gt;
  | e&#039;16 g c g e c&lt;br /&gt;
  | d16 a d8 fis&lt;br /&gt;
  | fis8 a fis&lt;br /&gt;
  | c16 b c e g, c&lt;br /&gt;
  | g&#039;8 b16 g d g&lt;br /&gt;
  | g8( e c)&lt;br /&gt;
  | fis8 a16 fis d fis&lt;br /&gt;
  | g16 b d b g8&lt;br /&gt;
  | f16 e d c b d&lt;br /&gt;
  | g8 e c&lt;br /&gt;
  | c&#039;16 b c g e c&lt;br /&gt;
  | &amp;lt;d fis&amp;gt;8 8 8&lt;br /&gt;
  | c&#039;16 b c g e c&lt;br /&gt;
  | g&#039;16 b g8 d&lt;br /&gt;
  | c8 c, r&lt;br /&gt;
  | c&#039;4 r8&lt;br /&gt;
  | d8 a\turn fis&#039;&lt;br /&gt;
  | \rhMeasureEight&lt;br /&gt;
  | d16[ b g8] g&#039;&lt;br /&gt;
  | c,4 r8&lt;br /&gt;
  | c16 g e&#039; c g&#039; e&lt;br /&gt;
  | c8 e g,&lt;br /&gt;
  | d&#039;8 d16 g b8&lt;br /&gt;
  | g8 c, e&lt;br /&gt;
  | g16 d g b g d&lt;br /&gt;
  | f16 e d8 g&lt;br /&gt;
  | fis16 a d a fis a&lt;br /&gt;
  | \rhMeasureEight&lt;br /&gt;
  | &amp;lt;b, d&amp;gt;8 g&#039;16 b d,8&lt;br /&gt;
  | c4 r8&lt;br /&gt;
  | \rhMeasureEight&lt;br /&gt;
  | g&#039;8 e c&lt;br /&gt;
  | e8 c g&lt;br /&gt;
  | g&#039;16 fis g d b g&lt;br /&gt;
  | c8 g e&#039;&lt;br /&gt;
  | fis8 a d,&lt;br /&gt;
  | \rhMeasureEight&lt;br /&gt;
  | e16 d e g c g&lt;br /&gt;
  | fis16 d a8 fis&#039;&lt;br /&gt;
  | c16 e c g e8&lt;br /&gt;
  | e&#039;16 d e g c g&lt;br /&gt;
  | fis8 a16 fis d fis&lt;br /&gt;
  | a,8 d16 c b a&lt;br /&gt;
  | \rhMeasureEight&lt;br /&gt;
  | e&#039;8( g c)&lt;br /&gt;
  | d,16 f d f b, d&lt;br /&gt;
  | &amp;lt;b d&amp;gt;16( &amp;lt;a c&amp;gt;) q( &amp;lt;g b&amp;gt;) q( &amp;lt;fis a&amp;gt;)&lt;br /&gt;
  | c&#039;4 r8&lt;br /&gt;
  | e8 c g&lt;br /&gt;
  | f&#039;8 d b&lt;br /&gt;
  | &amp;lt;b d&amp;gt;8 q q&lt;br /&gt;
  | c16 g e&#039; c g&#039; e&lt;br /&gt;
  | d16 f a f d b&lt;br /&gt;
  | d16 a d fis a fis&lt;br /&gt;
  | e16 a g b fis a&lt;br /&gt;
  | e16 c g&#039; e c&#039; g&lt;br /&gt;
  | d&#039;8 a16 fis d a&lt;br /&gt;
  | g&#039;8 b16 g d8&lt;br /&gt;
  | g16 fis g b d,8&lt;br /&gt;
  | \rhMeasureEight&lt;br /&gt;
  | &amp;lt;e, c&#039;&amp;gt;8 8 8&lt;br /&gt;
  | g&#039;16 e d b g8&lt;br /&gt;
  | c16 g c e g &amp;lt;c, e&amp;gt;&lt;br /&gt;
  | \rhMeasureEight&lt;br /&gt;
  | b8 d g&lt;br /&gt;
  | a16 g fis g d8&lt;br /&gt;
  | &amp;lt;e, c&#039;&amp;gt;8 8 8&lt;br /&gt;
  | c&#039;4 r8&lt;br /&gt;
  | &amp;lt;c e&amp;gt;8 &amp;lt;b d&amp;gt;16 &amp;lt;g b&amp;gt; g8&lt;br /&gt;
  | d&#039;8 g16 d b d&lt;br /&gt;
  | a16 e&#039; &amp;lt;b d&amp;gt; &amp;lt;a c&amp;gt; &amp;lt;g b&amp;gt; &amp;lt;fis a&amp;gt;&lt;br /&gt;
  | fis&#039;8 fis16 d a&#039;8&lt;br /&gt;
  | c16 b c g e c&lt;br /&gt;
  | c8 g e&#039;&lt;br /&gt;
  | &amp;lt;a, d fis&amp;gt;8 fis&#039;4\trill&lt;br /&gt;
  | g16 b g b d,8&lt;br /&gt;
  | a8 a16 d fis8&lt;br /&gt;
  | d16 e f d c b&lt;br /&gt;
  | c8 g e&#039;&lt;br /&gt;
  | g8 d16 b g8&lt;br /&gt;
  | g&#039;8 c, e&lt;br /&gt;
  | d16 f a, d b d&lt;br /&gt;
  | &amp;lt;fis, d&#039;&amp;gt;8 &amp;lt;d&#039; fis&amp;gt; &amp;lt;fis a&amp;gt;&lt;br /&gt;
  | e16 c&#039; b g a fis&lt;br /&gt;
  | c&#039;16 b c g e c&lt;br /&gt;
  | f16 d a8 b&lt;br /&gt;
  | &amp;lt;g c e&amp;gt;8 e&#039;4\trill&lt;br /&gt;
  | c4 r8&lt;br /&gt;
  | g&#039;8 f16 e d c&lt;br /&gt;
  | d16 a fis&#039; d a&#039; fis&lt;br /&gt;
  | d16 cis d fis a fis&lt;br /&gt;
  | g16 b g d b g&lt;br /&gt;
  | c16 g e&#039; c g&#039;8&lt;br /&gt;
  | e16 d e g c g&lt;br /&gt;
  | b,8 d16 b a g&lt;br /&gt;
  | e&#039;16 g d c b a&lt;br /&gt;
  | c16 b c e g, c&lt;br /&gt;
  | &amp;lt;fis, d&#039;&amp;gt;8 8 8&lt;br /&gt;
  | e&#039;16 d e g c g&lt;br /&gt;
  | g16 fis g d b g&lt;br /&gt;
  | d&#039;8 g,4&lt;br /&gt;
  | d&#039;8( b g)&lt;br /&gt;
  | d&#039;16 b&#039; g d b8&lt;br /&gt;
  | c8 c16 d e8&lt;br /&gt;
  | g8 f16 e d c&lt;br /&gt;
  | e16 g d g a, fis&#039;&lt;br /&gt;
  | c4 r8&lt;br /&gt;
  | b16 c d e f d&lt;br /&gt;
  | c4 r8&lt;br /&gt;
  | f16 a a,8 b16 d&lt;br /&gt;
  | g,8 c e&lt;br /&gt;
  | e16 c b d g8&lt;br /&gt;
  | a16 g b g d g&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
lhData = \relative {&lt;br /&gt;
  | f8 d g&lt;br /&gt;
  | &amp;lt;b, g&#039;&amp;gt;4 r8&lt;br /&gt;
  | &amp;lt;c e&amp;gt;4 r8&lt;br /&gt;
  | g16 b g&#039;8 b,&lt;br /&gt;
  | \lhMeasureEight&lt;br /&gt;
  | &amp;lt;c e&amp;gt;4 r8&lt;br /&gt;
  | &amp;lt;c g&#039;&amp;gt;4 r8&lt;br /&gt;
  | c8 g c,&lt;br /&gt;
  | g&#039;&#039;4 g,8&lt;br /&gt;
  | g&#039;4 r8&lt;br /&gt;
  | c,8 d d,&lt;br /&gt;
  | c&#039;8 8 8&lt;br /&gt;
  | &amp;lt;e g&amp;gt;4 8&lt;br /&gt;
  | c8 g c,&lt;br /&gt;
  | &amp;lt;c&#039; g&#039;&amp;gt;4 &amp;lt;c e&amp;gt;8&lt;br /&gt;
  | &amp;lt;d fis&amp;gt;4 &amp;lt;c fis&amp;gt;8&lt;br /&gt;
  | &amp;lt;e g&amp;gt;4 r8&lt;br /&gt;
  | &amp;lt;c e&amp;gt;4 &amp;lt;c g&#039;&amp;gt;8&lt;br /&gt;
  | &amp;lt;c g&#039;&amp;gt;4 &amp;lt;c e&amp;gt;8&lt;br /&gt;
  | b4 r8&lt;br /&gt;
  | c8 d d,&lt;br /&gt;
  | c&#039;4 r8&lt;br /&gt;
  | f16 e d e f g&lt;br /&gt;
  | \lhMeasureEight&lt;br /&gt;
  | d4 c8&lt;br /&gt;
  | c16 e g e c&#039; c,&lt;br /&gt;
  | &amp;lt;g&#039; b&amp;gt;4 r8&lt;br /&gt;
  | &amp;lt;c, a&#039;&amp;gt;4 r8&lt;br /&gt;
  | g&#039;4 g,8&lt;br /&gt;
  | \lhMeasureEight&lt;br /&gt;
  | &amp;lt;c g&#039;&amp;gt;4 8&lt;br /&gt;
  | &amp;lt;c e&amp;gt;4 r8&lt;br /&gt;
  | \lhMeasureEight&lt;br /&gt;
  | g&#039;4 r8&lt;br /&gt;
  | &amp;lt;d fis&amp;gt;4 &amp;lt;c a&#039;&amp;gt;8&lt;br /&gt;
  | c8 d d,&lt;br /&gt;
  | &amp;lt;b&#039; d&amp;gt;4 r8&lt;br /&gt;
  | &amp;lt;c e&amp;gt;16 g&#039; q g q g&lt;br /&gt;
  | b,16 d g d b g&lt;br /&gt;
  | &amp;lt;c e&amp;gt;4 r8&lt;br /&gt;
  | &amp;lt;c e&amp;gt;4 r8&lt;br /&gt;
  | g4 r8&lt;br /&gt;
  | &amp;lt;c e&amp;gt;4 r8&lt;br /&gt;
  | f4 g8&lt;br /&gt;
  | &amp;lt;e g&amp;gt;4 r8&lt;br /&gt;
  | &amp;lt;b d&amp;gt;4 r8&lt;br /&gt;
  | q4 r8&lt;br /&gt;
  | &amp;lt;c g&#039;&amp;gt;4 &amp;lt;c e&amp;gt;8&lt;br /&gt;
  | &amp;lt;c e&amp;gt;16 g&#039; q g q g&lt;br /&gt;
  | &amp;lt;e g&amp;gt;4 r8&lt;br /&gt;
  | &amp;lt;c e&amp;gt;4 r8&lt;br /&gt;
  | f4 g8&lt;br /&gt;
  | c,4 r8&lt;br /&gt;
  | c8 8 8&lt;br /&gt;
  | &amp;lt;b d&amp;gt;4 r8&lt;br /&gt;
  | &amp;lt;g g&#039;&amp;gt;4 g&#039;8&lt;br /&gt;
  | &amp;lt;c, e&amp;gt;16 g&#039; q g q g&lt;br /&gt;
  | q16 g q g q g&lt;br /&gt;
  | q16 g q g q g&lt;br /&gt;
  | &amp;lt;c, e&amp;gt;4 r8&lt;br /&gt;
  | &amp;lt;e g&amp;gt;4 r8&lt;br /&gt;
  | c8 d d,&lt;br /&gt;
  | c&#039;4 r8&lt;br /&gt;
  | &amp;lt;c g&#039;&amp;gt;4 8&lt;br /&gt;
  | &amp;lt;d fis&amp;gt;4 r8&lt;br /&gt;
  | &amp;lt;&amp;lt; { a&#039;8 fis d } \\ { d8 d c } &amp;gt;&amp;gt;&lt;br /&gt;
  | &amp;lt;c e&amp;gt;4 &amp;lt;e g&amp;gt;8&lt;br /&gt;
  | b4 r8&lt;br /&gt;
  | &amp;lt;c e&amp;gt;4 r8&lt;br /&gt;
  | d4 c8&lt;br /&gt;
  | &amp;lt;b d&amp;gt;4 8&lt;br /&gt;
  | f&#039;4 g8&lt;br /&gt;
  | &amp;lt;c, e&amp;gt;16 g&#039; q g q g&lt;br /&gt;
  | &amp;lt;c, e&amp;gt;4 r8&lt;br /&gt;
  | c8 8 8&lt;br /&gt;
  | &amp;lt;c e&amp;gt;4 &amp;lt;c g&#039;&amp;gt;8&lt;br /&gt;
  | &amp;lt;b d&amp;gt;4 &amp;lt;b g&#039;&amp;gt;8&lt;br /&gt;
  | c4 c,8&lt;br /&gt;
  | c&#039;8 g c,&lt;br /&gt;
  | c&#039;4 r8&lt;br /&gt;
  | \lhMeasureEight&lt;br /&gt;
  | &amp;lt;b g&#039;&amp;gt;4 &amp;lt;b d&amp;gt;8&lt;br /&gt;
  | c8 g c,&lt;br /&gt;
  | &amp;lt;c&#039; e&amp;gt;4 r8&lt;br /&gt;
  | &amp;lt;e g&amp;gt;4 r8&lt;br /&gt;
  | &amp;lt;b g&#039;&amp;gt;4 r8&lt;br /&gt;
  | &amp;lt;c e&amp;gt;4 &amp;lt;c g&#039;&amp;gt;8&lt;br /&gt;
  | &amp;lt;b d&amp;gt;4 8&lt;br /&gt;
  | f&#039;16 e d8 g&lt;br /&gt;
  | &amp;lt;c, a&#039;&amp;gt;4 8&lt;br /&gt;
  | \lhMeasureEight&lt;br /&gt;
  | &amp;lt;g g&#039;&amp;gt;4 g&#039;8&lt;br /&gt;
  | c,8 g c,&lt;br /&gt;
  | \lhMeasureEight&lt;br /&gt;
  | &amp;lt;c&#039; e&amp;gt;4 r8&lt;br /&gt;
  | c4 r8&lt;br /&gt;
  | &amp;lt;b d&amp;gt;4 &amp;lt;b g&#039;&amp;gt;8&lt;br /&gt;
  | &amp;lt;c e&amp;gt;16 g&#039; q g q g&lt;br /&gt;
  | &amp;lt;c, a&#039;&amp;gt;4 8&lt;br /&gt;
  | \lhMeasureEight&lt;br /&gt;
  | &amp;lt;c g&#039;&amp;gt;4 &amp;lt;c e&amp;gt;8&lt;br /&gt;
  | &amp;lt;c a&#039;&amp;gt;4 8&lt;br /&gt;
  | &amp;lt;e g&amp;gt;4 r8&lt;br /&gt;
  | c4 r8&lt;br /&gt;
  | c4 r8&lt;br /&gt;
  | c8 d d,&lt;br /&gt;
  | \lhMeasureEight&lt;br /&gt;
  | &amp;lt;c&#039; g&#039;&amp;gt;4 &amp;lt;c e&amp;gt;8&lt;br /&gt;
  | &amp;lt;f a&amp;gt;4 &amp;lt;g d&#039;&amp;gt;8&lt;br /&gt;
  | c,8 d d,&lt;br /&gt;
  | c&#039;8 g c,&lt;br /&gt;
  | &amp;lt;c&#039; e&amp;gt;16 g&#039; q g q g&lt;br /&gt;
  | &amp;lt;g b&amp;gt;4 r8&lt;br /&gt;
  | g8 8 8&lt;br /&gt;
  | &amp;lt;c, e&amp;gt;4 r8&lt;br /&gt;
  | f4 g8&lt;br /&gt;
  | &amp;lt;d fis&amp;gt;4 r8&lt;br /&gt;
  | c8 d d,&lt;br /&gt;
  | &amp;lt;c&#039; e&amp;gt;4 r8&lt;br /&gt;
  | &amp;lt;d fis&amp;gt;4 &amp;lt;c fis&amp;gt;8&lt;br /&gt;
  | &amp;lt;b g&#039;&amp;gt;4 r8&lt;br /&gt;
  | &amp;lt;b d&amp;gt;8 8 &amp;lt;b g&#039;&amp;gt;&lt;br /&gt;
  | \lhMeasureEight&lt;br /&gt;
  | c8 8 8&lt;br /&gt;
  | g&#039;8 g, r&lt;br /&gt;
  | e&#039;4 e16 c&lt;br /&gt;
  | \lhMeasureEight&lt;br /&gt;
  | g4 r8&lt;br /&gt;
  | &amp;lt;b d&amp;gt;8 8 &amp;lt;b g&#039;&amp;gt;&lt;br /&gt;
  | c8 8 8&lt;br /&gt;
  | c8 g c,&lt;br /&gt;
  | g&#039;&#039;8 g, r8&lt;br /&gt;
  | &amp;lt;b g&#039;&amp;gt;4 r8&lt;br /&gt;
  | c8 d d,&lt;br /&gt;
  | &amp;lt;&amp;lt; { d&#039;8 d d } \\ { c8 c c } &amp;gt;&amp;gt;&lt;br /&gt;
  | &amp;lt;&amp;lt; e4 \\ c4 &amp;gt;&amp;gt; r8&lt;br /&gt;
  | &amp;lt;c e&amp;gt;16 g&#039; q g q g&lt;br /&gt;
  | d,16 d&#039; cis d c d&lt;br /&gt;
  | b4 r8&lt;br /&gt;
  | &amp;lt;c fis&amp;gt;8 8 &amp;lt;c a&#039;&amp;gt;&lt;br /&gt;
  | &amp;lt;b g&#039;&amp;gt;4 g8&lt;br /&gt;
  | &amp;lt;c e&amp;gt;4 r8&lt;br /&gt;
  | &amp;lt;b d&amp;gt;4 8&lt;br /&gt;
  | &amp;lt;c e&amp;gt;16 g&#039; q g q g&lt;br /&gt;
  | f4 g8&lt;br /&gt;
  | c,8 8 8&lt;br /&gt;
  | c8 d d,&lt;br /&gt;
  | &amp;lt;c&#039; e&amp;gt;4 r8&lt;br /&gt;
  | f4 g8&lt;br /&gt;
  | c,16 b c d e fis&lt;br /&gt;
  | c8 g c,&lt;br /&gt;
  | &amp;lt;c&#039; e&amp;gt;4 r8&lt;br /&gt;
  | c4 r8&lt;br /&gt;
  | c4 r8&lt;br /&gt;
  | &amp;lt;b d&amp;gt;4 r8&lt;br /&gt;
  | &amp;lt;e g&amp;gt;4 r8&lt;br /&gt;
  | c4 r8&lt;br /&gt;
  | g4 r8&lt;br /&gt;
  | c8 d d,&lt;br /&gt;
  | &amp;lt;c&#039; e&amp;gt;4 8&lt;br /&gt;
  | c8 8 8&lt;br /&gt;
  | &amp;lt;c g&#039;&amp;gt;4 &amp;lt;c e&amp;gt;8&lt;br /&gt;
  | &amp;lt;b d&amp;gt;4 r8&lt;br /&gt;
  | g&#039;16 fis g d b g&lt;br /&gt;
  | b4 r8&lt;br /&gt;
  | &amp;lt;g&#039; b&amp;gt;4 r8&lt;br /&gt;
  | &amp;lt;c, e&amp;gt;4 r8&lt;br /&gt;
  | &amp;lt;c e&amp;gt;4 &amp;lt;e g&amp;gt;8&lt;br /&gt;
  | c8 d d,&lt;br /&gt;
  | c&#039;8 g c,&lt;br /&gt;
  | &amp;lt;g&#039; g&#039;&amp;gt;4 &amp;lt;b g&#039;&amp;gt;8&lt;br /&gt;
  | c8 g c,&lt;br /&gt;
  | f&#039;4 g8&lt;br /&gt;
  | &amp;lt;c, e&amp;gt;16 g&#039; q g q g&lt;br /&gt;
  | g8 g, r8&lt;br /&gt;
  | &amp;lt;b d&amp;gt;4 8&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
table = #&#039;(&lt;br /&gt;
#(96 32 69 40 148 104 152 119 98 3 54)&lt;br /&gt;
#(22 6 95 17 74 157 60 84 142 87 130)&lt;br /&gt;
#(141 128 158 113 163 27 171 114 42 165 10)&lt;br /&gt;
#(41 63 13 85 45 167 53 50 156 61 103)&lt;br /&gt;
#(105 146 153 161 80 154 99 140 75 135 28)&lt;br /&gt;
#(122 46 55 2 97 68 133 86 129 47 37)&lt;br /&gt;
#(11 134 110 159 36 118 21 169 62 147 106)&lt;br /&gt;
#(30 81 24 100 107 91 127 94 123 33 5)&lt;br /&gt;
#(70 117 66 90 25 138 16 120 65 102 35)&lt;br /&gt;
#(121 39 139 176 143 71 155 88 77 4 20)&lt;br /&gt;
#(26 126 15 7 64 150 57 48 19 31 108)&lt;br /&gt;
#(9 56 132 34 125 29 175 166 82 164 92)&lt;br /&gt;
#(112 174 73 67 76 101 43 51 137 144 12)&lt;br /&gt;
#(49 18 58 160 136 162 168 115 38 59 124)&lt;br /&gt;
#(109 116 145 52 1 23 89 72 149 173 44)&lt;br /&gt;
#(14 83 79 170 93 151 172 111 8 78 131)&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
#(define choices&lt;br /&gt;
   (map (lambda (possibilities)&lt;br /&gt;
          (1- (vector-ref possibilities (random 11))))&lt;br /&gt;
        table))&lt;br /&gt;
&lt;br /&gt;
#(define (split-measures music)&lt;br /&gt;
   (let ((elements (ly:music-property&lt;br /&gt;
                     (ly:music-property music &#039;element)&lt;br /&gt;
                     &#039;elements)))&lt;br /&gt;
     (let loop ((elts (reverse elements))&lt;br /&gt;
                (measure &#039;())&lt;br /&gt;
                (measures &#039;()))&lt;br /&gt;
       (cond&lt;br /&gt;
        ((null? elts)&lt;br /&gt;
         (list-&amp;gt;vector measures))&lt;br /&gt;
        ((or (music-is-of-type? (car elts) &#039;bar-check) ;; until 2.25.5&lt;br /&gt;
             (music-is-of-type? (car elts) &#039;bar-check-event)) ;; since 2.25.6&lt;br /&gt;
         (let ((measure-music (make-sequential-music measure)))&lt;br /&gt;
           (loop (cdr elts) &#039;() (cons measure-music measures))))&lt;br /&gt;
        (else&lt;br /&gt;
         (loop (cdr elts) (cons (car elts) measure) measures))))))&lt;br /&gt;
&lt;br /&gt;
applyChoices =&lt;br /&gt;
#(define-music-function (music) (ly:music?)&lt;br /&gt;
   (let* ((measures (split-measures music))&lt;br /&gt;
          (chosen-measures&lt;br /&gt;
           (map (lambda (i) (vector-ref measures i))&lt;br /&gt;
                choices))&lt;br /&gt;
          (first-part (make-sequential-music (take chosen-measures 8)))&lt;br /&gt;
          (second-part (make-sequential-music (drop chosen-measures 8))))&lt;br /&gt;
     #{&lt;br /&gt;
       \repeat volta 2 { #first-part }&lt;br /&gt;
       \repeat volta 2 { #second-part }&lt;br /&gt;
     #}))&lt;br /&gt;
&lt;br /&gt;
\header {&lt;br /&gt;
  title = &amp;quot;Valse&amp;quot;&lt;br /&gt;
  composer = &amp;quot;Mozart&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
randomWaltz =&lt;br /&gt;
\keepWithTag generation&lt;br /&gt;
\new PianoStaff &amp;lt;&amp;lt;&lt;br /&gt;
  \new Staff {&lt;br /&gt;
    \time 3/8&lt;br /&gt;
    \applyChoices \rhData&lt;br /&gt;
  }&lt;br /&gt;
  \new Staff {&lt;br /&gt;
    \clef bass&lt;br /&gt;
    \applyChoices \lhData&lt;br /&gt;
  }&lt;br /&gt;
&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
\score {&lt;br /&gt;
  \layout { }&lt;br /&gt;
  \randomWaltz&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
\score {&lt;br /&gt;
  \midi { }&lt;br /&gt;
  \unfoldRepeats \randomWaltz&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
% Uncomment to display the table of all possible measures (&amp;quot;Notentafel&amp;quot;)&lt;br /&gt;
%{&lt;br /&gt;
\score {&lt;br /&gt;
  \layout {&lt;br /&gt;
    \context {&lt;br /&gt;
      \Score&lt;br /&gt;
      barNumberVisibility = #all-bar-numbers-visible&lt;br /&gt;
      \override BarNumber.break-visibility = #end-of-line-invisible&lt;br /&gt;
      centerBarNumbers = ##t&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
  \keepWithTag table &amp;lt;&amp;lt;&lt;br /&gt;
    \new Staff {&lt;br /&gt;
      \time 3/8&lt;br /&gt;
      \rhData&lt;br /&gt;
    }&lt;br /&gt;
    \new Staff {&lt;br /&gt;
      \clef bass&lt;br /&gt;
      \lhData&lt;br /&gt;
    }&lt;br /&gt;
  &amp;gt;&amp;gt;&lt;br /&gt;
}&lt;br /&gt;
%}&lt;br /&gt;
&amp;lt;/lilypond&amp;gt;&lt;/div&gt;</summary>
		<author><name>Gabriel Ellsworth</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=Grouping_instrument_names_with_square_brackets&amp;diff=6270</id>
		<title>Grouping instrument names with square brackets</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=Grouping_instrument_names_with_square_brackets&amp;diff=6270"/>
		<updated>2026-01-29T22:36:08Z</updated>

		<summary type="html">&lt;p&gt;Gabriel Ellsworth: Created page with &amp;quot;If you want to label a group of instruments (staves, voices), you can draw lines to create your own shapes that mimic the appearance of the square brackets used by the &amp;lt;code&amp;gt;SystemStartSquare&amp;lt;/code&amp;gt; system start delimiter (see [https://lilypond.org/doc/v2.24/Documentation/notation/displaying-staves#grouping-staves “Grouping staves” in the Notation Reference]). Adjust the numerical values in the &amp;lt;code&amp;gt;\score&amp;lt;/code&amp;gt; block below as needed for your score.  &amp;lt;lilypond vers...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;If you want to label a group of instruments (staves, voices), you can draw lines to create your own shapes that mimic the appearance of the square brackets used by the &amp;lt;code&amp;gt;SystemStartSquare&amp;lt;/code&amp;gt; system start delimiter (see [https://lilypond.org/doc/v2.24/Documentation/notation/displaying-staves#grouping-staves “Grouping staves” in the Notation Reference]). Adjust the numerical values in the &amp;lt;code&amp;gt;\score&amp;lt;/code&amp;gt; block below as needed for your score.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lilypond version=&amp;quot;2.24&amp;quot;&amp;gt;&lt;br /&gt;
%%% Approach suggested by Kieren MacMillan in&lt;br /&gt;
%% https://lists.gnu.org/archive/html/lilypond-user/2026-01/msg00293.html&lt;br /&gt;
choirI = \new Staff \with {&lt;br /&gt;
  instrumentName = &amp;quot;Choir I&amp;quot;&lt;br /&gt;
} { \repeat unfold 48 c&#039;&#039; }&lt;br /&gt;
&lt;br /&gt;
sopII = \new Staff \with {&lt;br /&gt;
  instrumentName = &amp;quot;Soprano II&amp;quot;&lt;br /&gt;
} { \repeat unfold 48 g&#039; }&lt;br /&gt;
&lt;br /&gt;
altoII = \new Staff \with {&lt;br /&gt;
  instrumentName = &amp;quot;Alto II&amp;quot;&lt;br /&gt;
} { \repeat unfold 48 e&#039; }&lt;br /&gt;
&lt;br /&gt;
tenorII = \new Staff \with {&lt;br /&gt;
  instrumentName = &amp;quot;Tenor II&amp;quot;&lt;br /&gt;
} { \clef &amp;quot;treble_8&amp;quot; \repeat unfold 48 c&#039; }&lt;br /&gt;
&lt;br /&gt;
bassII = \new Staff \with {&lt;br /&gt;
  instrumentName = &amp;quot;Bass II&amp;quot;&lt;br /&gt;
} { \clef bass \repeat unfold 48 c }&lt;br /&gt;
&lt;br /&gt;
\layout {&lt;br /&gt;
  indent = 30&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
\score {&lt;br /&gt;
  &amp;lt;&amp;lt;&lt;br /&gt;
    \new StaffGroup \with {&lt;br /&gt;
      \override InstrumentName.padding = #-2&lt;br /&gt;
      instrumentName = \markup {&lt;br /&gt;
        \hspace #-12.6&lt;br /&gt;
        \rotate #90 \override #&#039;(baseline-skip . 1) \center-column {&lt;br /&gt;
          \bold Decani&lt;br /&gt;
          \concat { \draw-line #&#039;(0 . -1) \draw-line #&#039;(4 . 0) \draw-line #&#039;(0 . -1) }&lt;br /&gt;
        }&lt;br /&gt;
      }&lt;br /&gt;
    } \choirI&lt;br /&gt;
    \new StaffGroup \with {&lt;br /&gt;
      \override InstrumentName.padding = #-2&lt;br /&gt;
      instrumentName = \markup \translate #&#039;(-9.5 . 0) {&lt;br /&gt;
        \hspace #-14&lt;br /&gt;
        \rotate #90 \override #&#039;(baseline-skip . 1) \center-column {&lt;br /&gt;
          \bold Cantoris&lt;br /&gt;
          \concat { \draw-line #&#039;(0 . -1) \draw-line #&#039;(29.5 . 0) \draw-line #&#039;(0 . -1) }&lt;br /&gt;
        }&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
    &amp;lt;&amp;lt;&lt;br /&gt;
      \sopII&lt;br /&gt;
      \altoII&lt;br /&gt;
      \tenorII&lt;br /&gt;
      \bassII&lt;br /&gt;
    &amp;gt;&amp;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:Staff notation]]&lt;br /&gt;
[[Category:Text]]&lt;br /&gt;
[[Category:Vocal music]]&lt;br /&gt;
[[Category:Snippet]]&lt;/div&gt;</summary>
		<author><name>Gabriel Ellsworth</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=Help:Contributing&amp;diff=6269</id>
		<title>Help:Contributing</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=Help:Contributing&amp;diff=6269"/>
		<updated>2026-01-29T22:18:58Z</updated>

		<summary type="html">&lt;p&gt;Gabriel Ellsworth: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;You can edit without an account, but this is encouraged if you do more than a handful of edits so that other editors can recognize you and discuss with you in case of need.&lt;br /&gt;
&lt;br /&gt;
To create a new page, type the title in the search box, then click on the red link. A simple page can be structured as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
Some explanatory text.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lilypond version=&amp;quot;2.24&amp;quot;&amp;gt;&lt;br /&gt;
{ c&#039;^&amp;quot;a note!&amp;quot; }&lt;br /&gt;
&amp;lt;/lilypond&amp;gt;&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This renders like this:&lt;br /&gt;
&lt;br /&gt;
:: Some explanatory text.&lt;br /&gt;
::&lt;br /&gt;
:: &amp;lt;lilypond version=&amp;quot;2.24&amp;quot;&amp;gt;&lt;br /&gt;
{ c&#039;^&amp;quot;a note!&amp;quot; }&lt;br /&gt;
&amp;lt;/lilypond&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
First, describe what the snippet does and how to use it. Use [https://www.mediawiki.org/wiki/Help:Formatting wikitext markup] like &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&#039;&#039;italic&#039;&#039;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; for &#039;&#039;italic&#039;&#039;, &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&#039;&#039;&#039;bold&#039;&#039;&#039;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; for &#039;&#039;&#039;bold&#039;&#039;&#039; and &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;code&amp;gt;\command&amp;lt;/code&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; for &amp;lt;code&amp;gt;\command&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The LilyPond snippet goes between &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;lilypond version=&amp;quot;...&amp;quot;&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;/lilypond&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;version&amp;lt;/code&amp;gt; parameter is the LilyPond version used to compile the snippet. A &amp;lt;code&amp;gt;\version&amp;lt;/code&amp;gt; statement with this version will also be added automatically, so don&#039;t repeat it in the snippet code. In almost all cases, you should put the major and minor number of the latest stable release series of LilyPond, e.g., 2.24. This will automatically select the latest micro release in that series, e.g., 2.24.4. However, in case your example specifically requires a newer development version, you can put that specific version here, e.g., 2.25.27 (it will be automatically downloaded on the wiki if needed).&lt;br /&gt;
&lt;br /&gt;
If you need to demonstrate page layout features, use the &amp;lt;code&amp;gt;full&amp;lt;/code&amp;gt; keyword to prevent cropping, like this: &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;lilypond version=&amp;quot;...&amp;quot; full&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
To add category tags to a page, add &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;[[Category:Category name]]&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; to it. See [[Special:Categories]] for the list of categories.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Please be careful while editing snippets that are tagged with the category “Included in the official documentation”!&#039;&#039;&#039;  There are special requirements so that they can be used seamlessly in LilyPond&#039;s documentation.  See [[:Category:Included in the official documentation]] for more information.&lt;/div&gt;</summary>
		<author><name>Gabriel Ellsworth</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=Help:Contributing&amp;diff=6268</id>
		<title>Help:Contributing</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=Help:Contributing&amp;diff=6268"/>
		<updated>2026-01-29T22:18:00Z</updated>

		<summary type="html">&lt;p&gt;Gabriel Ellsworth: I added instructions for adding category tags to a page.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;You can edit without an account, but this is encouraged if you do more than a handful of edits so that other editors can recognize you and discuss with you in case of need.&lt;br /&gt;
&lt;br /&gt;
To create a new page, type the title in the search box, then click on the red link. A simple page can be structured as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
Some explanatory text.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lilypond version=&amp;quot;2.24&amp;quot;&amp;gt;&lt;br /&gt;
{ c&#039;^&amp;quot;a note!&amp;quot; }&lt;br /&gt;
&amp;lt;/lilypond&amp;gt;&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This renders like this:&lt;br /&gt;
&lt;br /&gt;
:: Some explanatory text.&lt;br /&gt;
::&lt;br /&gt;
:: &amp;lt;lilypond version=&amp;quot;2.24&amp;quot;&amp;gt;&lt;br /&gt;
{ c&#039;^&amp;quot;a note!&amp;quot; }&lt;br /&gt;
&amp;lt;/lilypond&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
First, describe what the snippet does and how to use it. Use [https://www.mediawiki.org/wiki/Help:Formatting wikitext markup] like &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&#039;&#039;italic&#039;&#039;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; for &#039;&#039;italic&#039;&#039;, &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&#039;&#039;&#039;bold&#039;&#039;&#039;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; for &#039;&#039;&#039;bold&#039;&#039;&#039; and &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;code&amp;gt;\command&amp;lt;/code&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; for &amp;lt;code&amp;gt;\command&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The LilyPond snippet goes between &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;lilypond version=&amp;quot;...&amp;quot;&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;/lilypond&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;version&amp;lt;/code&amp;gt; parameter is the LilyPond version used to compile the snippet. A &amp;lt;code&amp;gt;\version&amp;lt;/code&amp;gt; statement with this version will also be added automatically, so don&#039;t repeat it in the snippet code. In almost all cases, you should put the major and minor number of the latest stable release series of LilyPond, e.g., 2.24. This will automatically select the latest micro release in that series, e.g., 2.24.4. However, in case your example specifically requires a newer development version, you can put that specific version here, e.g., 2.25.27 (it will be automatically downloaded on the wiki if needed).&lt;br /&gt;
&lt;br /&gt;
If you need to demonstrate page layout features, use the &amp;lt;code&amp;gt;full&amp;lt;/code&amp;gt; keyword to prevent cropping, like this: &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;lilypond version=&amp;quot;...&amp;quot; full&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
To add category tags to a page, add &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;[[Category:category name]]&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; to it. See [[Special:Categories]] for the list of categories.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Please be careful while editing snippets that are tagged with the category “Included in the official documentation”!&#039;&#039;&#039;  There are special requirements so that they can be used seamlessly in LilyPond&#039;s documentation.  See [[:Category:Included in the official documentation]] for more information.&lt;/div&gt;</summary>
		<author><name>Gabriel Ellsworth</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=Making_lyrics_take_bar_lines_into_account&amp;diff=6253</id>
		<title>Making lyrics take bar lines into account</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=Making_lyrics_take_bar_lines_into_account&amp;diff=6253"/>
		<updated>2026-01-28T22:47:00Z</updated>

		<summary type="html">&lt;p&gt;Gabriel Ellsworth: Created page with &amp;quot;By default, Lyrics contexts do not contain &amp;lt;code&amp;gt;Bar_engraver&amp;lt;/code&amp;gt;, so your lyrics will not take into account divisions between measures. Longer lyric items will appear to “spill across” bar lines.  This snippet shows how you can add &amp;lt;code&amp;gt;Bar_engraver&amp;lt;/code&amp;gt; to lyrics and hide bar lines, so that each individual lyric will be contained within the horizontal space between two consecutive bar lines.  This approach can have undesirable effects on the horizontal spacin...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;By default, Lyrics contexts do not contain &amp;lt;code&amp;gt;Bar_engraver&amp;lt;/code&amp;gt;, so your lyrics will not take into account divisions between measures. Longer lyric items will appear to “spill across” bar lines.&lt;br /&gt;
&lt;br /&gt;
This snippet shows how you can add &amp;lt;code&amp;gt;Bar_engraver&amp;lt;/code&amp;gt; to lyrics and hide bar lines, so that each individual lyric will be contained within the horizontal space between two consecutive bar lines.&lt;br /&gt;
&lt;br /&gt;
This approach can have undesirable effects on the horizontal spacing between bar lines and note heads. You may want to combine it with some &amp;lt;code&amp;gt;\tweak self-alignment-X&amp;lt;/code&amp;gt; commands placed before your longer lyric items.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lilypond version=&amp;quot;2.24&amp;quot;&amp;gt;&lt;br /&gt;
%%% Approach suggested by Kieren MacMillan in&lt;br /&gt;
%% https://lists.gnu.org/archive/html/lilypond-user/2025-07/msg00016.html&lt;br /&gt;
&lt;br /&gt;
\header {&lt;br /&gt;
  title = \markup { Hymn: \italic { Of the Father’s love begotten } }&lt;br /&gt;
  subtitle = &amp;quot;Stanza 3&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
music = \relative c&#039; {&lt;br /&gt;
  \key ees \major \time 3/4&lt;br /&gt;
  es2 f4 | g2 as4 | g2 f4 | g2( f4) | es2. | &lt;br /&gt;
  g2 as4 | bes2 c4 | bes4( g4) as4 | bes2. | &lt;br /&gt;
  c2 d4 | es2 bes4 | bes2 as4 | g2( f4) | es2. | &lt;br /&gt;
  c2 d4 | es2 f4 | es4( c4) d4 | es2. | &lt;br /&gt;
  es2 f4 | g2 as4 | g2 f4 | bes2( c4 | bes4 g4 as4) | bes2. | &lt;br /&gt;
  es,2 d4 | c2 d4 | es2 c4 | bes2. | &lt;br /&gt;
  es2 f4 | g2 bes4 | g2 es4 | f2.( | es2.) \fine&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
stanza = \lyricmode {&lt;br /&gt;
  \set stanza = &amp;quot;3. &amp;quot;&lt;br /&gt;
  Let the heights of heaven a -- dore him; &lt;br /&gt;
  an -- gel hosts, his prai -- ses sing; &lt;br /&gt;
  powers, do -- min -- ions, bow be -- fore him, &lt;br /&gt;
  and ex -- tol our God and King; &lt;br /&gt;
  let no tongue on earth be si -- lent, &lt;br /&gt;
  ev -- ery voice in con -- cert ring, &lt;br /&gt;
  e -- ver -- more and e -- ver -- more! __&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
%%  Top-level layout (applying to all scores)&lt;br /&gt;
\layout {&lt;br /&gt;
  indent = 0&lt;br /&gt;
  \context {&lt;br /&gt;
    \Voice&lt;br /&gt;
    \consists &amp;quot;Melody_engraver&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
  \context {&lt;br /&gt;
    \Staff&lt;br /&gt;
    \omit TimeSignature&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
\markup \bold { \circle 1 LilyPond’s default behaviour: }&lt;br /&gt;
\score {&lt;br /&gt;
  &amp;lt;&amp;lt;&lt;br /&gt;
  \new Voice = &amp;quot;congregation&amp;quot; \music&lt;br /&gt;
  \new Lyrics \lyricsto &amp;quot;congregation&amp;quot; \stanza&lt;br /&gt;
  &amp;gt;&amp;gt;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
\markup \bold { \circle 2 with Bar_engraver added to the Lyrics context: }&lt;br /&gt;
\score {&lt;br /&gt;
  &amp;lt;&amp;lt;&lt;br /&gt;
  \new Voice = &amp;quot;congregation&amp;quot; \music&lt;br /&gt;
  \new Lyrics \lyricsto &amp;quot;congregation&amp;quot; \stanza&lt;br /&gt;
  &amp;gt;&amp;gt;&lt;br /&gt;
  \layout {&lt;br /&gt;
    \context {&lt;br /&gt;
      \Lyrics&lt;br /&gt;
      \consists &amp;quot;Bar_engraver&amp;quot;&lt;br /&gt;
      \hide BarLine&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
beginningMusic = \relative c&#039; {&lt;br /&gt;
  \key ees \major \time 3/4&lt;br /&gt;
  es2 f4 | g2 as4 | g2 f4 | g2( f4) | es2. | &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
beginningStanza = \lyricmode {&lt;br /&gt;
  \set stanza = &amp;quot;3. &amp;quot;&lt;br /&gt;
  Let the &lt;br /&gt;
  \tweak self-alignment-X #-0.4 heights of &lt;br /&gt;
  \tweak self-alignment-X #-0.5 heaven &lt;br /&gt;
  a -- dore him; &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
\markup \bold { \circle 3 with Bar_engraver \underline and horizontal alignment tweaks: }&lt;br /&gt;
\score {&lt;br /&gt;
  &amp;lt;&amp;lt;&lt;br /&gt;
  \new Voice = &amp;quot;congregation&amp;quot; \beginningMusic&lt;br /&gt;
  \new Lyrics \lyricsto &amp;quot;congregation&amp;quot; \beginningStanza&lt;br /&gt;
  &amp;gt;&amp;gt;&lt;br /&gt;
  \layout {&lt;br /&gt;
    \context {&lt;br /&gt;
      \Lyrics&lt;br /&gt;
      \consists &amp;quot;Bar_engraver&amp;quot;&lt;br /&gt;
      \hide BarLine&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lilypond&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Vocal music]]&lt;br /&gt;
[[Category:Text]]&lt;br /&gt;
[[Category:Spacing]]&lt;br /&gt;
[[Category:Contexts and engravers]]&lt;br /&gt;
[[Category:Real music]]&lt;br /&gt;
[[Category:Snippet]]&lt;/div&gt;</summary>
		<author><name>Gabriel Ellsworth</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=Unmetered_music:_An_alternative_to_%5CcadenzaOn&amp;diff=6252</id>
		<title>Unmetered music: An alternative to \cadenzaOn</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=Unmetered_music:_An_alternative_to_%5CcadenzaOn&amp;diff=6252"/>
		<updated>2026-01-28T15:57:02Z</updated>

		<summary type="html">&lt;p&gt;Gabriel Ellsworth: I added categories.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;If your music is unmetered, you might use &amp;lt;code&amp;gt;\cadenzaOn&amp;lt;/code&amp;gt;. But &amp;lt;code&amp;gt;\cadenzaOn&amp;lt;/code&amp;gt; will disable automatic measure demarcation, and when it is applied, the &amp;lt;code&amp;gt;\bar&amp;lt;/code&amp;gt; command will &#039;&#039;not&#039;&#039; start a new measure.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;If you want the features that come with measure demarcation&amp;lt;/u&amp;gt; (e.g., resetting &#039;&#039;&#039;accidentals&#039;&#039;&#039;, automatic &#039;&#039;&#039;bar numbering&#039;&#039;&#039;, automatic &#039;&#039;&#039;beaming&#039;&#039;&#039;), the following approach may be useful. It combines &amp;lt;code&amp;gt;\omit TimeSignature&amp;lt;/code&amp;gt; with [https://lilypond.org/doc/v2.24/Documentation/internals/devnull a &amp;lt;code&amp;gt;Devnull&amp;lt;/code&amp;gt; context] containing a timing (measure demarcation) variable.&lt;br /&gt;
&lt;br /&gt;
If you use Frescobaldi, you may find its built-in duration counter helpful for computing values to enter into your measure-demarcation variable. Look below your code window for “Length: #/#” to the right of the Line and Col counters. Highlight a measure of music input in your code to see Frescobaldi’s automatic counting of its length.&lt;br /&gt;
&lt;br /&gt;
See also [https://lilypond.org/doc/v2.24/Documentation/notation/displaying-rhythms#unmetered-music “Unmetered music” in the Notation Reference] and the snippet [[Free meter – increasing the bar number wherever you want]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lilypond version=&amp;quot;2.24&amp;quot;&amp;gt;&lt;br /&gt;
\header {&lt;br /&gt;
  title = &amp;quot;Example from an Anglican chant&amp;quot;&lt;br /&gt;
  subtitle = &amp;quot;Double chant in D major (second half)&amp;quot;&lt;br /&gt;
  subsubtitle = &amp;quot;Composed by John Soaper (1743–1794)&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
\layout {&lt;br /&gt;
  \context {&lt;br /&gt;
    \Staff&lt;br /&gt;
    \omit TimeSignature&lt;br /&gt;
  }&lt;br /&gt;
  \context {&lt;br /&gt;
    \ChoirStaff&lt;br /&gt;
    \accidentalStyle choral-cautionary&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
%% Define a variable that will go in a Devnull context: &lt;br /&gt;
measures = {&lt;br /&gt;
  \time 8/4 s1*2 \bar &amp;quot;||&amp;quot;&lt;br /&gt;
  \time 13/4 s4*13 \bar &amp;quot;|.&amp;quot;&lt;br /&gt;
  % Continue adding time signatures, spacer rests, &lt;br /&gt;
  % and (if desired) custom bar lines &lt;br /&gt;
  % for each subsequent “measure” of your music: &lt;br /&gt;
  % \time XX/4 s4*XX&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
global = {&lt;br /&gt;
  \key d \major&lt;br /&gt;
  % Notice that if you enable \cadenzaOn, &lt;br /&gt;
  % you will lose the features of &lt;br /&gt;
  % automatic measure demarcation: &lt;br /&gt;
  % \cadenzaOn&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
soprano = \relative c&#039;&#039; {&lt;br /&gt;
  \global&lt;br /&gt;
  a2 a4 gis4 fis1 | &lt;br /&gt;
  % Barchecks with | are helpful &lt;br /&gt;
  % to confirm that your \measures variable &lt;br /&gt;
  % has correct durations in it &lt;br /&gt;
  a1 d2 g,4 fis4 e4 d1 | &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
alto = \relative c&#039; {&lt;br /&gt;
  \global&lt;br /&gt;
  fis2 fis4 eis4 fis1 | &lt;br /&gt;
  fis1 fis2 e4 d4 cis4 d1 | &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
tenor = \relative c&#039; {&lt;br /&gt;
  \global&lt;br /&gt;
  cis2 cis4 b4 a1 | &lt;br /&gt;
  d1 d2 b4 a4 a8 g8 fis1 | &lt;br /&gt;
  \tweak direction #DOWN \tweak font-size #-1&lt;br /&gt;
  \textEndMark &amp;quot;Real Anglican chant; music altered slightly for illustrative purposes&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
bass = \relative c {&lt;br /&gt;
  \global&lt;br /&gt;
  fis2 cis4 cis4 fis1 | &lt;br /&gt;
  d1 b2 g4 a4 a4 d1 | &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
\score {&lt;br /&gt;
  \new ChoirStaff &amp;lt;&amp;lt;&lt;br /&gt;
    %% Add your variable to a Devnull context: &lt;br /&gt;
    \new Devnull \measures&lt;br /&gt;
    \new Staff &amp;lt;&amp;lt;&lt;br /&gt;
      \new Voice = &amp;quot;soprano&amp;quot; { \voiceOne \soprano }&lt;br /&gt;
      \new Voice = &amp;quot;alto&amp;quot; { \voiceTwo \alto }&lt;br /&gt;
    &amp;gt;&amp;gt;&lt;br /&gt;
    \new Staff &amp;lt;&amp;lt;&lt;br /&gt;
      \clef bass&lt;br /&gt;
      \new Voice = &amp;quot;tenor&amp;quot; { \voiceOne \tenor }&lt;br /&gt;
      \new Voice = &amp;quot;bass&amp;quot; { \voiceTwo \bass }&lt;br /&gt;
    &amp;gt;&amp;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:Rhythms]]&lt;br /&gt;
[[Category:Workaround]]&lt;br /&gt;
[[Category:Snippet]]&lt;br /&gt;
[[Category:Real music]]&lt;/div&gt;</summary>
		<author><name>Gabriel Ellsworth</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=Unmetered_music:_An_alternative_to_%5CcadenzaOn&amp;diff=6251</id>
		<title>Unmetered music: An alternative to \cadenzaOn</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=Unmetered_music:_An_alternative_to_%5CcadenzaOn&amp;diff=6251"/>
		<updated>2026-01-28T15:48:39Z</updated>

		<summary type="html">&lt;p&gt;Gabriel Ellsworth: Created page with &amp;quot;If your music is unmetered, you might use &amp;lt;code&amp;gt;\cadenzaOn&amp;lt;/code&amp;gt;. But &amp;lt;code&amp;gt;\cadenzaOn&amp;lt;/code&amp;gt; will disable automatic measure demarcation, and when it is applied, the &amp;lt;code&amp;gt;\bar&amp;lt;/code&amp;gt; command will &amp;#039;&amp;#039;not&amp;#039;&amp;#039; start a new measure.  &amp;lt;u&amp;gt;If you want the features that come with measure demarcation&amp;lt;/u&amp;gt; (e.g., resetting &amp;#039;&amp;#039;&amp;#039;accidentals&amp;#039;&amp;#039;&amp;#039;, automatic &amp;#039;&amp;#039;&amp;#039;bar numbering&amp;#039;&amp;#039;&amp;#039;, automatic &amp;#039;&amp;#039;&amp;#039;beaming&amp;#039;&amp;#039;&amp;#039;), the following approach may be useful. It combines &amp;lt;code&amp;gt;\omit TimeSignature&amp;lt;/code&amp;gt; with...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;If your music is unmetered, you might use &amp;lt;code&amp;gt;\cadenzaOn&amp;lt;/code&amp;gt;. But &amp;lt;code&amp;gt;\cadenzaOn&amp;lt;/code&amp;gt; will disable automatic measure demarcation, and when it is applied, the &amp;lt;code&amp;gt;\bar&amp;lt;/code&amp;gt; command will &#039;&#039;not&#039;&#039; start a new measure.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;If you want the features that come with measure demarcation&amp;lt;/u&amp;gt; (e.g., resetting &#039;&#039;&#039;accidentals&#039;&#039;&#039;, automatic &#039;&#039;&#039;bar numbering&#039;&#039;&#039;, automatic &#039;&#039;&#039;beaming&#039;&#039;&#039;), the following approach may be useful. It combines &amp;lt;code&amp;gt;\omit TimeSignature&amp;lt;/code&amp;gt; with [https://lilypond.org/doc/v2.24/Documentation/internals/devnull a &amp;lt;code&amp;gt;Devnull&amp;lt;/code&amp;gt; context] containing a timing (measure demarcation) variable.&lt;br /&gt;
&lt;br /&gt;
If you use Frescobaldi, you may find its built-in duration counter helpful for computing values to enter into your measure-demarcation variable. Look below your code window for “Length: #/#” to the right of the Line and Col counters. Highlight a measure of music input in your code to see Frescobaldi’s automatic counting of its length.&lt;br /&gt;
&lt;br /&gt;
See also [https://lilypond.org/doc/v2.24/Documentation/notation/displaying-rhythms#unmetered-music “Unmetered music” in the Notation Reference] and the snippet [[Free meter – increasing the bar number wherever you want]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lilypond version=&amp;quot;2.24&amp;quot;&amp;gt;&lt;br /&gt;
\header {&lt;br /&gt;
  title = &amp;quot;Example from an Anglican chant&amp;quot;&lt;br /&gt;
  subtitle = &amp;quot;Double chant in D major (second half)&amp;quot;&lt;br /&gt;
  subsubtitle = &amp;quot;Composed by John Soaper (1743–1794)&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
\layout {&lt;br /&gt;
  \context {&lt;br /&gt;
    \Staff&lt;br /&gt;
    \omit TimeSignature&lt;br /&gt;
  }&lt;br /&gt;
  \context {&lt;br /&gt;
    \ChoirStaff&lt;br /&gt;
    \accidentalStyle choral-cautionary&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
%% Define a variable that will go in a Devnull context: &lt;br /&gt;
measures = {&lt;br /&gt;
  \time 8/4 s1*2 \bar &amp;quot;||&amp;quot;&lt;br /&gt;
  \time 13/4 s4*13 \bar &amp;quot;|.&amp;quot;&lt;br /&gt;
  % Continue adding time signatures, spacer rests, &lt;br /&gt;
  % and (if desired) custom bar lines &lt;br /&gt;
  % for each subsequent “measure” of your music: &lt;br /&gt;
  % \time XX/4 s4*XX&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
global = {&lt;br /&gt;
  \key d \major&lt;br /&gt;
  % Notice that if you enable \cadenzaOn, &lt;br /&gt;
  % you will lose the features of &lt;br /&gt;
  % automatic measure demarcation: &lt;br /&gt;
  % \cadenzaOn&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
soprano = \relative c&#039;&#039; {&lt;br /&gt;
  \global&lt;br /&gt;
  a2 a4 gis4 fis1 | &lt;br /&gt;
  % Barchecks with | are helpful &lt;br /&gt;
  % to confirm that your \measures variable &lt;br /&gt;
  % has correct durations in it &lt;br /&gt;
  a1 d2 g,4 fis4 e4 d1 | &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
alto = \relative c&#039; {&lt;br /&gt;
  \global&lt;br /&gt;
  fis2 fis4 eis4 fis1 | &lt;br /&gt;
  fis1 fis2 e4 d4 cis4 d1 | &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
tenor = \relative c&#039; {&lt;br /&gt;
  \global&lt;br /&gt;
  cis2 cis4 b4 a1 | &lt;br /&gt;
  d1 d2 b4 a4 a8 g8 fis1 | &lt;br /&gt;
  \tweak direction #DOWN \tweak font-size #-1&lt;br /&gt;
  \textEndMark &amp;quot;Real Anglican chant; music altered slightly for illustrative purposes&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
bass = \relative c {&lt;br /&gt;
  \global&lt;br /&gt;
  fis2 cis4 cis4 fis1 | &lt;br /&gt;
  d1 b2 g4 a4 a4 d1 | &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
\score {&lt;br /&gt;
  \new ChoirStaff &amp;lt;&amp;lt;&lt;br /&gt;
    %% Add your variable to a Devnull context: &lt;br /&gt;
    \new Devnull \measures&lt;br /&gt;
    \new Staff &amp;lt;&amp;lt;&lt;br /&gt;
      \new Voice = &amp;quot;soprano&amp;quot; { \voiceOne \soprano }&lt;br /&gt;
      \new Voice = &amp;quot;alto&amp;quot; { \voiceTwo \alto }&lt;br /&gt;
    &amp;gt;&amp;gt;&lt;br /&gt;
    \new Staff &amp;lt;&amp;lt;&lt;br /&gt;
      \clef bass&lt;br /&gt;
      \new Voice = &amp;quot;tenor&amp;quot; { \voiceOne \tenor }&lt;br /&gt;
      \new Voice = &amp;quot;bass&amp;quot; { \voiceTwo \bass }&lt;br /&gt;
    &amp;gt;&amp;gt;&lt;br /&gt;
  &amp;gt;&amp;gt;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lilypond&amp;gt;&lt;/div&gt;</summary>
		<author><name>Gabriel Ellsworth</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=Ready-to-use_LilyPond_macros:_advanced_layout_and_titles,_using_a_special_stylesheet&amp;diff=5059</id>
		<title>Ready-to-use LilyPond macros: advanced layout and titles, using a special stylesheet</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=Ready-to-use_LilyPond_macros:_advanced_layout_and_titles,_using_a_special_stylesheet&amp;diff=5059"/>
		<updated>2025-11-23T11:27:23Z</updated>

		<summary type="html">&lt;p&gt;Gabriel Ellsworth: Added current link (a wiki.lilypond.community URL) since the LSR (LilyPond Snippet Repository) is no longer maintained&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;span id=&amp;quot;taking-lilypond-to-a-whole-new-level&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
= Taking LilyPond to a whole new level =&lt;br /&gt;
&lt;br /&gt;
This snippet is actually a set of advanced macros that provide some useful predefined commands. You can just copy the whole code, paste it in a separate file, named, for instance, &#039;book-titling.ily&#039;; then just include it in your score and use the provided macros (see the end of the snippet description if you want an example of an actual score source file).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;using-lilypond-to-produce-a-whole-book&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
= Using LilyPond to produce a whole book =&lt;br /&gt;
&lt;br /&gt;
This snippet allows you to create:&lt;br /&gt;
&lt;br /&gt;
* a nice title page&lt;br /&gt;
* a table of contents&lt;br /&gt;
* some fancy page headers (with book and chapter titles)&lt;br /&gt;
&lt;br /&gt;
The following commands are provided (in addition to LilyPond standard syntax)::&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;\bookTitle &amp;lt;code&amp;gt;string&amp;lt;/code&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&#039;&#039;defines the book title, as it should appear in even page header&#039;&#039;&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;\chapter &amp;lt;code&amp;gt;string&amp;lt;/code&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&#039;&#039;adds a page break and a big title, and a title in the TOC set the odd page header&#039;&#039;&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;\section &amp;lt;code&amp;gt;string&amp;lt;/code&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&#039;&#039;adds a section title, and a title in the TOC&#039;&#039;&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;\piece &amp;lt;code&amp;gt;markup&amp;lt;/code&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&#039;&#039;adds a piece title in the TOC&#039;&#039;&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;\titledPiece &amp;lt;code&amp;gt;markup&amp;lt;/code&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&#039;&#039;adds a piece title in book body and in the TOC&#039;&#039;&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;\useRehearsalNumbers &amp;lt;code&amp;gt;boolean&amp;lt;/code&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&#039;&#039;if set to &#039;true&#039;, adds rehearsal number before pieces&#039;&#039;&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this snippet, you will find the ready-to-use “stylesheet” (you may save it as a separate file named &amp;amp;quot;book-titling.ily&amp;amp;quot;, and then include it in your scores), and at the bottom of the source code, a short example demonstrating some of these abilities.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lilypond version=&amp;quot;2.24&amp;quot;&amp;gt;&lt;br /&gt;
%% https://wiki.lilypond.community/wiki/Ready-to-use_LilyPond_macros:_advanced_layout_and_titles,_using_a_special_stylesheet&lt;br /&gt;
%% http://lsr.di.unimi.it/LSR/Item?id=368&lt;br /&gt;
%% see also http://nicolas.sceaux.free.fr/&lt;br /&gt;
&lt;br /&gt;
%%% book-titling.ily  -- a titling stylesheet for use in books&lt;br /&gt;
%%% &lt;br /&gt;
%%% Author: Nicolas Sceaux &amp;lt;nicolas.sceaux@free.fr&amp;gt;&lt;br /&gt;
%%%&lt;br /&gt;
&lt;br /&gt;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%&lt;br /&gt;
%%% Utility markups&lt;br /&gt;
&lt;br /&gt;
#(define-markup-command (when-property layout props symbol markp) (symbol? markup?)&lt;br /&gt;
  (if (chain-assoc-get symbol props)&lt;br /&gt;
      (interpret-markup layout props markp)&lt;br /&gt;
      (ly:make-stencil &#039;()  &#039;(1 . -1) &#039;(1 . -1))))&lt;br /&gt;
&lt;br /&gt;
#(define-markup-command (line-width-ratio layout props width-ratio arg) (number? markup?)&lt;br /&gt;
  (interpret-markup layout props&lt;br /&gt;
   (markup #:override (cons &#039;line-width (* width-ratio (chain-assoc-get &#039;line-width props)))&lt;br /&gt;
           arg)))&lt;br /&gt;
&lt;br /&gt;
%% For guile-2 rework below, pitty the here defined &#039;smallCaps&#039; is actually not&lt;br /&gt;
%% used in this snippet&lt;br /&gt;
%%  -Harm&lt;br /&gt;
&lt;br /&gt;
%%% Guile does not deal with accented letters&lt;br /&gt;
#(use-modules (ice-9 regex))&lt;br /&gt;
%%;; actually defined below, in a closure&lt;br /&gt;
#(define-public string-upper-case #f)&lt;br /&gt;
#(define accented-char-upper-case? #f)&lt;br /&gt;
#(define accented-char-lower-case? #f)&lt;br /&gt;
&lt;br /&gt;
%%;; an accented character is seen as two characters by guile&lt;br /&gt;
#(let ((lower-case-accented-string &amp;quot;éèêëáàâäíìîïóòôöúùûüçœæ&amp;quot;)&lt;br /&gt;
       (upper-case-accented-string &amp;quot;ÉÈÊËÁÀÂÄÍÌÎÏÓÒÔÖÚÙÛÜÇŒÆ&amp;quot;))&lt;br /&gt;
   (define (group-by-2 chars result)&lt;br /&gt;
      (if (or (null? chars) (null? (cdr chars)))&lt;br /&gt;
          (reverse! result)&lt;br /&gt;
          (group-by-2 (cddr chars)&lt;br /&gt;
                      (cons (string (car chars) (cadr chars))&lt;br /&gt;
                            result))))&lt;br /&gt;
   (let ((lower-case-accented-chars&lt;br /&gt;
          (group-by-2 (string-&amp;gt;list lower-case-accented-string) (list)))&lt;br /&gt;
         (upper-case-accented-chars&lt;br /&gt;
          (group-by-2 (string-&amp;gt;list upper-case-accented-string) (list))))&lt;br /&gt;
     (set! string-upper-case&lt;br /&gt;
           (lambda (str)&lt;br /&gt;
             (define (replace-chars str froms tos)&lt;br /&gt;
               (if (null? froms)&lt;br /&gt;
                   str&lt;br /&gt;
                   (replace-chars (regexp-substitute/global #f (car froms) str&lt;br /&gt;
                                                            &#039;pre (car tos) &#039;post)&lt;br /&gt;
                                  (cdr froms)&lt;br /&gt;
                                  (cdr tos))))&lt;br /&gt;
             (string-upcase (replace-chars str&lt;br /&gt;
                                           lower-case-accented-chars&lt;br /&gt;
                                           upper-case-accented-chars))))&lt;br /&gt;
     (set! accented-char-upper-case?&lt;br /&gt;
           (lambda (char1 char2)&lt;br /&gt;
             (member (string char1 char2) upper-case-accented-chars string=?)))&lt;br /&gt;
     (set! accented-char-lower-case?&lt;br /&gt;
           (lambda (char1 char2)&lt;br /&gt;
             (member (string char1 char2) lower-case-accented-chars string=?)))))&lt;br /&gt;
&lt;br /&gt;
#(define-markup-command (smallCaps layout props text) (markup?)&lt;br /&gt;
  &amp;quot;Turn @code{text}, which should be a string, to small caps.&lt;br /&gt;
@example&lt;br /&gt;
\\markup \\small-caps \&amp;quot;Text between double quotes\&amp;quot;&lt;br /&gt;
@end example&amp;quot;&lt;br /&gt;
  (define (string-list-&amp;gt;markup strings lower)&lt;br /&gt;
    (let ((final-string (string-upper-case&lt;br /&gt;
                         (apply string-append (reverse strings)))))&lt;br /&gt;
      (if lower&lt;br /&gt;
          (markup #:fontsize -2 final-string)&lt;br /&gt;
          final-string)))&lt;br /&gt;
  (define (make-small-caps rest-chars currents current-is-lower prev-result)&lt;br /&gt;
    (if (null? rest-chars)&lt;br /&gt;
        (make-concat-markup (reverse! (cons (string-list-&amp;gt;markup&lt;br /&gt;
                                              currents current-is-lower)&lt;br /&gt;
                                            prev-result)))&lt;br /&gt;
        (let* ((ch1 (car rest-chars))&lt;br /&gt;
               (ch2 (and (not (null? (cdr rest-chars))) (cadr rest-chars)))&lt;br /&gt;
               (this-char-string (string ch1))&lt;br /&gt;
               (is-lower (char-lower-case? ch1))&lt;br /&gt;
               (next-rest-chars (cdr rest-chars)))&lt;br /&gt;
          (cond ((and ch2 (accented-char-lower-case? ch1 ch2))&lt;br /&gt;
                 (set! this-char-string (string ch1 ch2))&lt;br /&gt;
                 (set! is-lower #t)&lt;br /&gt;
                 (set! next-rest-chars (cddr rest-chars)))&lt;br /&gt;
                ((and ch2 (accented-char-upper-case? ch1 ch2))&lt;br /&gt;
                 (set! this-char-string (string ch1 ch2))&lt;br /&gt;
                 (set! is-lower #f)&lt;br /&gt;
                 (set! next-rest-chars (cddr rest-chars))))&lt;br /&gt;
          (if (or (and current-is-lower is-lower)&lt;br /&gt;
                  (and (not current-is-lower) (not is-lower)))&lt;br /&gt;
              (make-small-caps next-rest-chars&lt;br /&gt;
                               (cons this-char-string currents)&lt;br /&gt;
                               is-lower&lt;br /&gt;
                               prev-result)&lt;br /&gt;
              (make-small-caps next-rest-chars&lt;br /&gt;
                               (list this-char-string)&lt;br /&gt;
                               is-lower&lt;br /&gt;
                               (if (null? currents)&lt;br /&gt;
                                   prev-result&lt;br /&gt;
                                   (cons (string-list-&amp;gt;markup&lt;br /&gt;
                                            currents current-is-lower)&lt;br /&gt;
                                         prev-result)))))))&lt;br /&gt;
  (interpret-markup layout props&lt;br /&gt;
    (if (string? text)&lt;br /&gt;
        (make-small-caps (string-&amp;gt;list text) (list) #f (list))&lt;br /&gt;
        text)))&lt;br /&gt;
&lt;br /&gt;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%&lt;br /&gt;
%%% Title page&lt;br /&gt;
%%%&lt;br /&gt;
\paper {&lt;br /&gt;
  bookTitleMarkup = \markup \when-property #&#039;header:title \column {&lt;br /&gt;
    \combine \null \vspace #6&lt;br /&gt;
    \fill-line { \fontsize #8 \italic \fromproperty #&#039;header:composer }&lt;br /&gt;
    \combine \null \vspace #1&lt;br /&gt;
    \fill-line { \fontsize #8 \italic \fromproperty #&#039;header:poet }&lt;br /&gt;
    \combine \null \vspace #6&lt;br /&gt;
    \fill-line { \fontsize #10 \fromproperty #&#039;header:title }&lt;br /&gt;
    \combine \null \vspace #6&lt;br /&gt;
    \fill-line { \postscript &amp;quot;-20 0 moveto 40 0 rlineto stroke&amp;quot; }&lt;br /&gt;
    \combine \null \vspace #6&lt;br /&gt;
    \fill-line { \fontsize #5 \fromproperty #&#039;header:date }&lt;br /&gt;
    \combine \null \vspace #1 &lt;br /&gt;
    \fill-line {&lt;br /&gt;
      \when-property #&#039;header:arrangement \column {&lt;br /&gt;
        \combine \null \vspace #5&lt;br /&gt;
        \fill-line { \fontsize #3 \fromproperty #&#039;header:arrangement }&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
  scoreTitleMarkup = \markup \null&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%&lt;br /&gt;
%%% Table of contents&lt;br /&gt;
%%%&lt;br /&gt;
#(define-markup-command (paper-prop layout props name default)&lt;br /&gt;
  (symbol? markup?)&lt;br /&gt;
  &amp;quot;Get the value of a \\paper property, or defaults to some value&amp;quot;&lt;br /&gt;
  (let ((val (ly:output-def-lookup layout name)))&lt;br /&gt;
    (interpret-markup layout props (if (markup? val)&lt;br /&gt;
                                      val&lt;br /&gt;
                                      default))))&lt;br /&gt;
\paper {&lt;br /&gt;
  tocTitleMarkup = \markup \column {&lt;br /&gt;
    \combine \null \vspace #2&lt;br /&gt;
    \fontsize #6 \fill-line { \paper-prop #&#039;tocTitle &amp;quot;TABLE OF CONTENTS&amp;quot; }&lt;br /&gt;
    \combine \null \vspace #2&lt;br /&gt;
  }&lt;br /&gt;
  tocPieceMarkup = \markup \fill-line {&lt;br /&gt;
    \line-width-ratio #0.7 \fill-line {&lt;br /&gt;
      \line { \fromproperty #&#039;toc:text }&lt;br /&gt;
      \fromproperty #&#039;toc:page&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
  tocSectionMarkup = \markup \italic \column {&lt;br /&gt;
    \fill-line { \fromproperty #&#039;toc:text }&lt;br /&gt;
  }&lt;br /&gt;
  tocChapterMarkup = \markup \large \italic \column {&lt;br /&gt;
    \combine \null \vspace #1&lt;br /&gt;
    \fontsize #2 \fill-line { \fromproperty #&#039;toc:text }&lt;br /&gt;
    \combine \null \vspace #1&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%&lt;br /&gt;
%%% Markup commands for page headers&lt;br /&gt;
%%%&lt;br /&gt;
#(define-public add-odd-page-header-text #f)&lt;br /&gt;
#(define-public add-even-page-header-text #f)&lt;br /&gt;
#(define header-markup-aux #f)&lt;br /&gt;
#(let ((odd-label-header-table (list))&lt;br /&gt;
       (odd-page-header-table (list))&lt;br /&gt;
       (even-label-header-table (list))&lt;br /&gt;
       (even-page-header-table (list)))&lt;br /&gt;
  (set! header-markup-aux&lt;br /&gt;
   (lambda (layout props odd)&lt;br /&gt;
     (define (page-text page-number table)&lt;br /&gt;
       (if (null? table)&lt;br /&gt;
           &amp;quot;&amp;quot;&lt;br /&gt;
           (let* ((elment (car table))&lt;br /&gt;
                  (p (car elment))&lt;br /&gt;
                  (text (cadr elment))&lt;br /&gt;
                  (display-1st (caddr elment)))&lt;br /&gt;
             (cond ((and (= page-number p) (not display-1st)) #f)&lt;br /&gt;
                   ((&amp;gt;= page-number p) text)&lt;br /&gt;
                   (else (page-text page-number (cdr table)))))))&lt;br /&gt;
     (ly:make-stencil&lt;br /&gt;
       `(delay-stencil-evaluation&lt;br /&gt;
          ,(delay (ly:stencil-expr&lt;br /&gt;
                    (begin&lt;br /&gt;
                     (if (or (and odd (null? odd-page-header-table))&lt;br /&gt;
                             (and (not odd) (null? even-page-header-table)))&lt;br /&gt;
                         (let ((page-header-table (list)))&lt;br /&gt;
                          (for-each (lambda (label-header)&lt;br /&gt;
                                      (let* ((label (car label-header))&lt;br /&gt;
                                             (text-disp (cdr label-header))&lt;br /&gt;
                                             (table (ly:output-def-lookup layout &#039;label-page-table))&lt;br /&gt;
                                             (label-page (and (list? table) (assoc label table)))&lt;br /&gt;
                                             (page-number (and label-page (cdr label-page)))&lt;br /&gt;
                                             (prev-value (and page-number (assoc page-number page-header-table))))&lt;br /&gt;
                                        (if (not prev-value)&lt;br /&gt;
                                            (set! page-header-table (cons (cons page-number text-disp)&lt;br /&gt;
                                                                          page-header-table))&lt;br /&gt;
                                            (set! page-header-table&lt;br /&gt;
                                                  (assoc-set! page-header-table&lt;br /&gt;
                                                              page-number&lt;br /&gt;
                                                              (list (car text-disp) (caddr prev-value)))))))&lt;br /&gt;
                                    (reverse (if odd odd-label-header-table even-label-header-table)))&lt;br /&gt;
                          (if odd&lt;br /&gt;
                              (set! odd-page-header-table page-header-table)&lt;br /&gt;
                              (set! even-page-header-table page-header-table))))&lt;br /&gt;
                     (interpret-markup layout props&lt;br /&gt;
                       (let* ((page-number (chain-assoc-get &#039;page:page-number props -1))&lt;br /&gt;
                              (text (page-text page-number (if odd odd-page-header-table even-page-header-table)))&lt;br /&gt;
                              (text-markup (markup #:italic (or text &amp;quot;&amp;quot;)))&lt;br /&gt;
                              (page-number-markup (number-&amp;gt;string page-number)))&lt;br /&gt;
                         (cond ((or (= 1 page-number) (not text)) (markup #:null))&lt;br /&gt;
                               (odd (markup #:fill-line (#:null text-markup page-number-markup)))&lt;br /&gt;
                               (else (markup #:fill-line (page-number-markup text-markup #:null))))))))))&lt;br /&gt;
       (cons 0 0)&lt;br /&gt;
       (ly:stencil-extent (interpret-markup layout props &amp;quot;XXX&amp;quot;) Y))))&lt;br /&gt;
  (set! add-odd-page-header-text&lt;br /&gt;
   (lambda (parser text display-1st)&lt;br /&gt;
     (let ((label (gensym &amp;quot;header&amp;quot;)))&lt;br /&gt;
       (set! odd-label-header-table&lt;br /&gt;
             (cons (list label text display-1st)&lt;br /&gt;
                   odd-label-header-table))&lt;br /&gt;
       (collect-music-for-book&lt;br /&gt;
         (make-music &#039;Music&lt;br /&gt;
          &#039;page-marker #t&lt;br /&gt;
          &#039;page-label label)))))&lt;br /&gt;
  (set! add-even-page-header-text&lt;br /&gt;
   (lambda (parser text display-1st)&lt;br /&gt;
     (let ((label (gensym &amp;quot;header&amp;quot;)))&lt;br /&gt;
       (set! even-label-header-table&lt;br /&gt;
             (cons (list label text display-1st)&lt;br /&gt;
                   even-label-header-table))&lt;br /&gt;
       (collect-music-for-book&lt;br /&gt;
         (make-music &#039;Music&lt;br /&gt;
          &#039;page-marker #t&lt;br /&gt;
          &#039;page-label label))))))&lt;br /&gt;
&lt;br /&gt;
#(define-markup-command (odd-header layout props) ()&lt;br /&gt;
   (header-markup-aux layout props #t))&lt;br /&gt;
&lt;br /&gt;
#(define-markup-command (even-header layout props) ()&lt;br /&gt;
   (header-markup-aux layout props #f))&lt;br /&gt;
&lt;br /&gt;
\paper {&lt;br /&gt;
  evenHeaderMarkup = \markup \even-header&lt;br /&gt;
  oddHeaderMarkup = \markup \odd-header&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%&lt;br /&gt;
%%% Utilities for adding (no-)page breaks, toplevel markups&lt;br /&gt;
%%%&lt;br /&gt;
#(define (add-page-break parser)&lt;br /&gt;
  (collect-music-for-book &lt;br /&gt;
   (make-music &#039;Music&lt;br /&gt;
	       &#039;page-marker #t&lt;br /&gt;
	       &#039;line-break-permission &#039;force&lt;br /&gt;
	       &#039;page-break-permission &#039;force)))&lt;br /&gt;
&lt;br /&gt;
#(define (add-no-page-break parser)&lt;br /&gt;
  (collect-music-for-book &lt;br /&gt;
   (make-music &#039;Music&lt;br /&gt;
	       &#039;page-marker #t&lt;br /&gt;
	       &#039;page-break-permission &#039;forbid)))&lt;br /&gt;
&lt;br /&gt;
#(define (add-toplevel-markup parser text)&lt;br /&gt;
  (collect-scores-for-book (list text)))&lt;br /&gt;
&lt;br /&gt;
#(define (add-toc-item parser markup-symbol text)&lt;br /&gt;
  (collect-music-for-book&lt;br /&gt;
   (add-toc-item! markup-symbol text)))&lt;br /&gt;
&lt;br /&gt;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%&lt;br /&gt;
%%% Rehearsal numbers&lt;br /&gt;
%%%&lt;br /&gt;
#(define-public rehearsal-number #f)&lt;br /&gt;
#(define-public increase-rehearsal-major-number #f)&lt;br /&gt;
#(let ((major-number 0)&lt;br /&gt;
       (minor-number 0))&lt;br /&gt;
  (set! increase-rehearsal-major-number&lt;br /&gt;
        (lambda ()&lt;br /&gt;
          (set! major-number (1+ major-number))&lt;br /&gt;
          (set! minor-number 0)))&lt;br /&gt;
  (set! rehearsal-number &lt;br /&gt;
        (lambda ()&lt;br /&gt;
          (set! minor-number (1+ minor-number))&lt;br /&gt;
          (format #f &amp;quot;~a-~a&amp;quot; major-number minor-number))))&lt;br /&gt;
&lt;br /&gt;
#(define-public (add-rehearsal-number parser)&lt;br /&gt;
   (collect-scores-for-book&lt;br /&gt;
    (list (markup #:huge #:bold (rehearsal-number)))))&lt;br /&gt;
&lt;br /&gt;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%&lt;br /&gt;
%%% Commands&lt;br /&gt;
%%%&lt;br /&gt;
&lt;br /&gt;
#(use-modules (srfi srfi-39))&lt;br /&gt;
#(define *book-title* (make-parameter &amp;quot;&amp;quot;))&lt;br /&gt;
#(define *use-rehearsal-numbers* (make-parameter #f))&lt;br /&gt;
&lt;br /&gt;
#(define-markup-command (chapter-title layout props title) (markup?)&lt;br /&gt;
  (interpret-markup layout props&lt;br /&gt;
   (markup #:column (#:vspace 3&lt;br /&gt;
                     #:pad-markup 3 #:fill-line (#:fontsize 5 title)))))&lt;br /&gt;
&lt;br /&gt;
#(define-markup-command (section-title layout props title) (markup?)&lt;br /&gt;
  (interpret-markup layout props&lt;br /&gt;
   (markup #:column (#:vspace 1&lt;br /&gt;
                     #:fill-line (#:fontsize 3 title)&lt;br /&gt;
                     #:vspace 1))))&lt;br /&gt;
&lt;br /&gt;
#(define-markup-command (piece-title layout props title) (markup?)&lt;br /&gt;
  (interpret-markup layout props&lt;br /&gt;
   (markup #:fill-line (#:override &#039;(line-width . 80) title))))&lt;br /&gt;
&lt;br /&gt;
#(define-markup-command (rehearsal-number layout props number) (markup?)&lt;br /&gt;
  (interpret-markup layout props&lt;br /&gt;
   (markup #:huge #:bold number)))&lt;br /&gt;
&lt;br /&gt;
#(define-markup-command (piece-title-with-number layout props number title)&lt;br /&gt;
                        (markup? markup?)&lt;br /&gt;
  (interpret-markup layout props&lt;br /&gt;
    (markup #:rehearsal-number number&lt;br /&gt;
            #:hspace 1&lt;br /&gt;
            #:huge title)))&lt;br /&gt;
&lt;br /&gt;
useRehearsalNumbers =&lt;br /&gt;
#(define-music-function (use-numbers) (boolean?)&lt;br /&gt;
  (*use-rehearsal-numbers* use-numbers)&lt;br /&gt;
   (make-music &#039;Music &#039;void #t))&lt;br /&gt;
&lt;br /&gt;
bookTitle =&lt;br /&gt;
#(define-music-function (title) (string?)&lt;br /&gt;
   (*book-title* title)&lt;br /&gt;
   (make-music &#039;Music &#039;void #t))&lt;br /&gt;
&lt;br /&gt;
chapter =&lt;br /&gt;
#(define-music-function (title) (string?)&lt;br /&gt;
  (increase-rehearsal-major-number)&lt;br /&gt;
  (add-page-break (*parser*))&lt;br /&gt;
  (add-toc-item (*parser*) &#039;tocChapterMarkup title)&lt;br /&gt;
  (add-even-page-header-text (*parser*) (string-upper-case (*book-title*)) #f)&lt;br /&gt;
  (add-odd-page-header-text (*parser*) (string-upper-case title) #f)&lt;br /&gt;
  (add-toplevel-markup (*parser*) (markup #:chapter-title (string-upper-case title)))&lt;br /&gt;
  (add-no-page-break (*parser*))&lt;br /&gt;
  (make-music &#039;Music &#039;void #t))&lt;br /&gt;
&lt;br /&gt;
section =&lt;br /&gt;
#(define-music-function (title) (string?)&lt;br /&gt;
  (add-toc-item (*parser*) &#039;tocSectionMarkup title)&lt;br /&gt;
  (add-toplevel-markup (*parser*) (markup #:section-title (string-upper-case title)))&lt;br /&gt;
  (add-no-page-break (*parser*))&lt;br /&gt;
  (make-music &#039;Music &#039;void #t))&lt;br /&gt;
                        &lt;br /&gt;
piece =&lt;br /&gt;
#(define-music-function (title) (markup?)&lt;br /&gt;
  (add-toc-item (*parser*) &#039;tocPieceMarkup title)&lt;br /&gt;
  (add-no-page-break (*parser*))&lt;br /&gt;
  (if (*use-rehearsal-numbers*)&lt;br /&gt;
      (add-toplevel-markup (*parser*) (markup #:rehearsal-number (rehearsal-number))))&lt;br /&gt;
  (add-no-page-break (*parser*))&lt;br /&gt;
  (make-music &#039;Music &#039;void #t))&lt;br /&gt;
                        &lt;br /&gt;
titledPiece =&lt;br /&gt;
#(define-music-function (title) (markup?)&lt;br /&gt;
  (add-toc-item (*parser*) &#039;tocPieceMarkup title)&lt;br /&gt;
  (if (*use-rehearsal-numbers*)&lt;br /&gt;
      (add-toplevel-markup (*parser*)&lt;br /&gt;
        (markup #:piece-title-with-number (rehearsal-number) (string-upper-case title)))&lt;br /&gt;
      (add-toplevel-markup (*parser*) (markup #:piece-title (string-upper-case title))))&lt;br /&gt;
  (add-no-page-break (*parser*))&lt;br /&gt;
  (make-music &#039;Music &#039;void #t))&lt;br /&gt;
&lt;br /&gt;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%&lt;br /&gt;
&lt;br /&gt;
%%%% Here&#039;s an example file that use the above functions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  \header {&lt;br /&gt;
    title = &amp;quot;The Title&amp;quot;&lt;br /&gt;
    composer = &amp;quot;Composer&amp;quot;&lt;br /&gt;
    poet = &amp;quot;Lyricist&amp;quot;&lt;br /&gt;
    date = &amp;quot;1740-1742&amp;quot;&lt;br /&gt;
    arrangement = &amp;quot;...&amp;quot;&lt;br /&gt;
    copyright = &amp;quot;Copyright line&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
  \paper {&lt;br /&gt;
    %% Translate the TOC title&lt;br /&gt;
    tocTitle = &amp;quot;TABLE OF CONTENTS&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
%%  \include &amp;quot;book-titling.ily&amp;quot;&lt;br /&gt;
  &lt;br /&gt;
  \bookTitle &amp;quot;Title for header&amp;quot;&lt;br /&gt;
  %% set to #f to turn off piece numbering&lt;br /&gt;
  \useRehearsalNumbers ##t&lt;br /&gt;
  &lt;br /&gt;
  %% Table of contents&lt;br /&gt;
  \pageBreak&lt;br /&gt;
  \markuplist \table-of-contents&lt;br /&gt;
  &lt;br /&gt;
  %% 1st Chapter&lt;br /&gt;
  \chapter &amp;quot;Act I&amp;quot;&lt;br /&gt;
  \section &amp;quot;Scene 1&amp;quot;&lt;br /&gt;
  \titledPiece \markup Overtura&lt;br /&gt;
  \repeat unfold 12 { c&#039;4 d&#039; e&#039; f&#039; \break }&lt;br /&gt;
  \section &amp;quot;Scene 2&amp;quot;&lt;br /&gt;
  \piece \markup { Choir: \italic { bla bla bla } }&lt;br /&gt;
  \repeat unfold 12 { g&#039;4 f&#039; e&#039; d&#039;  \break }&lt;br /&gt;
  &lt;br /&gt;
  \chapter &amp;quot;Act II&amp;quot;&lt;br /&gt;
  \section &amp;quot;Scene 1&amp;quot;&lt;br /&gt;
  \titledPiece \markup Overtura&lt;br /&gt;
  { c&#039;4 d&#039; e&#039; f&#039; g&#039;1 }&lt;br /&gt;
&amp;lt;/lilypond&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Stylesheet]]&lt;br /&gt;
[[Category:Titles]]&lt;br /&gt;
[[Category:Paper and layout]]&lt;br /&gt;
[[Category:Scheme]]&lt;br /&gt;
[[Category:Syntax and expressions]]&lt;br /&gt;
[[Category:Real music]]&lt;br /&gt;
[[Category:Snippet]]&lt;/div&gt;</summary>
		<author><name>Gabriel Ellsworth</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=Custom_clef_and_incipit_spacing_for_Gregorian_chant&amp;diff=2016</id>
		<title>Custom clef and incipit spacing for Gregorian chant</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=Custom_clef_and_incipit_spacing_for_Gregorian_chant&amp;diff=2016"/>
		<updated>2025-11-07T12:33:43Z</updated>

		<summary type="html">&lt;p&gt;Gabriel Ellsworth: I added categories.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In LilyPond 2.24.4, you may want to reduce the horizontal space after [https://lilypond.org/doc/v2.24/Documentation/notation/typesetting-gregorian-chant#gregorian-clefs a Gregorian clef]. You can do this with &amp;lt;code&amp;gt;&#039;&#039;&#039;\override Staff.Clef.space-alist.first-note&#039;&#039;&#039; = #&#039;(minimum-fixed-space . [&#039;&#039;insert your preferred spacing&#039;&#039;])&amp;lt;/code&amp;gt;. Note: LilyPond 2.25 [https://lilypond.org/doc/v2.25/Documentation/changes/major-changes-in-lilypond features improved spacing for extra-slim clefs].&lt;br /&gt;
&lt;br /&gt;
And if your incipit has a four-line staff, but your music uses a modern five-line staff, you may want to add some white space between the incipit and the modern staff. You can do this with &amp;lt;code&amp;gt;&#039;&#039;&#039;\stopStaff&#039;&#039;&#039;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&#039;&#039;&#039;\hideNotes&#039;&#039;&#039;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lilypond version=&amp;quot;2.24.4&amp;quot;&amp;gt;&lt;br /&gt;
incipitMusic = \relative c {&lt;br /&gt;
  \override Staff.StaffSymbol.line-count = #4 &lt;br /&gt;
  \clef &amp;quot;vaticana-do3&amp;quot;&lt;br /&gt;
  \override NoteHead.style = #&#039;vaticana.punctum&lt;br /&gt;
  c1 &lt;br /&gt;
  &lt;br /&gt;
  % The following line helps with spacing between the first two neumes: &lt;br /&gt;
  \hideNotes c \unHideNotes &lt;br /&gt;
  &lt;br /&gt;
  e &lt;br /&gt;
  &lt;br /&gt;
  % The following line helps with spacing between the second neume and the end of the visible four-line staff: &lt;br /&gt;
  \hideNotes e \unHideNotes &lt;br /&gt;
  &lt;br /&gt;
  % The following line effectively prints white space between the incipit and the modern five-line staff: &lt;br /&gt;
  \stopStaff \hideNotes g a &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
ictus = #(make-articulation &#039;ictus)&lt;br /&gt;
&lt;br /&gt;
chant = \relative c&#039; {&lt;br /&gt;
  \cadenzaOn &lt;br /&gt;
  c4 e g\ictus a g2 &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
verba = \lyricmode {&lt;br /&gt;
  Sál -- ve, Re -- gí --  na, &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
\score {&lt;br /&gt;
  \new Staff \with {&lt;br /&gt;
    \incipit &lt;br /&gt;
      \incipitMusic instrumentName = &amp;quot;&amp;quot; &lt;br /&gt;
  }&lt;br /&gt;
  &amp;lt;&amp;lt;&lt;br /&gt;
    \new Voice = &amp;quot;melody&amp;quot; \chant&lt;br /&gt;
    \new Lyrics = &amp;quot;text&amp;quot; \lyricsto melody \verba&lt;br /&gt;
  &amp;gt;&amp;gt;&lt;br /&gt;
  \layout {&lt;br /&gt;
    \context {&lt;br /&gt;
      \MensuralStaff&lt;br /&gt;
      \remove Time_signature_engraver&lt;br /&gt;
      &lt;br /&gt;
      % The following line reduces the horizontal space between the &amp;quot;vaticana-do3&amp;quot; clef and the first neume (c1): &lt;br /&gt;
      \override Clef.space-alist.first-note = #&#039;(minimum-fixed-space . 1.0) &lt;br /&gt;
    }&lt;br /&gt;
    \context {&lt;br /&gt;
      \Staff&lt;br /&gt;
      \remove Time_signature_engraver&lt;br /&gt;
    }&lt;br /&gt;
    \context {&lt;br /&gt;
      \Voice&lt;br /&gt;
      \remove Stem_engraver&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&amp;lt;/lilypond&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Ancient notation]]&lt;br /&gt;
[[Category:Spacing]]&lt;br /&gt;
[[Category:Staff notation]]&lt;br /&gt;
[[Category:Tweaks and overrides]]&lt;br /&gt;
[[Category:Workaround]]&lt;br /&gt;
[[Category:Vocal music]]&lt;br /&gt;
[[Category:Real music]]&lt;/div&gt;</summary>
		<author><name>Gabriel Ellsworth</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=Custom_clef_and_incipit_spacing_for_Gregorian_chant&amp;diff=2015</id>
		<title>Custom clef and incipit spacing for Gregorian chant</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=Custom_clef_and_incipit_spacing_for_Gregorian_chant&amp;diff=2015"/>
		<updated>2025-11-07T12:24:52Z</updated>

		<summary type="html">&lt;p&gt;Gabriel Ellsworth: I fixed some input errors that were preventing the page from displaying correctly.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In LilyPond 2.24.4, you may want to reduce the horizontal space after [https://lilypond.org/doc/v2.24/Documentation/notation/typesetting-gregorian-chant#gregorian-clefs a Gregorian clef]. You can do this with &amp;lt;code&amp;gt;&#039;&#039;&#039;\override Staff.Clef.space-alist.first-note&#039;&#039;&#039; = #&#039;(minimum-fixed-space . [&#039;&#039;insert your preferred spacing&#039;&#039;])&amp;lt;/code&amp;gt;. Note: LilyPond 2.25 [https://lilypond.org/doc/v2.25/Documentation/changes/major-changes-in-lilypond features improved spacing for extra-slim clefs].&lt;br /&gt;
&lt;br /&gt;
And if your incipit has a four-line staff, but your music uses a modern five-line staff, you may want to add some white space between the incipit and the modern staff. You can do this with &amp;lt;code&amp;gt;&#039;&#039;&#039;\stopStaff&#039;&#039;&#039;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&#039;&#039;&#039;\hideNotes&#039;&#039;&#039;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lilypond version=&amp;quot;2.24.4&amp;quot;&amp;gt;&lt;br /&gt;
incipitMusic = \relative c {&lt;br /&gt;
  \override Staff.StaffSymbol.line-count = #4 &lt;br /&gt;
  \clef &amp;quot;vaticana-do3&amp;quot;&lt;br /&gt;
  \override NoteHead.style = #&#039;vaticana.punctum&lt;br /&gt;
  c1 &lt;br /&gt;
  &lt;br /&gt;
  % The following line helps with spacing between the first two neumes: &lt;br /&gt;
  \hideNotes c \unHideNotes &lt;br /&gt;
  &lt;br /&gt;
  e &lt;br /&gt;
  &lt;br /&gt;
  % The following line helps with spacing between the second neume and the end of the visible four-line staff: &lt;br /&gt;
  \hideNotes e \unHideNotes &lt;br /&gt;
  &lt;br /&gt;
  % The following line effectively prints white space between the incipit and the modern five-line staff: &lt;br /&gt;
  \stopStaff \hideNotes g a &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
ictus = #(make-articulation &#039;ictus)&lt;br /&gt;
&lt;br /&gt;
chant = \relative c&#039; {&lt;br /&gt;
  \cadenzaOn &lt;br /&gt;
  c4 e g\ictus a g2 &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
verba = \lyricmode {&lt;br /&gt;
  Sál -- ve, Re -- gí --  na, &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
\score {&lt;br /&gt;
  \new Staff \with {&lt;br /&gt;
    \incipit &lt;br /&gt;
      \incipitMusic instrumentName = &amp;quot;&amp;quot; &lt;br /&gt;
  }&lt;br /&gt;
  &amp;lt;&amp;lt;&lt;br /&gt;
    \new Voice = &amp;quot;melody&amp;quot; \chant&lt;br /&gt;
    \new Lyrics = &amp;quot;text&amp;quot; \lyricsto melody \verba&lt;br /&gt;
  &amp;gt;&amp;gt;&lt;br /&gt;
  \layout {&lt;br /&gt;
    \context {&lt;br /&gt;
      \MensuralStaff&lt;br /&gt;
      \remove Time_signature_engraver&lt;br /&gt;
      &lt;br /&gt;
      % The following line reduces the horizontal space between the &amp;quot;vaticana-do3&amp;quot; clef and the first neume (c1): &lt;br /&gt;
      \override Clef.space-alist.first-note = #&#039;(minimum-fixed-space . 1.0) &lt;br /&gt;
    }&lt;br /&gt;
    \context {&lt;br /&gt;
      \Staff&lt;br /&gt;
      \remove Time_signature_engraver&lt;br /&gt;
    }&lt;br /&gt;
    \context {&lt;br /&gt;
      \Voice&lt;br /&gt;
      \remove Stem_engraver&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&amp;lt;/lilypond&amp;gt;&lt;/div&gt;</summary>
		<author><name>Gabriel Ellsworth</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=Custom_clef_and_incipit_spacing_for_Gregorian_chant&amp;diff=2014</id>
		<title>Custom clef and incipit spacing for Gregorian chant</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=Custom_clef_and_incipit_spacing_for_Gregorian_chant&amp;diff=2014"/>
		<updated>2025-11-07T12:13:55Z</updated>

		<summary type="html">&lt;p&gt;Gabriel Ellsworth: I created this new page.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In LilyPond 2.24.4, you may want to reduce the horizontal space after &amp;lt;nowiki&amp;gt;[https://lilypond.org/doc/v2.24/Documentation/notation/typesetting-gregorian-chant#gregorian-clefs a Gregorian clef]&amp;lt;/nowiki&amp;gt;. You can do this with &amp;lt;nowiki&amp;gt;&amp;lt;code&amp;gt;&amp;lt;/nowiki&amp;gt;&#039;&#039;&#039;\override Staff.Clef.space-alist.first-note&#039;&#039;&#039; = #&#039;(minimum-fixed-space . [&#039;&#039;insert your preferred spacing&#039;&#039;])&amp;lt;nowiki&amp;gt;&amp;lt;/code&amp;gt;&amp;lt;/nowiki&amp;gt;. Note: LilyPond 2.25 &amp;lt;nowiki&amp;gt;[https://lilypond.org/doc/v2.25/Documentation/changes/major-changes-in-lilypond features improved spacing for extra-slim clefs]&amp;lt;/nowiki&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
And if your incipit has four lines, but your music uses a modern five-line staff, you may want to add some white space between the incipit and the modern staff. You can do this with &amp;lt;nowiki&amp;gt;&amp;lt;code&amp;gt;&amp;lt;/nowiki&amp;gt;&#039;&#039;&#039;\stopStaff&#039;&#039;&#039;&amp;lt;nowiki&amp;gt;&amp;lt;/code&amp;gt;&amp;lt;/nowiki&amp;gt; and &amp;lt;nowiki&amp;gt;&amp;lt;code&amp;gt;&amp;lt;/nowiki&amp;gt;&#039;&#039;&#039;\hideNotes&#039;&#039;&#039;&amp;lt;nowiki&amp;gt;&amp;lt;/code&amp;gt;&amp;lt;/nowiki&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;lilypond version=&amp;quot;2.24.4&amp;quot;&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
incipitMusic = \relative c {&lt;br /&gt;
&lt;br /&gt;
\sourcefileline 1783&lt;br /&gt;
&lt;br /&gt;
  \override Staff.StaffSymbol.line-count = #4 &lt;br /&gt;
&lt;br /&gt;
  \clef &amp;quot;vaticana-do3&amp;quot;&lt;br /&gt;
&lt;br /&gt;
  \override NoteHead.style = #&#039;vaticana.punctum&lt;br /&gt;
&lt;br /&gt;
  c1 &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
  % The following line helps with spacing between the first two neumes: &lt;br /&gt;
&lt;br /&gt;
  \hideNotes c \unHideNotes &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
  e &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
  % The following line helps with spacing between the second neume and the end of the visible four-line staff: &lt;br /&gt;
&lt;br /&gt;
  \hideNotes e \unHideNotes &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
  % The following line effectively prints white space between the incipit and the modern five-line staff: &lt;br /&gt;
&lt;br /&gt;
  \stopStaff \hideNotes g a &lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
ictus = #(make-articulation &#039;ictus)&lt;br /&gt;
&lt;br /&gt;
chant = \relative c&#039; {&lt;br /&gt;
&lt;br /&gt;
  \cadenzaOn &lt;br /&gt;
&lt;br /&gt;
  c4 e g\ictus a g2 &lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
verba = \lyricmode {&lt;br /&gt;
&lt;br /&gt;
  Sál -- ve, Re -- gí --  na, &lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
\score {&lt;br /&gt;
&lt;br /&gt;
  \new Staff \with {&lt;br /&gt;
&lt;br /&gt;
    \incipit &lt;br /&gt;
&lt;br /&gt;
      \incipitMusic instrumentName = &amp;quot;&amp;quot; &lt;br /&gt;
&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;&amp;lt;&lt;br /&gt;
&lt;br /&gt;
    \new Voice = &amp;quot;melody&amp;quot; \chant&lt;br /&gt;
&lt;br /&gt;
    \new Lyrics = &amp;quot;text&amp;quot; \lyricsto melody \verba&lt;br /&gt;
&lt;br /&gt;
  &amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  \layout {&lt;br /&gt;
&lt;br /&gt;
    \context {&lt;br /&gt;
&lt;br /&gt;
      \MensuralStaff&lt;br /&gt;
&lt;br /&gt;
      \remove Time_signature_engraver&lt;br /&gt;
&lt;br /&gt;
      &lt;br /&gt;
&lt;br /&gt;
      % The following line reduces the horizontal space between the &amp;quot;vaticana-do3&amp;quot; clef and the first neume (c1): &lt;br /&gt;
&lt;br /&gt;
      \override Clef.space-alist.first-note = #&#039;(minimum-fixed-space . 1.0) &lt;br /&gt;
&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    \context {&lt;br /&gt;
&lt;br /&gt;
      \Staff&lt;br /&gt;
&lt;br /&gt;
      \remove Time_signature_engraver&lt;br /&gt;
&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    \context {&lt;br /&gt;
&lt;br /&gt;
      \Voice&lt;br /&gt;
&lt;br /&gt;
      \remove Stem_engraver&lt;br /&gt;
&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;/lilypond&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;/div&gt;</summary>
		<author><name>Gabriel Ellsworth</name></author>
	</entry>
</feed>