]> git.donarmstrong.com Git - lilypond.git/commitdiff
* Documentation/user/tutorial.itely (Commenting input files): add
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Wed, 31 Mar 2004 23:14:35 +0000 (23:14 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Wed, 31 Mar 2004 23:14:35 +0000 (23:14 +0000)
note about convert-ly.

* input/test/cadenza-skip.ly:  new file.

ChangeLog
Documentation/user/tutorial.itely
input/test/cadenza-skip.ly [new file with mode: 0644]

index 0bdf764d22d039a88020e5673bf228aa342affca..3afea1e1ce9ae59d2c6ca1adcb2055430c7db37a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2004-04-01  Han-Wen Nienhuys   <hanwen@xs4all.nl>
 
+       * Documentation/user/tutorial.itely (Commenting input files): add
+       note about convert-ly.
+
        * input/test/cadenza-skip.ly:  new file.
 
 2004-03-31  Jan Nieuwenhuizen  <janneke@gnu.org>
index 8fe2e53056f1b289c0b72dc48f5e895f3c6fa9e8..20a6a394ce827d183b399085fc56db0e210c4b80 100644 (file)
@@ -975,7 +975,18 @@ c4 c  g' g  a a
 %@}
 @end example
 
+There is a special statement that really is a kind of comment. The
+version statement marks for which version of LilyPond the file was
+written. To mark a file for version 2.1.17, use
 
+@example
+\version "2.1.17"
+@end example
+
+These annotations make future upgrades of LilyPond go more
+smoothly. Changes in the syntax are handled with a special program,
+@file{convert-ly} (see @ref{Invoking convert-ly}), and it uses
+@code{\version} to determine what rules to apply.
 
 
 @node Printing lyrics
diff --git a/input/test/cadenza-skip.ly b/input/test/cadenza-skip.ly
new file mode 100644 (file)
index 0000000..dea1fba
--- /dev/null
@@ -0,0 +1,52 @@
+\header {
+
+
+    texidoc = "A second staff can be aligned to a fragment (say, a
+    cadenza) from the first staff, using a Scheme function: the
+    function creates a skip of the same length as the cadenza. "
+
+   }
+
+\version "2.1.37"
+
+cadenza = \notes \relative c' {
+    c4 d8 << { e f g } \\ { d4. } >>
+    g4 f2 g4 g
+}
+
+
+#(define (skip-of-length mus)
+  "Create a skip of exactle the same length as MUS."
+  (let*
+   ((skip
+     (make-music
+      'SkipEvent
+      'duration (ly:make-duration 0 0))))
+
+   (make-event-chord (list (ly:music-compress skip (ly:music-length mus))))
+))
+
+
+#(define (mmrest-of-length mus)
+  "Create a mmrest of exactly the same length as MUS."
+  
+  (let*
+   ((skip
+     (make-multi-measure-rest
+      (ly:make-duration 0 0) '() )))
+   (ly:music-compress skip (ly:music-length mus))
+   skip
+))
+
+
+\score {
+    \notes
+    \relative c' \new GrandStaff <<
+       \new Staff { \cadenza c4 \bar "|." }
+       \new Staff {
+           #(ly:export (mmrest-of-length cadenza))
+           c4 \bar "|." }
+    >>
+
+    \paper {}
+}