From: Han-Wen Nienhuys Date: Thu, 21 Jul 2005 16:20:24 +0000 (+0000) Subject: * Documentation/user/basic-notation.itely (Barnumber check): add section. X-Git-Tag: release/2.7.3~24 X-Git-Url: https://git.donarmstrong.com/lilypond.git?a=commitdiff_plain;h=a6b24087a355d718d7ed76349e17532b4003710b;p=lilypond.git * Documentation/user/basic-notation.itely (Barnumber check): add section. * lily/lyric-engraver.cc (process_music): don't typeset text for _ syllable text. Instead, assume that the previous lyric text is a melismated text. --- diff --git a/ChangeLog b/ChangeLog index 03824edec8..b14a0fa275 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2005-07-21 Han-Wen Nienhuys + * 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. diff --git a/Documentation/user/basic-notation.itely b/Documentation/user/basic-notation.itely index cda2b3e357..b91855fbd4 100644 --- a/Documentation/user/basic-notation.itely +++ b/Documentation/user/basic-notation.itely @@ -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 diff --git a/lily/lyric-engraver.cc b/lily/lyric-engraver.cc index 2575553fe7..9e93dda444 100644 --- a/lily/lyric-engraver.cc +++ b/lily/lyric-engraver.cc @@ -40,6 +40,7 @@ private: Lyric_engraver::Lyric_engraver () { text_ = 0; + last_text_ = 0; event_ = 0; } diff --git a/ly/music-functions-init.ly b/ly/music-functions-init.ly index 9820fde39a..db7b4a031c 100644 --- a/ly/music-functions-init.ly +++ b/ly/music-functions-init.ly @@ -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 * ? %} +