Le Thu, 20 Sep 2012 12:46:14 +0200, Stefan Thomas <kontrapunktste...@gmail.com> a écrit:

\include "changepitch.ly"
 AV = { c8 c4 }
 av = #(define-music-function (parser location x) (ly:music?)
 #{
 \context Voice << { \changePitch \AV { $x $x } } { s8 ~ s8 } >>
 #})
 \new Staff \relative c' {
 c4. \av es f4 fis4 \av fis g4
 }

In changePitch.ly, there is a special function called \samePitch which can be used for ties
[ It is shortly described in chapter 6 and 7 of changePitch-doc.pdf at
  http://gillesth.free.fr/Lilypond/changePitch/   ]

%%%%%%%%%%%%%
\include "changePitch.ly"

av = #(define-music-function (parser location x) (ly:music?)
 #{
  \changePitch \samePitch { c8 ~ c4 } $x
 #})

\new Staff \relative c' {
   c4. \av es f4
   fis4. \av fis g4
}
%%%%%%%%%%%%%
This example should work with any number of ties, but of course, will produce music with the rhythm you set as pattern.

--
Gilles

_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to