]> git.donarmstrong.com Git - lilypond.git/commitdiff
(skip->rest): add skip->rest
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Thu, 12 Jan 2006 00:52:29 +0000 (00:52 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Thu, 12 Jan 2006 00:52:29 +0000 (00:52 +0000)
ChangeLog
scm/music-functions.scm

index 2255eaf9d62f375890dbfcfffb46225e54cf926f..b33386d10e778ba4543f2926573f439392a1ece9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2006-01-12  Han-Wen Nienhuys  <hanwen@xs4all.nl>
+
+       * scm/music-functions.scm (skip->rest): add skip->rest
+
 2006-01-11  Han-Wen Nienhuys  <hanwen@xs4all.nl>
 
        * lily/font-config.cc (init_fontconfig): call FcConfigBuildFonts()
index 70fcf0606a1a4b41e58ecf49d64f0feeb6869c75..0074d3a1f6dd2b99846eab91ef52b517892e0d0d 100644 (file)
@@ -583,6 +583,17 @@ of beat groupings "
     (set! (ly:music-property m 'procedure) checker)
     m))
 
+
+(define-public (skip->rest mus)
+
+  "Replace MUS by RestEvent of the same duration if it is a
+SkipEvent. Useful for extracting parts from crowded scores"
+
+  (if (equal? (ly:music-property mus 'name) 'SkipEvent)
+   (make-music 'RestEvent 'duration (ly:music-property mus 'duration))
+   mus))
+
+
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; warn for bare chords at start.