<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.lilypond.community/index.php?action=history&amp;feed=atom&amp;title=Adding_articulations_from_a_template</id>
	<title>Adding articulations from a template - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.lilypond.community/index.php?action=history&amp;feed=atom&amp;title=Adding_articulations_from_a_template"/>
	<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=Adding_articulations_from_a_template&amp;action=history"/>
	<updated>2026-05-03T07:51:20Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.44.2</generator>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=Adding_articulations_from_a_template&amp;diff=4681&amp;oldid=prev</id>
		<title>Lemzwerg: New category</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=Adding_articulations_from_a_template&amp;diff=4681&amp;oldid=prev"/>
		<updated>2025-11-21T23:29:50Z</updated>

		<summary type="html">&lt;p&gt;New category&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 23:29, 21 November 2025&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l197&quot;&gt;Line 197:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 197:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Automatic notation]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Automatic notation]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Scheme]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Scheme]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Template]][[Category:Snippet]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Template]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Snippet]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Lemzwerg</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=Adding_articulations_from_a_template&amp;diff=3107&amp;oldid=prev</id>
		<title>Lemzwerg at 22:46, 21 November 2025</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=Adding_articulations_from_a_template&amp;diff=3107&amp;oldid=prev"/>
		<updated>2025-11-21T22:46:03Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 22:46, 21 November 2025&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l197&quot;&gt;Line 197:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 197:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Automatic notation]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Automatic notation]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Scheme]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Scheme]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Template]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Template&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;]][[Category:Snippet&lt;/ins&gt;]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Lemzwerg</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=Adding_articulations_from_a_template&amp;diff=2219&amp;oldid=prev</id>
		<title>Jean Abou Samra: Replace version=&quot;2.24.0&quot; with version=&quot;2.24&quot; now that the LilyWiki extension supports auto-selecting the latest release in a stable series</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=Adding_articulations_from_a_template&amp;diff=2219&amp;oldid=prev"/>
		<updated>2025-11-16T18:46:59Z</updated>

		<summary type="html">&lt;p&gt;Replace version=&amp;quot;2.24.0&amp;quot; with version=&amp;quot;2.24&amp;quot; now that the LilyWiki extension supports auto-selecting the latest release in a stable series&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 18:46, 16 November 2025&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l20&quot;&gt;Line 20:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 20:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Download the code of this function here : [http://gillesth.free.fr/Lilypond/copyArticulations/copyArticulations.ly copyArticulations.ly].&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Download the code of this function here : [http://gillesth.free.fr/Lilypond/copyArticulations/copyArticulations.ly copyArticulations.ly].&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;lilypond version=&quot;2.24&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;.0&lt;/del&gt;&quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;lilypond version=&quot;2.24&quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;%% http://lsr.di.unimi.it/LSR/Item?id=769&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;%% http://lsr.di.unimi.it/LSR/Item?id=769&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Jean Abou Samra</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=Adding_articulations_from_a_template&amp;diff=719&amp;oldid=prev</id>
		<title>Jean Abou Samra: Import snippet from LSR</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=Adding_articulations_from_a_template&amp;diff=719&amp;oldid=prev"/>
		<updated>2025-10-26T22:46:50Z</updated>

		<summary type="html">&lt;p&gt;Import snippet from LSR&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Repeating the same articulations a great number of time can be a bit time-consuming to enter.&lt;br /&gt;
&lt;br /&gt;
The function &amp;lt;code&amp;gt;copyArticulations&amp;lt;/code&amp;gt; here, automates the job by copying the articulations from a pattern into your music.&lt;br /&gt;
&lt;br /&gt;
As the music is rarely always the same, a few extra functions can give you some flexibility.&lt;br /&gt;
&lt;br /&gt;
The code of the image below is the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;  \copyArticulations &lt;br /&gt;
      { c( c) c-. c-. }          %% the pattern&lt;br /&gt;
      {                          %% the music&lt;br /&gt;
        c16 d e f g a b c b8 a g f&lt;br /&gt;
        \notCA e1&lt;br /&gt;
        \nSkipArti #2&lt;br /&gt;
        r8 d16 e f g a b c8 g e g&lt;br /&gt;
        \notCA c,1&lt;br /&gt;
      }  &amp;lt;/pre&amp;gt;&lt;br /&gt;
Here, &amp;lt;code&amp;gt;\notCA&amp;lt;/code&amp;gt; allows you to keep the music untouched and &amp;lt;code&amp;gt;\nSkipArti #2&amp;lt;/code&amp;gt; skips 2 notes (so 2 articulations) in the pattern.&lt;br /&gt;
&lt;br /&gt;
Download the code of this function here : [http://gillesth.free.fr/Lilypond/copyArticulations/copyArticulations.ly copyArticulations.ly].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lilypond version=&amp;quot;2.24.0&amp;quot;&amp;gt;&lt;br /&gt;
%% http://lsr.di.unimi.it/LSR/Item?id=769&lt;br /&gt;
&lt;br /&gt;
%% version 2013/04/14 for lilypond 2.16 or higher&lt;br /&gt;
%% last changes : &lt;br /&gt;
%%   - fix a bug for \notCopyArticulations and q chords (has-notes? must&lt;br /&gt;
%%     be called)&lt;br /&gt;
  &lt;br /&gt;
&lt;br /&gt;
#(use-modules (ice-9 receive)) %% for the use of receive&lt;br /&gt;
&lt;br /&gt;
#(define skipCurrentArticulationTag (gensym))&lt;br /&gt;
#(define notCopyArticulationsTag (gensym))&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
#(define (defined-music? music)&lt;br /&gt;
   (not (eq? &amp;#039;Music (ly:music-property music &amp;#039;name))))&lt;br /&gt;
&lt;br /&gt;
#(define (name-of music)&lt;br /&gt;
 (ly:music-property music &amp;#039;name))&lt;br /&gt;
&lt;br /&gt;
#(define (noteEvent? music)&lt;br /&gt;
(eq? (name-of music) &amp;#039;NoteEvent))&lt;br /&gt;
 &lt;br /&gt;
#(define (has-notes? music)&lt;br /&gt;
&amp;quot;Return true if there is at least one note in `music, false otherwise.&amp;quot;&lt;br /&gt;
 (or (noteEvent? music)&lt;br /&gt;
     (let ((e (ly:music-property music &amp;#039;element)))&lt;br /&gt;
        (and (ly:music? e) &lt;br /&gt;
             (has-notes? e)))&lt;br /&gt;
     (let loop ((es (ly:music-property music &amp;#039;elements)))&lt;br /&gt;
        (and (pair? es)&lt;br /&gt;
             (or (has-notes? (car es))&lt;br /&gt;
                 (loop (cdr es)))))))&lt;br /&gt;
&lt;br /&gt;
#(define (make-arti-list pattern)&lt;br /&gt;
&amp;quot;Make a list of articulations &amp;quot;&lt;br /&gt;
 (let ((res &amp;#039;()))     ; the list to fill&lt;br /&gt;
   (for-some-music    ; see music-functions.scm&lt;br /&gt;
     (lambda (evt)&lt;br /&gt;
       (case (name-of evt)&lt;br /&gt;
         ((EventChord)&lt;br /&gt;
           (receive (notes others)&lt;br /&gt;
             (partition noteEvent? (ly:music-property evt &amp;#039;elements))&lt;br /&gt;
             (if (pair? notes)&lt;br /&gt;
                 (set! res (cons others res)))))&lt;br /&gt;
             ; keeps only not note events&lt;br /&gt;
         ((NoteEvent)&lt;br /&gt;
           (set! res (cons (ly:music-property evt &amp;#039;articulations) res)))&lt;br /&gt;
         (else #f)))&lt;br /&gt;
     pattern)&lt;br /&gt;
   (reverse res)))&lt;br /&gt;
&lt;br /&gt;
%% use (ly:music-deep-copy music) for a direct use of copy-articulations&lt;br /&gt;
#(define (copy-articulations pattern music)&lt;br /&gt;
&amp;quot;Copy articulations of `pattern recursively in each notes of music.&amp;quot;&lt;br /&gt;
(if (not (has-notes? pattern))              ; avoid endless loops ...&lt;br /&gt;
  music&lt;br /&gt;
  (let* ((new-arti (make-arti-list pattern))&lt;br /&gt;
         (pointer-list new-arti)&lt;br /&gt;
         (current-arti (lambda ()&lt;br /&gt;
            (let ((res (car pointer-list)))&lt;br /&gt;
              (set! pointer-list (cdr pointer-list))&lt;br /&gt;
              (if (null? pointer-list)(set! pointer-list new-arti))&lt;br /&gt;
              res))))&lt;br /&gt;
    (music-filter&lt;br /&gt;
      defined-music?                        ; deletes all (make-music &amp;#039;Music)&lt;br /&gt;
      (map-some-music ; see music-functions.scm&lt;br /&gt;
        (lambda(evt)&lt;br /&gt;
          (let ((tags (ly:music-property evt &amp;#039;tags)))&lt;br /&gt;
             (cond &lt;br /&gt;
               ((memq skipCurrentArticulationTag tags); yes =&amp;gt; evt = &amp;lt;&amp;gt;&lt;br /&gt;
                     (current-arti)                ; ignores return&lt;br /&gt;
                     (make-music &amp;#039;Music))          ; will be deleted...&lt;br /&gt;
               ((memq notCopyArticulationsTag tags)&lt;br /&gt;
                   (ly:music-set-property! evt &amp;#039;tags ; just remove the tag&lt;br /&gt;
                        (delq notCopyArticulationsTag tags))&lt;br /&gt;
                   evt)&lt;br /&gt;
               ((noteEvent? evt)&lt;br /&gt;
                   (let ((arti (ly:music-property evt &amp;#039;articulations)))&lt;br /&gt;
                     (ly:music-set-property! evt &amp;#039;articulations&lt;br /&gt;
                       (append arti (current-arti)))&lt;br /&gt;
                     evt))&lt;br /&gt;
               ((eq? &amp;#039;EventChord (name-of evt))&lt;br /&gt;
                   (let ((elts (ly:music-property evt &amp;#039;elements)))&lt;br /&gt;
                     (and &lt;br /&gt;
                      (pair? (filter noteEvent? elts))&lt;br /&gt;
                      (begin&lt;br /&gt;
                       (ly:music-set-property! evt &amp;#039;elements&lt;br /&gt;
                                 (append elts (current-arti)))&lt;br /&gt;
                       evt))))&lt;br /&gt;
               (else (and (ly:music-property evt &amp;#039;duration #f)&lt;br /&gt;
                          evt)))))&lt;br /&gt;
          (expand-repeat-chords! (list &amp;#039;rhythmic-event) music))))))&lt;br /&gt;
 &lt;br /&gt;
copyArticulations = #(define-music-function (pattern music)&lt;br /&gt;
                                                          (ly:music? ly:music?)&lt;br /&gt;
&amp;quot;Copy articulations of `pattern recursively in each notes of music.&amp;quot;&lt;br /&gt;
 (copy-articulations pattern music))&lt;br /&gt;
&lt;br /&gt;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%&lt;br /&gt;
%% enhancement functions, working inside the music parameter &lt;br /&gt;
%% of \copyArticulations&lt;br /&gt;
                         %%%%%%%&lt;br /&gt;
notCopyArticulations = &lt;br /&gt;
#(define-music-function (music)(ly:music?)&lt;br /&gt;
&amp;quot;Add a special tag in &amp;#039;tags of all notes and chords, that will forbid &lt;br /&gt;
articulations to be copied to these events.&amp;quot;&lt;br /&gt;
(map-some-music&lt;br /&gt;
 (lambda(evt)&lt;br /&gt;
   (cond ((memq (name-of evt) &amp;#039;(NoteEvent EventChord))&lt;br /&gt;
            (ly:music-set-property! evt &amp;#039;tags (cons&lt;br /&gt;
               notCopyArticulationsTag (ly:music-property evt &amp;#039;tags)))&lt;br /&gt;
            evt)&lt;br /&gt;
          (else #f))) ; go deeper&lt;br /&gt;
 music))&lt;br /&gt;
&lt;br /&gt;
skipArti = \tag #skipCurrentArticulationTag &amp;lt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
nSkipArti = #(define-music-function (n)(integer?)&lt;br /&gt;
&amp;quot;Return \\skipArti \\skipArti \\skipArti ... n times.&amp;quot;&lt;br /&gt;
(if (&amp;lt; n 2)&lt;br /&gt;
  skipArti&lt;br /&gt;
 (make-sequential-music (make-list n skipArti))))&lt;br /&gt;
 &lt;br /&gt;
skipTiedNotes = #(define-music-function (music)(ly:music?)&lt;br /&gt;
&amp;quot;Add a special tag in &amp;#039;tags of second tied notes to forbid articulations to be &lt;br /&gt;
copied.&amp;quot;&lt;br /&gt;
(let ((prev-was-tied #f))&lt;br /&gt;
(map-some-music&lt;br /&gt;
  (lambda(evt)&lt;br /&gt;
    (let ((name (name-of evt)))&lt;br /&gt;
      (cond &lt;br /&gt;
        ((or (eq? name &amp;#039;NoteEvent)&lt;br /&gt;
             (and (eq? name &amp;#039;EventChord)&lt;br /&gt;
                  (has-notes? evt)))&lt;br /&gt;
           (if prev-was-tied (ly:music-set-property! evt &amp;#039;tags &lt;br /&gt;
                    (cons notCopyArticulationsTag (ly:music-property evt &amp;#039;tags))))&lt;br /&gt;
           (map-some-music&lt;br /&gt;
             (lambda(x)&lt;br /&gt;
               (set! prev-was-tied (and (eq? (name-of x) &amp;#039;TieEvent) x))&lt;br /&gt;
               prev-was-tied)  ; stop if true&lt;br /&gt;
             evt))&lt;br /&gt;
        (else #f))))&lt;br /&gt;
  music)))&lt;br /&gt;
&lt;br /&gt;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%&lt;br /&gt;
                      %% shortcuts %%&lt;br /&gt;
&lt;br /&gt;
artiI = c-.              % default values for artiI and artiII, if the user does          &lt;br /&gt;
artiII = {c( c) c-. c-.} % not define them, before using \cAI and \cAII&lt;br /&gt;
&lt;br /&gt;
cAI = #(define-music-function (music) (ly:music?)&lt;br /&gt;
#{ \copyArticulations \artiI $music #})&lt;br /&gt;
&lt;br /&gt;
cAII = #(define-music-function (music) (ly:music?)&lt;br /&gt;
#{ \copyArticulations \artiII $music #})&lt;br /&gt;
&lt;br /&gt;
#(define cA copyArticulations)&lt;br /&gt;
#(define notCA notCopyArticulations)&lt;br /&gt;
&lt;br /&gt;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%&lt;br /&gt;
 &lt;br /&gt;
 \new Voice \relative c&amp;#039; { &lt;br /&gt;
  \copyArticulations { c( c) c-. c-. }  &lt;br /&gt;
  { &lt;br /&gt;
    c16 d e f g a b c b8 a g f&lt;br /&gt;
    \notCA e1&lt;br /&gt;
    \nSkipArti #2&lt;br /&gt;
    r8 d16 e f g a b c8 g e g&lt;br /&gt;
    \notCA c,1&lt;br /&gt;
  }  &lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lilypond&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Automatic notation]]&lt;br /&gt;
[[Category:Scheme]]&lt;br /&gt;
[[Category:Template]]&lt;/div&gt;</summary>
		<author><name>Jean Abou Samra</name></author>
	</entry>
</feed>