<?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=Fsarud</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=Fsarud"/>
	<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/wiki/Special:Contributions/Fsarud"/>
	<updated>2026-05-09T06:10:29Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.44.2</generator>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=Splitting_chords&amp;diff=6479</id>
		<title>Splitting chords</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=Splitting_chords&amp;diff=6479"/>
		<updated>2026-03-22T16:52:16Z</updated>

		<summary type="html">&lt;p&gt;Fsarud: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This snippet is a 2009 contribution by Gilles Thibault in [https://lists.gnu.org/archive/html/lilypond-user/2009-01/msg00685.html lilypond-user]. It splits a chord sequence into two separated voices: the first one built on the first note (usually the lowest) of every chord and the other on the remaining notes. It works well in 2.24.4 and even in 2.25.35. I find it very useful. It also preserves articulations and slurs. The only drawback: it doesn&#039;t work if you use «q» to repeat last chord. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;lilypond version=&amp;quot;2.24&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 #(define (has-duration? music)&lt;br /&gt;
 (ly:duration? (ly:music-property music &#039;duration)))&lt;br /&gt;
 &lt;br /&gt;
 #(define (not-has-duration? music)&lt;br /&gt;
 (not (has-duration? music)))&lt;br /&gt;
 &lt;br /&gt;
 keepsOnlyFirstNote = #(define-music-function (parser location music) (ly:music?)&lt;br /&gt;
 (music-map&lt;br /&gt;
  (lambda (evt)&lt;br /&gt;
   (if (eq? &#039;EventChord (ly:music-property evt &#039;name))&lt;br /&gt;
      (let ((elts (ly:music-property evt &#039;elements)))&lt;br /&gt;
       (if (has-duration? (car elts))&lt;br /&gt;
            (ly:music-set-property! evt &#039;elements (cons&lt;br /&gt;
                 (car elts)&lt;br /&gt;
                 (filter not-has-duration? (cdr elts)))))))&lt;br /&gt;
  evt)&lt;br /&gt;
 music))&lt;br /&gt;
 &lt;br /&gt;
 deleteFirstNote = #(define-music-function (parser location music) (ly:music?)&lt;br /&gt;
 (music-map&lt;br /&gt;
  (lambda (evt)&lt;br /&gt;
   (if (eq? &#039;EventChord (ly:music-property evt &#039;name))&lt;br /&gt;
      (let ((elts (ly:music-property evt &#039;elements)))&lt;br /&gt;
           (if (has-duration? (car elts))&lt;br /&gt;
                (ly:music-set-property! evt &#039;elements  (cdr elts)))))&lt;br /&gt;
  evt)&lt;br /&gt;
 music))&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 music =\relative c&#039; {&lt;br /&gt;
 &amp;lt;c e&amp;gt;4-&amp;gt; &amp;lt;d f&amp;gt;( &amp;lt;b g&#039;&amp;gt;) &amp;lt;c e&amp;gt;-. g2 c2&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 \markup { Music with chords }&lt;br /&gt;
 \new Staff \music&lt;br /&gt;
 \markup { Music splitted in 2 staffs }&lt;br /&gt;
 &amp;lt;&amp;lt;&lt;br /&gt;
   \new Staff \deleteFirstNote \music&lt;br /&gt;
   \new Staff \keepsOnlyFirstNote \music&lt;br /&gt;
 &amp;gt;&amp;gt;&lt;br /&gt;
&amp;lt;/lilypond&amp;gt;&lt;/div&gt;</summary>
		<author><name>Fsarud</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=Splitting_chords&amp;diff=6478</id>
		<title>Splitting chords</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=Splitting_chords&amp;diff=6478"/>
		<updated>2026-03-22T16:40:35Z</updated>

		<summary type="html">&lt;p&gt;Fsarud: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This snippet is a 2009 contribution by Gilles Thibault in [https://lists.gnu.org/archive/html/lilypond-user/2009-01/msg00685.html lilypond-user]. It splits a chord sequence into two separated voices: the first one built on the first note (usually the lowest) of every chord and the other on the remaining notes. It works well in 2.24.4 and even in 2.25.35. I find it very useful. The only drawback it doesn&#039;t work if you use «q» to repeat last chord. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;lilypond version=&amp;quot;2.24&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 #(define (has-duration? music)&lt;br /&gt;
 (ly:duration? (ly:music-property music &#039;duration)))&lt;br /&gt;
 &lt;br /&gt;
 #(define (not-has-duration? music)&lt;br /&gt;
 (not (has-duration? music)))&lt;br /&gt;
 &lt;br /&gt;
 keepsOnlyFirstNote = #(define-music-function (parser location music) (ly:music?)&lt;br /&gt;
 (music-map&lt;br /&gt;
  (lambda (evt)&lt;br /&gt;
   (if (eq? &#039;EventChord (ly:music-property evt &#039;name))&lt;br /&gt;
      (let ((elts (ly:music-property evt &#039;elements)))&lt;br /&gt;
       (if (has-duration? (car elts))&lt;br /&gt;
            (ly:music-set-property! evt &#039;elements (cons&lt;br /&gt;
                 (car elts)&lt;br /&gt;
                 (filter not-has-duration? (cdr elts)))))))&lt;br /&gt;
  evt)&lt;br /&gt;
 music))&lt;br /&gt;
 &lt;br /&gt;
 deleteFirstNote = #(define-music-function (parser location music) (ly:music?)&lt;br /&gt;
 (music-map&lt;br /&gt;
  (lambda (evt)&lt;br /&gt;
   (if (eq? &#039;EventChord (ly:music-property evt &#039;name))&lt;br /&gt;
      (let ((elts (ly:music-property evt &#039;elements)))&lt;br /&gt;
           (if (has-duration? (car elts))&lt;br /&gt;
                (ly:music-set-property! evt &#039;elements  (cdr elts)))))&lt;br /&gt;
  evt)&lt;br /&gt;
 music))&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 music =\relative c&#039; {&lt;br /&gt;
 &amp;lt;c e&amp;gt;4-&amp;gt; &amp;lt;d f&amp;gt;( &amp;lt;b g&#039;&amp;gt;) &amp;lt;c e&amp;gt;-. g2 c2&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 \markup { Music with chords }&lt;br /&gt;
 \new Staff \music&lt;br /&gt;
 \markup { Music splitted in 2 staffs }&lt;br /&gt;
 &amp;lt;&amp;lt;&lt;br /&gt;
   \new Staff \deleteFirstNote \music&lt;br /&gt;
   \new Staff \keepsOnlyFirstNote \music&lt;br /&gt;
 &amp;gt;&amp;gt;&lt;br /&gt;
&amp;lt;/lilypond&amp;gt;&lt;/div&gt;</summary>
		<author><name>Fsarud</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=Splitting_chords&amp;diff=6477</id>
		<title>Splitting chords</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=Splitting_chords&amp;diff=6477"/>
		<updated>2026-03-22T14:17:01Z</updated>

		<summary type="html">&lt;p&gt;Fsarud: Add that it doesn&amp;#039;t work with q for repeating last chord&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This snippet is a 2009 contribution by Gilles Thibault in [https://lists.gnu.org/archive/html/lilypond-user/2009-01/msg00685.html lilypond-user]. It works well in 2.24.4 and even in 2.25.35. I find it very useful. (Beware: it doesn&#039;t work if you use «q» to repeat last chord). &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
 \version &amp;quot;2.24&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 #(define (has-duration? music)&lt;br /&gt;
 (ly:duration? (ly:music-property music &#039;duration)))&lt;br /&gt;
 &lt;br /&gt;
 #(define (not-has-duration? music)&lt;br /&gt;
 (not (has-duration? music)))&lt;br /&gt;
 &lt;br /&gt;
 keepsOnlyFirstNote = #(define-music-function (parser location music) (ly:music?)&lt;br /&gt;
 (music-map&lt;br /&gt;
  (lambda (evt)&lt;br /&gt;
   (if (eq? &#039;EventChord (ly:music-property evt &#039;name))&lt;br /&gt;
      (let ((elts (ly:music-property evt &#039;elements)))&lt;br /&gt;
       (if (has-duration? (car elts))&lt;br /&gt;
            (ly:music-set-property! evt &#039;elements (cons&lt;br /&gt;
                 (car elts)&lt;br /&gt;
                 (filter not-has-duration? (cdr elts)))))))&lt;br /&gt;
  evt)&lt;br /&gt;
 music))&lt;br /&gt;
 &lt;br /&gt;
 deleteFirstNote = #(define-music-function (parser location music) (ly:music?)&lt;br /&gt;
 (music-map&lt;br /&gt;
  (lambda (evt)&lt;br /&gt;
   (if (eq? &#039;EventChord (ly:music-property evt &#039;name))&lt;br /&gt;
      (let ((elts (ly:music-property evt &#039;elements)))&lt;br /&gt;
           (if (has-duration? (car elts))&lt;br /&gt;
                (ly:music-set-property! evt &#039;elements  (cdr elts)))))&lt;br /&gt;
  evt)&lt;br /&gt;
 music))&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 music =\relative c&#039; {&lt;br /&gt;
 &amp;lt;c e&amp;gt;4-&amp;gt; &amp;lt;d f&amp;gt;( &amp;lt;nowiki&amp;gt;&amp;lt;b g&#039;&amp;gt;) &amp;lt;c e&amp;gt;-. g2 c2&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 \markup { Music with chords }&lt;br /&gt;
 \new Staff \music&lt;br /&gt;
 \markup { Music splitted in 2 staffs }&lt;br /&gt;
 &amp;lt;&amp;lt;&lt;br /&gt;
   \new Staff \deleteFirstNote \music&lt;br /&gt;
   \new Staff \keepsOnlyFirstNote \music&lt;br /&gt;
 &amp;gt;&amp;gt;&lt;br /&gt;
&amp;lt;span&amp;gt;&amp;lt;/span&amp;gt;&lt;/div&gt;</summary>
		<author><name>Fsarud</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=Splitting_chords&amp;diff=6476</id>
		<title>Splitting chords</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=Splitting_chords&amp;diff=6476"/>
		<updated>2026-03-22T13:34:44Z</updated>

		<summary type="html">&lt;p&gt;Fsarud: Some scheme functions to split chords in two (monophonic) voices.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This snippet is a 2009 contribution by Gilles Thibault in [https://lists.gnu.org/archive/html/lilypond-user/2009-01/msg00685.html lilypond-user]. It works well in 2.24.4 and even in 2.25.35. I find it very useful.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lilypond version=&amp;quot;2.24&amp;quot;&amp;gt;&lt;br /&gt;
#(define (has-duration? music)&lt;br /&gt;
(ly:duration? (ly:music-property music &#039;duration)))&lt;br /&gt;
&lt;br /&gt;
#(define (not-has-duration? music)&lt;br /&gt;
(not (has-duration? music)))&lt;br /&gt;
&lt;br /&gt;
keepsOnlyFirstNote = #(define-music-function (parser location music) (ly:music?)&lt;br /&gt;
(music-map&lt;br /&gt;
 (lambda (evt)&lt;br /&gt;
  (if (eq? &#039;EventChord (ly:music-property evt &#039;name))&lt;br /&gt;
     (let ((elts (ly:music-property evt &#039;elements)))&lt;br /&gt;
      (if (has-duration? (car elts))&lt;br /&gt;
           (ly:music-set-property! evt &#039;elements (cons&lt;br /&gt;
                (car elts)&lt;br /&gt;
                (filter not-has-duration? (cdr elts)))))))&lt;br /&gt;
 evt)&lt;br /&gt;
music))&lt;br /&gt;
&lt;br /&gt;
deleteFirstNote = #(define-music-function (parser location music) (ly:music?)&lt;br /&gt;
(music-map&lt;br /&gt;
 (lambda (evt)&lt;br /&gt;
  (if (eq? &#039;EventChord (ly:music-property evt &#039;name))&lt;br /&gt;
     (let ((elts (ly:music-property evt &#039;elements)))&lt;br /&gt;
          (if (has-duration? (car elts))&lt;br /&gt;
               (ly:music-set-property! evt &#039;elements  (cdr elts)))))&lt;br /&gt;
 evt)&lt;br /&gt;
music))&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
music =\relative c&#039; {&lt;br /&gt;
&amp;lt;c e&amp;gt;4-&amp;gt; &amp;lt;d f&amp;gt;( &amp;lt;b g&#039;&amp;gt;) &amp;lt;c e&amp;gt;-. g2 c2&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
\markup { Music with chords }&lt;br /&gt;
\new Staff \music&lt;br /&gt;
\markup { Music splitted in 2 staffs }&lt;br /&gt;
&amp;lt;&amp;lt;&lt;br /&gt;
  \new Staff \deleteFirstNote \music&lt;br /&gt;
  \new Staff \keepsOnlyFirstNote \music&lt;br /&gt;
&amp;gt;&amp;gt;&lt;br /&gt;
&amp;lt;/lilypond&amp;gt;&lt;/div&gt;</summary>
		<author><name>Fsarud</name></author>
	</entry>
</feed>