CVSROOT:        /cvsroot/lilypond
Module name:    lilypond
Branch:         
Changes by:     Han-Wen Nienhuys <[EMAIL PROTECTED]>    05/07/21 14:45:55

Modified files:
        .              : ChangeLog 
        Documentation  : index.html.in 
        Documentation/topdocs: NEWS.tely 
        Documentation/user: basic-notation.itely 
                            instrument-notation.itely 
        lily           : accidental-engraver.cc lyric-engraver.cc 
                         moment-scheme.cc parser.yy 
        python         : convertrules.py 
        scm            : auto-beam.scm music-functions.scm safe-lily.scm 
Added files:
        input/regression: lyric-melisma-manual.ly 

Log message:
        * scm/music-functions.scm (skip-to-last): new function. Show only
        last showLastLength part of the \score.
        
        * lily/moment-scheme.cc (LY_DEFINE): new function ly:moment-sub
        
        * python/convertrules.py (conv): add ly:x-moment rule
        
        * lily/moment-scheme.cc (LY_DEFINE): rename ly:X-moment  -> ly:moment-X
        
        * Documentation/topdocs/NEWS.tely (Top): add new feature.
        
        * Documentation/user/instrument-notation.itely (Flexibility in
        alignment): options in subsections.
        
        * lily/lyric-engraver.cc (process_music): don't typeset text for _
        syllable text. Instead, assume that the previous lyric text is a
        melismated text.
        
        * Documentation/index.html.in: revert 800x600 change.

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/ChangeLog.diff?tr1=1.3906&tr2=1.3907&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/Documentation/index.html.in.diff?tr1=1.26&tr2=1.27&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/Documentation/topdocs/NEWS.tely.diff?tr1=1.44&tr2=1.45&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/Documentation/user/basic-notation.itely.diff?tr1=1.27&tr2=1.28&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/Documentation/user/instrument-notation.itely.diff?tr1=1.37&tr2=1.38&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/input/regression/lyric-melisma-manual.ly?rev=1.1
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/lily/accidental-engraver.cc.diff?tr1=1.104&tr2=1.105&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/lily/lyric-engraver.cc.diff?tr1=1.80&tr2=1.81&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/lily/moment-scheme.cc.diff?tr1=1.8&tr2=1.9&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/lily/parser.yy.diff?tr1=1.481&tr2=1.482&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/python/convertrules.py.diff?tr1=1.7&tr2=1.8&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/scm/auto-beam.scm.diff?tr1=1.26&tr2=1.27&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/scm/music-functions.scm.diff?tr1=1.149&tr2=1.150&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/scm/safe-lily.scm.diff?tr1=1.34&tr2=1.35&r1=text&r2=text

Patches:
Index: lilypond/ChangeLog
diff -u lilypond/ChangeLog:1.3906 lilypond/ChangeLog:1.3907
--- lilypond/ChangeLog:1.3906   Thu Jul 21 12:14:34 2005
+++ lilypond/ChangeLog  Thu Jul 21 14:45:52 2005
@@ -1,3 +1,25 @@
+2005-07-21  Han-Wen Nienhuys  <[EMAIL PROTECTED]>
+
+       * scm/music-functions.scm (skip-to-last): new function. Show only
+       last showLastLength part of the \score.
+
+       * lily/moment-scheme.cc (LY_DEFINE): new function ly:moment-sub
+
+       * python/convertrules.py (conv): add ly:x-moment rule
+
+       * lily/moment-scheme.cc (LY_DEFINE): rename ly:X-moment  -> ly:moment-X
+
+       * Documentation/topdocs/NEWS.tely (Top): add new feature.
+
+       * Documentation/user/instrument-notation.itely (Flexibility in
+       alignment): options in subsections.
+
+       * lily/lyric-engraver.cc (process_music): don't typeset text for _
+       syllable text. Instead, assume that the previous lyric text is a
+       melismated text.
+
+       * Documentation/index.html.in: revert 800x600 change.
+
 2005-07-19  Jan Nieuwenhuizen  <[EMAIL PROTECTED]>
 
        * lily/main.cc (main): Remove invalid handle kludge.
Index: lilypond/Documentation/index.html.in
diff -u lilypond/Documentation/index.html.in:1.26 
lilypond/Documentation/index.html.in:1.27
--- lilypond/Documentation/index.html.in:1.26   Wed Jul 20 12:05:34 2005
+++ lilypond/Documentation/index.html.in        Thu Jul 21 14:45:54 2005
@@ -7,7 +7,6 @@
           content="Top-level index to the standard documentation for
                    LilyPond @TOPLEVEL_VERSION@">
     <style type="text/css">
-      body { width: 760px; }
     .navigation         { background-color: #e8ffe8;
                          padding: 2; border: #c0ffc0 1px solid;
                          text-align: center;
Index: lilypond/Documentation/topdocs/NEWS.tely
diff -u lilypond/Documentation/topdocs/NEWS.tely:1.44 
lilypond/Documentation/topdocs/NEWS.tely:1.45
--- lilypond/Documentation/topdocs/NEWS.tely:1.44       Thu Jul 21 12:14:35 2005
+++ lilypond/Documentation/topdocs/NEWS.tely    Thu Jul 21 14:45:54 2005
@@ -32,6 +32,17 @@
 
 
 @itemize @bullet
[EMAIL PROTECTED]
+Melismata can be specified simply in the lyrics now, eg.
+
[EMAIL PROTECTED],verbatim,fragment]
+\relative {
+  c d( e) f e
+\addlyrics
+ { Ky -- _ _ ri e }
[EMAIL PROTECTED] lilypond 
+
+This feature was sponsored by Nancho Alvarez 
 
 @item
 Suggested accidentals (for notating musica ficta) may be switched on
Index: lilypond/Documentation/user/basic-notation.itely
diff -u lilypond/Documentation/user/basic-notation.itely:1.27 
lilypond/Documentation/user/basic-notation.itely:1.28
--- lilypond/Documentation/user/basic-notation.itely:1.27       Mon Jul 18 
23:37:24 2005
+++ lilypond/Documentation/user/basic-notation.itely    Thu Jul 21 14:45:55 2005
@@ -752,13 +752,28 @@
 @node Skipping corrected music
 @subsection Skipping corrected music
 
+
 @cindex @code{skipTypesetting}
[EMAIL PROTECTED] @code{showLastLength}
+
+When entering or copying music, only the music near the end (where you
+are adding notes) is interesting to view and correct.  To speed up
+this correction process, it is possible to skip typesetting of all but
+the last few measures. This is achieved by putting
+
[EMAIL PROTECTED]
+showLastLength = R1*5
[EMAIL PROTECTED] verbatim
+
[EMAIL PROTECTED]
+in your source file. This will render only the last 5 measures
+(assuming 4/4 time signature) of every @code{\score} in the input
+file. For longer pieces, rendering only a small part is often an order
+of magnitude quicker than rendering it completely
 
-The property @code{Score.skipTypesetting} can be used to switch on and
-off typesetting completely during the interpretation phase.  When
-typesetting is switched off, the music is processed much more
-quickly.  This can be used to skip over the parts of a score that
-have already been checked for errors
+Skipping parts of a score can be controlled in a more fine-grained
+fashing with the property @code{Score.skipTypesetting}.  When it is
+set, no typesetting is performed at all.
 
 @lilypond[quote,fragment,raggedright,verbatim]
 \relative c'' {
Index: lilypond/Documentation/user/instrument-notation.itely
diff -u lilypond/Documentation/user/instrument-notation.itely:1.37 
lilypond/Documentation/user/instrument-notation.itely:1.38
--- lilypond/Documentation/user/instrument-notation.itely:1.37  Thu Jul 21 
12:14:35 2005
+++ lilypond/Documentation/user/instrument-notation.itely       Thu Jul 21 
14:45:55 2005
@@ -838,15 +838,15 @@
 
 @lilypond[quote,verbatim,raggedright]
 \score {
-<<
+ <<
   \new Staff \relative c'' {
     \time 1/4 c16 c c c c16 c c c c16 c c c
-  } % closes notes
+  }
   \lyricmode { \new Lyrics
     \with {
-    \override SeparationItem #'padding = #0.0
+      \override SeparationItem #'padding = #0.0
       % Otherwise lyrics are so far apart that hyphens don't disappear
-    } % closes with
+    } 
     {
       An -- ti -- cons -- ti --
       tu -- tion -- nel -- le --
@@ -854,17 +854,17 @@
       \override LyricHyphen  #'spacing-procedure =
         #Hyphen_spanner::set_spacing_rods
       men -- taire -- ment. ouf~!
-    } % closes lyrics
-  } %closes lyricmode
->>
-\layout   {
+    }
+  }
+ >>
+ \layout   {
   indent = 0.0 \cm
   linewidth = 3.4 \cm
   \context {
     \Staff \remove "Time_signature_engraver"
-  } % closes context
-} % closes layout
-} % closes score
+  }
+ }
+}
 @end lilypond
 
 @seealso
@@ -1033,11 +1033,13 @@
 @node Flexibility in alignment
 @subsection Flexibility in alignment
 
-
 Often, different stanzas of one song are put to one melody in slightly
 differing ways.  Such variations can still be captured with
 @code{\lyricsto}.
 
[EMAIL PROTECTED] Lyrics to multiple notes of a melisma 
+
+
 One possibility is that the text has a melisma in one stanza, but
 multiple syllables in another one.  One solution is to make the faster
 voice ignore the melisma.  This is done by setting
@@ -1085,6 +1087,11 @@
 }
 @end lilypond
 
+
[EMAIL PROTECTED] Switching the melody associated with a lyrics line
+
+
+
 More complex variations in text underlay are possible.  It is possible
 to switch the melody for a line of lyrics during the text.  This is
 done by setting the @code{associatedVoice} property.  In the example
@@ -1165,6 +1172,31 @@
 @code{lahlah} to @code{associatedVoice}.
 
 
+
[EMAIL PROTECTED] Specifying melismata within the lyrics
+
+It is also possible to define melismata entirely in the lyrics. This
+can be done by entering @code{_} for every note that is part of the
+melisma. 
+
[EMAIL PROTECTED],verbatim,fragment] 
+{ \set melismaBusyProperties = #'()
+  c d( e) f f( e) e e  }
+\addlyrics
+ { Ky -- _ _ ri __ _ _ _  e }
[EMAIL PROTECTED] lilypond
+
+In this case, you can also have ties and slurs in the melody, if you
+set @code{melismaBusyProperties}, as is done in the example above.
+
[EMAIL PROTECTED],verbatim,fragment]
+{
+ \set melismaBusyProperties = #'()
+  c d( e) f f( e) e e
+}
+\addlyrics
+ { Ky -- _ _ ri __ _ _ _  e }
[EMAIL PROTECTED] lilypond
 
 
 @node More stanzas
Index: lilypond/lily/accidental-engraver.cc
diff -u lilypond/lily/accidental-engraver.cc:1.104 
lilypond/lily/accidental-engraver.cc:1.105
--- lilypond/lily/accidental-engraver.cc:1.104  Thu Jul 21 12:14:35 2005
+++ lilypond/lily/accidental-engraver.cc        Thu Jul 21 14:45:55 2005
@@ -372,7 +372,7 @@
   Pitch *pitch = unsmob_pitch (note->get_property ("pitch"));
   
   
-  bool as_suggestion = get_property ("suggestAccidentals");
+  bool as_suggestion = to_boolean (get_property ("suggestAccidentals"));
   Grob *a = 0;
   if (as_suggestion)
     a = make_suggested_accidental (note, support, entry->origin_engraver_);
Index: lilypond/lily/lyric-engraver.cc
diff -u lilypond/lily/lyric-engraver.cc:1.80 
lilypond/lily/lyric-engraver.cc:1.81
--- lilypond/lily/lyric-engraver.cc:1.80        Mon Jul 18 23:37:25 2005
+++ lilypond/lily/lyric-engraver.cc     Thu Jul 21 14:45:55 2005
@@ -32,7 +32,8 @@
 private:
   Music *event_;
   Item *text_;
-
+  Item *last_text_;
+  
   Context *get_voice_context ();
 };
 
@@ -58,8 +59,18 @@
 {
   if (event_)
     {
-      text_ = make_item ("LyricText", event_->self_scm ());
-      text_->set_property ("text", event_->get_property ("text"));
+      SCM text = event_->get_property ("text");
+      
+      if (ly_is_equal (text, scm_makfrom0str (" ")))
+       {
+         if (last_text_)
+           last_text_->set_property ("self-alignment-X", scm_int2num (LEFT));
+       }
+      else
+       {
+         text_ = make_item ("LyricText", event_->self_scm ());
+         text_->set_property ("text", text);
+       }
     }
 }
 
@@ -138,7 +149,8 @@
                text_->set_property ("self-alignment-X", scm_int2num (LEFT));
            }
        }
-
+         
+      last_text_ = text_;
       text_ = 0;
     }
   event_ = 0;
Index: lilypond/lily/moment-scheme.cc
diff -u lilypond/lily/moment-scheme.cc:1.8 lilypond/lily/moment-scheme.cc:1.9
--- lilypond/lily/moment-scheme.cc:1.8  Thu Apr 21 14:28:31 2005
+++ lilypond/lily/moment-scheme.cc      Thu Jul 21 14:45:55 2005
@@ -42,7 +42,19 @@
                 Rational (grace_num, grace_den)).smobbed_copy ();
 }
 
-LY_DEFINE (ly_add_moment, "ly:add-moment",
+
+LY_DEFINE (ly_sub_moment, "ly:moment-sub",
+          2, 0, 0, (SCM a, SCM b),
+          "Subtract two moments.")
+{
+  Moment *ma = unsmob_moment (a);
+  Moment *mb = unsmob_moment (b);
+  SCM_ASSERT_TYPE (ma, a, SCM_ARG1, __FUNCTION__, "moment");
+  SCM_ASSERT_TYPE (mb, b, SCM_ARG2, __FUNCTION__, "moment");
+  return (*ma - *mb).smobbed_copy ();
+}
+
+LY_DEFINE (ly_moment_add, "ly:moment-add",
           2, 0, 0, (SCM a, SCM b),
           "Add two moments.")
 {
@@ -53,7 +65,7 @@
   return (*ma + *mb).smobbed_copy ();
 }
 
-LY_DEFINE (ly_mul_moment, "ly:mul-moment",
+LY_DEFINE (ly_moment_mul, "ly:moment-mul",
           2, 0, 0, (SCM a, SCM b),
           "Multiply two moments.")
 {
@@ -64,7 +76,7 @@
   return (*ma * * mb).smobbed_copy ();
 }
 
-LY_DEFINE (ly_div_moment, "ly:div-moment",
+LY_DEFINE (ly_moment_div, "ly:moment-div",
           2, 0, 0, (SCM a, SCM b),
           "Divide two moments.")
 {
@@ -75,7 +87,7 @@
   return (*ma / * mb).smobbed_copy ();
 }
 
-LY_DEFINE (ly_mod_moment, "ly:mod-moment",
+LY_DEFINE (ly_moment_mod, "ly:moment-mod",
           2, 0, 0, (SCM a, SCM b),
           "Modulo of two moments.")
 {
Index: lilypond/lily/parser.yy
diff -u lilypond/lily/parser.yy:1.481 lilypond/lily/parser.yy:1.482
--- lilypond/lily/parser.yy:1.481       Wed Jul 20 10:33:53 2005
+++ lilypond/lily/parser.yy     Thu Jul 21 14:45:55 2005
@@ -129,8 +129,7 @@
 SCM
 make_simple_markup (SCM a)
 {
-       SCM simple = ly_lily_module_constant ("simple-markup");
-       return scm_list_2 (simple, a);
+       return a;
 }
 
 bool
@@ -2350,7 +2349,7 @@
                $$ = $1;
        }
        | LYRICS_STRING {
-               $$ = make_simple_markup ($1);
+               $$ = $1;
        }
        ;
 
Index: lilypond/python/convertrules.py
diff -u lilypond/python/convertrules.py:1.7 lilypond/python/convertrules.py:1.8
--- lilypond/python/convertrules.py:1.7 Mon Jul 18 23:41:58 2005
+++ lilypond/python/convertrules.py     Thu Jul 21 14:45:55 2005
@@ -2526,6 +2526,15 @@
 '''))
 
 
+def conv (str):
+       str = re.sub('ly:(add|mul|mod|div)-moment', r'ly:moment-\1', str)
+       return str
+
+conversions.append (((2, 7, 2), conv,
+                    '''ly:X-moment -> ly:moment-X'''))
+
+
+
 ################################################################
 
 def str_to_tuple (s):
Index: lilypond/scm/auto-beam.scm
diff -u lilypond/scm/auto-beam.scm:1.26 lilypond/scm/auto-beam.scm:1.27
--- lilypond/scm/auto-beam.scm:1.26     Fri Jun  3 19:23:23 2005
+++ lilypond/scm/auto-beam.scm  Thu Jul 21 14:45:55 2005
@@ -199,7 +199,7 @@
             (measure-pos (get 'measurePosition (ly:make-moment 0 1)))
             (settings (get 'autoBeamSettings '()))
             (function (list (if (= dir START) 'begin 'end)))
-            (num-mom (ly:div-moment measure-length beat-length))
+            (num-mom (ly:moment-div measure-length beat-length))
             (num (inexact->exact
                   (round (/ (ly:moment-main-numerator num-mom)
                             (ly:moment-main-denominator num-mom)))))
@@ -209,7 +209,7 @@
                         (ly:moment-main-denominator test)))
             (pos (if (>= (ly:moment-main-numerator measure-pos) 0)
                      measure-pos
-                     (ly:add-moment measure-length measure-pos)))
+                     (ly:moment-add measure-length measure-pos)))
             (lst (list
                   ;; Hmm, should junk user-override feature,
                   ;; or split this in user-override and config section?
@@ -231,4 +231,4 @@
                ;; end at any beat
                (and (not (first-assoc lst settings))
                     (= (ly:moment-main-denominator
-                        (ly:div-moment pos beat-length)) 1)))))))
+                        (ly:moment-div pos beat-length)) 1)))))))
Index: lilypond/scm/music-functions.scm
diff -u lilypond/scm/music-functions.scm:1.149 
lilypond/scm/music-functions.scm:1.150
--- lilypond/scm/music-functions.scm:1.149      Sun Jul 10 11:25:24 2005
+++ lilypond/scm/music-functions.scm    Thu Jul 21 14:45:55 2005
@@ -732,6 +732,39 @@
        (ly:music-length music))
   music)
 
+(define (skip-to-last music parser)
+
+  "Replace MUSIC by
+
+<< { \\set skipTypesetting = ##t
+     LENGTHOF(\\showLastLength)
+     \\set skipTypesetting = ##t  }
+    MUSIC >>
+
+if appropriate.
+ "
+  (let*
+      ((show-last  (ly:parser-lookup parser 'showLastLength)))
+    
+    (if (ly:music? show-last)
+       (let*
+           ((orig-length (ly:music-length music))
+            (skip-length (ly:moment-sub orig-length (ly:music-length 
show-last))))
+
+         (make-simultaneous-music
+          (list
+           (make-sequential-music
+            (list
+             (context-spec-music (make-property-set 'skipTypesetting #t) 
'Score)
+             (make-music 'SkipMusic 'duration
+                         (ly:make-duration 0 0
+                                           (ly:moment-main-numerator 
skip-length)
+                                           (ly:moment-main-denominator 
skip-length)))
+             (context-spec-music (make-property-set 'skipTypesetting #f) 
'Score)))
+           music)))
+       music)))
+    
+
 (define-public toplevel-music-functions
   (list
    (lambda (music parser) (voicify-music music))
@@ -745,8 +778,9 @@
    ;; switch-on-debugging
    (lambda (x parser) (music-map cue-substitute x))
  
-
-   ))
+   (lambda (x parser)
+     (skip-to-last x parser)
+   )))
 
 ;;;;;;;;;;;;;;;;;
 ;; lyrics
Index: lilypond/scm/safe-lily.scm
diff -u lilypond/scm/safe-lily.scm:1.34 lilypond/scm/safe-lily.scm:1.35
--- lilypond/scm/safe-lily.scm:1.34     Wed Jul 13 18:22:35 2005
+++ lilypond/scm/safe-lily.scm  Thu Jul 21 14:45:55 2005
@@ -9,7 +9,7 @@
    (set! safe-objects (cons (cons sym (primitive-eval sym))
                             safe-objects)))
  '(ly:add-interface
-   ly:add-moment
+   ly:moment-add
    ly:all-grob-interfaces
    ly:all-output-backend-commands
    ly:all-stencil-expressions
@@ -26,7 +26,7 @@
    ly:context?
    ly:dimension?
    ly:dir?
-   ly:div-moment
+   ly:moment-div
    ly:duration-dot-count
    ly:duration-factor
    ly:duration-log
@@ -75,7 +75,7 @@
    ly:make-stencil
    ly:moment<?
    ly:moment?
-   ly:mul-moment
+   ly:moment-mul
    ly:music-compress
    ly:music-deep-copy
    ly:music-duration-compress


_______________________________________________
Lilypond-cvs mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/lilypond-cvs

Reply via email to