From: Han-Wen Nienhuys Date: Wed, 31 Mar 2004 23:14:35 +0000 (+0000) Subject: * Documentation/user/tutorial.itely (Commenting input files): add X-Git-Tag: release/2.2.0~7 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=cd03f697b871aee6d880c3fa7672be3ab0c94866;p=lilypond.git * Documentation/user/tutorial.itely (Commenting input files): add note about convert-ly. * input/test/cadenza-skip.ly: new file. --- diff --git a/ChangeLog b/ChangeLog index 0bdf764d22..3afea1e1ce 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2004-04-01 Han-Wen Nienhuys + * Documentation/user/tutorial.itely (Commenting input files): add + note about convert-ly. + * input/test/cadenza-skip.ly: new file. 2004-03-31 Jan Nieuwenhuizen diff --git a/Documentation/user/tutorial.itely b/Documentation/user/tutorial.itely index 8fe2e53056..20a6a394ce 100644 --- a/Documentation/user/tutorial.itely +++ b/Documentation/user/tutorial.itely @@ -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 index 0000000000..dea1fba585 --- /dev/null +++ b/input/test/cadenza-skip.ly @@ -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 {} +}