]> git.donarmstrong.com Git - lilypond.git/commitdiff
* Documentation/user/basic-notation.itely (Barnumber check): add section.
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Thu, 21 Jul 2005 16:20:24 +0000 (16:20 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Thu, 21 Jul 2005 16:20:24 +0000 (16:20 +0000)
* lily/lyric-engraver.cc (process_music): don't typeset text for _
syllable text. Instead, assume that the previous lyric text is a
melismated text.

ChangeLog
Documentation/user/basic-notation.itely
lily/lyric-engraver.cc
ly/music-functions-init.ly

index 03824edec819b18efae7878809c42410baa2573a..b14a0fa2752f0a6f301ff2056eb382a09e49f577 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 2005-07-21  Han-Wen Nienhuys  <hanwen@xs4all.nl>
 
+       * Documentation/user/basic-notation.itely (Barnumber check): add section.
+
        * scm/music-functions.scm (skip-to-last): new function. Show only
        last showLastLength part of the \score.
 
index cda2b3e3577da480b2407d4d99ca18585a45a2ec..b91855fbd428e1450b0d4278ad40a5223aa72e72 100644 (file)
@@ -490,6 +490,7 @@ website for more information.
 * Octave check::                
 * Transpose::                   
 * Bar check::                   
+* Barnumber check::             
 * Skipping corrected music::    
 * Automatic note splitting::    
 @end menu
@@ -749,6 +750,23 @@ pipeSymbol = \bar "||"
 @end lilypond
 
 
+@node Barnumber check
+@subsection Barnumber check
+
+When copying large pieces of music, it can be helpful to check that
+the LilyPond bar number corresponds to the original that you are
+entering from.  This can be checked with @code{\barNumberCheck}, for
+example, 
+
+@verbatim
+\barNumberCheck #123
+@end verbatim
+
+@noindent
+will print a warning if the @code{currentBarNumber} is not 123 when it
+is processed.
+
+
 @node Skipping corrected music
 @subsection Skipping corrected music
 
index 2575553fe704beed8a6a965052def8626bca3fce..9e93dda4440a933d0840f93b883a42bd551d08c4 100644 (file)
@@ -40,6 +40,7 @@ private:
 Lyric_engraver::Lyric_engraver ()
 {
   text_ = 0;
+  last_text_ = 0;
   event_ = 0;
 }
 
index 9820fde39a80403371e6fb3c07dfd26c10c0047a..db7b4a031c5d626a805e8860bbdb66024f2b2d95 100644 (file)
@@ -190,6 +190,20 @@ afterGrace =
        (make-music 'GraceMusic
                    'element grace)))))))
 
+
+barNumberCheck =
+#(def-music-function (parser location n) (integer?)
+   (make-music 'ApplyContext 
+              'origin location
+              'procedure 
+              (lambda (c)
+                (let*
+                    ((cbn (ly:context-property c 'currentBarNumber)))
+                  (if (not (= cbn n))
+                      (ly:input-message location "Barcheck failed got ~a expect ~a"
+                                        cbn n))))))
+
+
 %{
 
 TODO:
@@ -204,3 +218,4 @@ with small syntax changes, we could also do
  *  ?
 
 %}
+