]> git.donarmstrong.com Git - lilypond.git/commitdiff
Merge remote branch 'origin' into release/unstable
authorGraham Percival <graham@percival-music.ca>
Sat, 4 Dec 2010 10:38:39 +0000 (10:38 +0000)
committerGraham Percival <graham@percival-music.ca>
Sat, 4 Dec 2010 10:38:39 +0000 (10:38 +0000)
24 files changed:
Documentation/contributor/issues.itexi
Documentation/contributor/programming-work.itexi
Documentation/es/web/news-front.itexi
Documentation/notation/changing-defaults.itely
Documentation/notation/rhythms.itely
Documentation/notation/spacing.itely
Documentation/notation/text.itely
elisp/lilypond-mode.el
input/regression/display-lily-tests.ly
input/regression/metronome-range.ly [new file with mode: 0644]
input/regression/page-overflow-compression.ly [new file with mode: 0644]
input/regression/stem-length-estimation.ly
lily/metronome-engraver.cc
lily/page-layout-problem.cc
lily/parser.yy
lily/tie-engraver.cc
scm/c++.scm
scm/define-context-properties.scm
scm/define-music-display-methods.scm
scm/lily.scm
scm/ly-syntax-constructors.scm
scm/song.scm
scm/translation-functions.scm
scripts/midi2ly.py

index 2d496e830e79f9ba489902a06199232c0880685c..70578c7ad846ffb83c052dcef7c94788f5a26539 100644 (file)
@@ -150,7 +150,7 @@ the currently-active Bug Squad member(s) can handle the message.
 The Bug Meister is omitted from the daily schedule.
 
 @example
-Sunday: Valentin
+Sunday: Colin
 Monday: Dmytro
 Tuesday: James Bailey
 Wednesday: Ralph
@@ -625,13 +625,25 @@ lilypond --png bug.ly
 @end example
 
 @item
-If the issue requires multi-page output, then generate a
-@file{bug.pdf} file with the normal:
+If the issue requires one or two pages of output, then generate a
+@file{bug.png} file with the normal:
 
 @example
 lilypond --png bug.ly
 @end example
 
+@item
+If the issue cannot be shown with less than three pages, then
+generate a @file{bug.pdf} file with:
+
+@example
+lilypond --pdf bug.ly
+@end example
+
+Note that this is likely to be extremely rare; most bugs should fit
+into the first two categories above.
+
+
 @end itemize
 
 @item
index ae4785446e382ac71855a2c2af4754c7323c2850..1e0c37fbd28e6f22bca9531b871b80580de21977 100644 (file)
@@ -1089,6 +1089,9 @@ The logfile has standard lilypond output, as well as the Graphviz
 output data.  Delete everything from the beginning of the file
 up to but not including the first occurrence of @code{digraph}.
 
+Also, delete the final liypond message about successs from the end
+of the file.
+
 @item Process the logfile with @code{dot}
 
 The directed graph is created from the log file with the program
index dc8d81efc3a280c657bb68b18a9c46d81914a400..e325da50c8f7af042711fc5c15b190ec6ad687a1 100644 (file)
@@ -1,6 +1,6 @@
 @c -*- coding: utf-8; mode: texinfo; documentlanguage: es -*-
 @ignore
-    Translation of GIT committish: 4039f52de2f225ee2bd94840324d0192fbac37b3
+    Translation of GIT committish: 61fed596442d47e96c10ac3c9c0c696e5dfd22cf
 
     When revising a translation, copy the HEAD committish of the
     version that you are working on.  For details, see the Contributors'
 @c used for news about the upcoming release; see CG 10.2
 
 
+@newsItem
+@subsubheading ¡Lanzado LilyPond 2.13.40!  @emph{21 de noviembre de 2010}
+
+Nos complace anunciar el lanzamiento de LilyPond 2.13.40.  Esta
+versión contiene el conjunto habitual de correcciones de fallos.  Sin
+embargo, aún quedan algunos problemas críticos, por lo que esta
+versión está orientada solamente a los desarrolladores.
+
+Tenga en cuenta que ésta @strong{no} es la segunda versión de pruebas
+beta.  A causa de la aparición de algunos cambios en nuestro proceso
+de construcción del programa que no se han probado, no podemos estar
+completamente seguros de la calidad de esta versión.
+
+@newsEnd
+
+
 @newsItem
 @subsubheading Primera versión de pruebas Beta de 2.14: ¡Lanzado LilyPond 2.13.39! @emph{15 de noviembre de 2010}
 
index c696f9536541e2309e611de9e917dcc85a95d9d3..c5bc49731b30c95bbd325bce9ead8fadbc804c16 100644 (file)
@@ -71,7 +71,7 @@ This section describes what contexts are, and how to modify them.
 Learning Manual:
 @rlearning{Contexts and engravers}.
 
-Installed files:
+Installed Files:
 @file{ly/engraver-init.ly},
 @file{ly/performer-init.ly}.
 
index 9b719c93ea93e506fea2b44662b7441a0d33ba4d..6a9c08a8acf527ccaf0256a7298187d1647dbc01 100644 (file)
@@ -2071,7 +2071,7 @@ For reference, the default beaming rules are found in
 
 
 @seealso
-Installed files:
+Installed Files:
 @file{scm/beam-settings.scm}.
 
 Snippets:
index 7ec64272ac5b0ebb836fb49efec85c46e0f02278..1208a12fb7b488bd450563ed44c5f772ed96e305 100644 (file)
@@ -586,7 +586,8 @@ systems, equal to
 when unset.  If @code{line-width} is set, and both
 @code{left-margin} and @code{right-margin} are unset, then the
 margins will be updated to center the systems on the page
-automatically.  Also see @code{check-consistency}.
+automatically.  Also see @code{check-consistency}.  This variable
+can also be set in a @code{\layout} block.
 
 @item left-margin
 @funindex left-margin
@@ -854,7 +855,7 @@ Notation Reference:
 @ref{Optimal page turning},
 @ref{Minimal page breaking}.
 
-Installed files:
+Installed Files:
 @file{ly/paper-defaults-init.ly}.
 
 
@@ -944,7 +945,7 @@ sensible default, for example:
 
 
 @seealso
-Installed files:
+Installed Files:
 @file{ly/titling-init.ly}.
 
 Snippets:
@@ -997,6 +998,7 @@ discussed in a separate chapter; see
 variables that can appear in a @code{\layout} block are:
 
 @itemize
+@item @code{line-width}
 @item @code{ragged-right}
 @item @code{ragged-last}
 @item @code{indent}
@@ -1933,7 +1935,7 @@ in the staff-group that have it set.  Also see
 @end table
 
 @seealso
-Installed files:
+Installed Files:
 @file{ly/engraver-init.ly},
 @file{scm/define-grobs.scm}.
 
index 3f1d612441ce7d9d6f9f8a63b44edd6812b8196c..14ff59f636bd9d47ab4c0099b456cba79b36c78d 100644 (file)
@@ -493,7 +493,7 @@ Notation Reference:
 Snippets:
 @rlsr{Text}.
 
-Installed files:
+Installed Files:
 @file{scm/markup.scm}.
 
 
@@ -689,7 +689,7 @@ Snippets:
 Internals Reference:
 @rinternals{TextScript}.
 
-Installed files:
+Installed Files:
 @file{scm/define-markup-commands.scm}.
 
 
@@ -945,7 +945,7 @@ Snippets:
 Internals Reference:
 @rinternals{TextScript}.
 
-Installed files:
+Installed Files:
 @file{scm/define-markup-commands.scm}.
 
 
@@ -1126,7 +1126,7 @@ Snippets:
 Internals Reference:
 @rinternals{TextScript}.
 
-Installed files:
+Installed Files:
 @file{scm/define-markup-commands.scm},
 @file{scm/stencil.scm}.
 
@@ -1258,7 +1258,7 @@ Snippets:
 Internals Reference:
 @rinternals{TextScript}.
 
-Installed files:
+Installed Files:
 @file{scm/define-markup-commands.scm},
 @file{scm/fret-diagrams.scm},
 @file{scm/harp-pedals.scm}.
@@ -1324,7 +1324,7 @@ Extending:
 Internals Reference:
 @rinternals{TextScript}.
 
-Installed files:
+Installed Files:
 @file{scm/define-markup-commands.scm}.
 
 
@@ -1495,7 +1495,7 @@ Snippets:
 @rlsr{Text}.
 
 @c A source file gets never installed...
-@c Installed files:
+@c Installed Files:
 @c @file{lily/font-config-scheme.cc}.
 
 
index f014d1ca8bab7f89b5f8f8cc8b01777fd4072b57..b460c4a62bca370598c2728e28db0512b1b989ca 100644 (file)
@@ -1155,11 +1155,12 @@ LilyPond-command-alist\t\talist from name to command"
 
   ;; Use Command on Region even for inactive mark (region).
   (if (string-match "XEmacs\\|Lucid" emacs-version)
-      (setq zmacs-regions nil)
+      (progn
+       (setq zmacs-regions nil)
+       (make-local-hook 'post-command-hook)) ; XEmacs requires
     (setq mark-even-if-inactive t))
 
   ;; Context dependent syntax tables in LilyPond-mode
-  (make-local-hook 'post-command-hook) ; XEmacs requires
   (add-hook 'post-command-hook 'LilyPond-mode-context-set-syntax-table nil t)
 
   ;; Turn on paren-mode buffer-locally, i.e., in LilyPond-mode
index 426b61771bee5e5c35010b73a1611dd6fb422741..c28ebf7e3bf15263341e92e62a1120080c149723 100644 (file)
@@ -164,6 +164,9 @@ stderr of this run."
 \test "" ##[ \mark \default #]                 % MarkEvent
 \test "" ##[ \mark "Allegro" #]
 \test "" ##[ \tempo 4 = 120 #]                 % MetronomeChangeEvent
+\test "" ##[ \tempo 4 = 108 ~ 116 #]
+\test "" ##[ \tempo "Allegro" 4 = 132 #]
+\test "" ##[ \tempo "Andante" #]
 
 %% key, time, clef, bar
 \test "" ##[ \key \default #]                  % KeyChangeEvent
diff --git a/input/regression/metronome-range.ly b/input/regression/metronome-range.ly
new file mode 100644 (file)
index 0000000..e5456ab
--- /dev/null
@@ -0,0 +1,15 @@
+\version "2.13.41"
+
+\header {
+  texidoc = "
+Tempo ranges are supported.  By default, numbers are
+printed with an en-dash character, separated by thin-spaces.
+"
+}
+
+\relative c'' {
+  \tempo 4 = 66 ~ 72
+  c1 c
+  \set Score.tempoUnitCount = #(cons 124 132)
+  c1 c
+}
diff --git a/input/regression/page-overflow-compression.ly b/input/regression/page-overflow-compression.ly
new file mode 100644 (file)
index 0000000..40f8b9d
--- /dev/null
@@ -0,0 +1,17 @@
+\version "2.13.41"
+
+\header {
+  texidoc = "
+Layouts that overflow a page will be compressed in order to fit on
+the page, even if it causes collisions.  In this example, the
+tagline should not collide with the bottom staff.
+"
+}
+
+\paper {
+  paper-height= 8\cm
+}
+
+\book {
+  \repeat unfold 3 { g'''1\mark \markup "Long Text" g'''1\break}
+}
index 11d1bdd7b7f84bb945eb8c2177e98e04e59afa9f..18697f726b6a3a2b5b04ec2d971f528000481966 100644 (file)
@@ -6,14 +6,32 @@ This example should fit snugly on one page.
 "
 }
 
+#(define (assert-single-page layout props arg)
+   (if (and (= (chain-assoc-get 'page:page-number props -1)
+               (ly:output-def-lookup layout 'first-page-number))
+            (chain-assoc-get 'page:last? props -1))
+       (interpret-markup layout props arg)
+       (ly:error "failed to fit test on single page")))
+
 \paper {
   #(set-paper-size "a6")
   tagline = ##f
-  system-system-spacing #'padding = #1.20
+  system-system-spacing = #'((padding . 1.2))
+  oddHeaderMarkup = \markup \on-the-fly #assert-single-page \null
 }
 
-\new Voice {
-  \voiceTwo
-  \override Staff.Stem #'length = #0
-  \repeat unfold 144 a
+\book {
+  \score {
+    \new Voice {
+      \voiceTwo
+      \override Stem #'length = #0
+      \repeat unfold 144 a4
+    }
+    \layout {
+      \context {
+        \Score
+        \remove "Bar_number_engraver"
+      }
+    }
+  }
 }
index d55455f23d36533c6e1131971ed8b0d9a53b9ab7..0a41fc97abdb61fb1dde875722a7a565716b55a6 100644 (file)
@@ -160,7 +160,7 @@ Metronome_mark_engraver::process_music ()
   SCM duration = get_property ("tempoUnitDuration");
   SCM text = get_property ("tempoText");
 
-  if ( ( (unsmob_duration (duration) && scm_is_number (count))
+  if ( ( (unsmob_duration (duration) && scm_is_true (count))
         || Text_interface::is_markup (text) )
       && !(ly_is_equal (count, last_count_)
           && ly_is_equal (duration, last_duration_)
index 1a39ad51e8c21f681d1d345424b1c30931820e57..4f035d72794617ba3bd144f8cf187046392b41db 100644 (file)
@@ -309,8 +309,15 @@ Page_layout_problem::solve_rod_spring_problem (bool ragged)
   solution_ = spacer.spring_positions ();
 
   if (!spacer.fits ())
-    warning (_f ("couldn't fit music on page: overflow is %f",
-                spacer.configuration_length(spacer.force()) - page_height_));
+    {
+      Real overflow = spacer.configuration_length (spacer.force ()) - page_height_;
+      vsize space_count = solution_.size ();
+      for (vsize i = 0; i < space_count; i++)
+       solution_[i] -= (i + 1) * overflow / space_count;
+      warning (_f ("couldn't fit music on page: overflow is %f",
+                   overflow));
+      warning (_ ("compressing music to fit"));
+    }
 }
 
 // The solution_ vector stores the position of every live VerticalAxisGroup
index 38e3e93b101d5ba40aeb2457b81df4eab8d1894a..94dacc5d3eebc2491fc96bd34c68eee5b658ece5 100644 (file)
@@ -437,6 +437,7 @@ If we give names, Bison complains.
 %type <scm> step_number
 %type <scm> step_numbers
 %type <scm> string
+%type <scm> tempo_range
 
 %type <score> score_block
 %type <score> score_body
@@ -906,14 +907,14 @@ output_def_body:
        ;
 
 tempo_event:
-       TEMPO steno_duration '=' bare_unsigned  {
-               $$ = MAKE_SYNTAX ("tempo", @$, SCM_BOOL_F, $2, scm_from_int ($4));
+       TEMPO steno_duration '=' tempo_range    {
+               $$ = MAKE_SYNTAX ("tempo", @$, SCM_BOOL_F, $2, $4);
        }
-       | TEMPO string steno_duration '=' bare_unsigned {
-               $$ = MAKE_SYNTAX ("tempo", @$, make_simple_markup($2), $3, scm_from_int ($5));
+       | TEMPO string steno_duration '=' tempo_range   {
+               $$ = MAKE_SYNTAX ("tempo", @$, make_simple_markup($2), $3, $5);
        }
-       | TEMPO full_markup steno_duration '=' bare_unsigned    {
-               $$ = MAKE_SYNTAX ("tempo", @$, $2, $3, scm_from_int ($5));
+       | TEMPO full_markup steno_duration '=' tempo_range      {
+               $$ = MAKE_SYNTAX ("tempo", @$, $2, $3, $5);
        }
        | TEMPO string {
                $$ = MAKE_SYNTAX ("tempoText", @$, make_simple_markup($2) );
@@ -2289,6 +2290,15 @@ step_number:
        }
        ;
 
+tempo_range:
+       bare_unsigned {
+               $$ = scm_from_int ($1);
+       }
+       | bare_unsigned '~' bare_unsigned {
+               $$ = scm_cons (scm_from_int ($1), scm_from_int ($3));
+       }
+       ;
+
 /*
        UTILITIES
 
@@ -2360,7 +2370,6 @@ unsigned_number:
        }
        ;
 
-
 exclamations:
                { $$ = 0; }
        | exclamations '!'      { $$ ++; }
index d636db8253832eb56bcc9221e8d1bfffdde2e91d..919a0ae806f3192c6babd91b5288e621ef77d952 100644 (file)
@@ -34,7 +34,7 @@
 #include "translator.icc"
 
 /**
-   Manufacture ties.  Acknowledge noteheads, and put them into a
+   Manufacture ties.  Acknowledge note heads, and put them into a
    priority queue. If we have a TieEvent, connect the notes that finish
    just at this time, and note that start at this time.
 
@@ -172,12 +172,12 @@ Tie_engraver::acknowledge_note_head (Grob_info i)
 
          // Prevent all other tied notes ending at the same moment (assume
          // implicitly the notes have also started at the same moment!)
-         // from triggering an "unterminated tie" warning. Neede e.g. for
+         // from triggering an "unterminated tie" warning. Needed e.g. for
          // <c e g>~ g
          for (vsize j = heads_to_tie_.size (); j--;)
            {
              if (heads_to_tie_[j].end_moment_ == end)
-               heads_to_tie_[i].tie_from_chord_created = true;
+               heads_to_tie_[j].tie_from_chord_created = true;
            }
        }
     }
@@ -241,7 +241,7 @@ Tie_engraver::stop_translation_timestep ()
 
       if (!left_ev)
        {
-         // may happen for ambituses
+         // may happen for ambitus
          continue;
        }
            
index 7f28900917643c17fd0a5f0993601802a957097d..204f813d4736388030db061ed5eea3927ec62cf6 100644 (file)
@@ -47,6 +47,9 @@
 (define-public (string-or-pair? x)
   (or (string? x) (pair? x)))
 
+(define-public (number-or-pair? x)
+  (or (number? x) (pair? x)))
+
 (define-public (cheap-list? x)
   (or (pair? x) (null? x)))
 
index 8a22e2d36aba5e38cf7feab807d8487a77f9e96e..f758c04ca1a09085f57323163b6d3029a3d963f3 100644 (file)
@@ -461,7 +461,7 @@ staff position of a tablature note head.  Called with two arguments:
 the context and the string.")
      (tempoHideNote ,boolean? "Hide the note=count in tempo marks.")
      (tempoText ,markup? "Text for tempo marks.")
-     (tempoUnitCount ,number? "Count for specifying tempo.")
+     (tempoUnitCount ,number-or-pair? "Count for specifying tempo.")
      (tempoUnitDuration ,ly:duration? "Unit for specifying tempo.")
      (tempoWholesPerMinute ,ly:moment? "The tempo in whole notes per
 minute.")
index 3b896a245017f6aa463fcb8d412b0dcd495aa617..515fc92d38402787e3748b0011b436273bff02f2 100644 (file)
@@ -934,7 +934,11 @@ Otherwise, return #f."
                (format #f "\\tempo ~a ~a = ~a"
                        (scheme-expr->lily-string ?unit-text)
                        (duration->lily-string ?unit-duration #:force-duration #t)
-                       ?unit-count))
+                       (if (number-pair? ?unit-count)
+                           (format #f "~a ~~ ~a"
+                                   (car ?unit-count)
+                                   (cdr ?unit-count))
+                           ?unit-count)))
        (with-music-match (expr (music 'ContextSpeccedMusic
                    element (music 'SequentialMusic
                              elements ((music 'PropertyUnset
@@ -949,7 +953,11 @@ Otherwise, return #f."
                                          symbol 'tempoUnitCount)))))
                        (format #f "\\tempo ~a = ~a"
                                (duration->lily-string ?unit-duration #:force-duration #t)
-                               ?unit-count))
+                               (if (number-pair? ?unit-count)
+                                   (format #f "~a ~~ ~a"
+                                           (car ?unit-count)
+                                           (cdr ?unit-count))
+                                   ?unit-count)))
        (with-music-match (expr (music 'ContextSpeccedMusic
                            element (music 'SequentialMusic
                                      elements ((music 'PropertySet
index 0a7e4d0d13135efe204005907cb1017ff503237d..d4a0b238465dc652a1b0df4e5319931152656ca6 100644 (file)
@@ -502,6 +502,7 @@ LilyPond safe mode.  The syntax is the same as `define*-public'."
     (,markup-list? . "markup list")
     (,moment-pair? . "pair of moment objects")
     (,number-or-grob? . "number or grob")
+    (,number-or-pair? . "number or pair")
     (,number-or-string? . "number or string")
     (,number-pair? . "pair of numbers")
     (,rhythmic-location? . "rhythmic location")
index 92276e745f1ca9fbc31e367b6d02fa7633e82d2e..c34f5c9dd1dc81864acc7d2f143e7ba0d1e5dc7a 100644 (file)
              'element (ly:music-transpose music pitch)))
 
 (define-ly-syntax-simple (tempo text duration tempo)
-  (let ((props (list
-                 (make-property-set 'tempoWholesPerMinute
-                       (ly:moment-mul (ly:make-moment tempo 1)
-                                      (ly:duration-length duration)))
-                 (make-property-set 'tempoUnitDuration duration)
-                 (make-property-set 'tempoUnitCount tempo))))
-    (set! props (cons 
-            (if text (make-property-set 'tempoText text)
-                     (make-property-unset 'tempoText)) 
-            props))
+  (let* ((range-tempo? (pair? tempo))
+        (tempo-count (if range-tempo?
+                         (round (/ (+ (car tempo) (cdr tempo)) 2))
+                         tempo))
+        (props (list
+                (make-property-set 'tempoWholesPerMinute
+                                   (ly:moment-mul (ly:make-moment tempo-count 1)
+                                                  (ly:duration-length duration)))
+                (make-property-set 'tempoUnitDuration duration)
+                (make-property-set 'tempoUnitCount tempo))))
+    (set! props (cons
+                (if text (make-property-set 'tempoText text)
+                     (make-property-unset 'tempoText))
+                props))
     (context-spec-music
-      (make-sequential-music props)
-      'Score)))
+     (make-sequential-music props)
+     'Score)))
 
 (define-ly-syntax-simple (tempoText text)
   (context-spec-music
index 410b3c89df99361cd1b9d75f4fdd11b6ab9bab8a..88b4423702bb0037b33155f97257bdb0f1f14480 100644 (file)
                      (duration->number (ly:music-property tempo-spec 'tempo-unit))))
                  ((music-name? tempo-spec 'SequentialMusic)
                   (* (property-value
-                      (find-child tempo-spec (lambda (elt) (music-property? elt 'tempoUnitCount))))
+                      (find-child tempo-spec (lambda (elt)
+                                              (let ((tempo (music-property? elt 'tempoUnitCount)))
+                                                (if (pair? tempo)
+                                                    (round (/ (+ (car tempo) (cdr tempo)) 2))
+                                                    tempo)))))
                      (duration->number
                       (property-value
                        (find-child tempo-spec (lambda (elt) (music-property? elt 'tempoUnitDuration)))))))
index 62a408ce9652da38c2320c22d4b3240edec572a1..67653bc49a8da4709cd2ad5219c77b43eeca9b4c 100644 (file)
                                                     (ly:duration-dot-count dur)
                                                     1))
                        #f))
-         (note-markup (if (and (not hide-note) (number? count) (> count 0) )
+        (count-markup (cond ((number? count)
+                             (if (> count 0)
+                                 (make-simple-markup (number->string count))
+                                 #f))
+                            ((pair? count)
+                             (make-concat-markup
+                              (list
+                               (make-simple-markup (number->string (car count)))
+                               (make-simple-markup " ")
+                               (make-simple-markup "–")
+                               (make-simple-markup " ")
+                               (make-simple-markup (number->string (cdr count))))))
+                            (else #f)))
+         (note-markup (if (and (not hide-note) count-markup)
                          (make-concat-markup
                           (list
                            (make-general-align-markup Y DOWN note-mark)
                            (make-simple-markup " ")
                            (make-simple-markup "=")
                            (make-simple-markup " ")
-                           (make-simple-markup (number->string count))))
+                           count-markup))
                          #f))
          (text-markup (if (not (null? text))
                          (make-bold-markup text)
index e0a00ae170310a5a9d40a8d92a60f86b7db8a443..eb15312de11eb57d735475afcc39471df7bbfd6f 100644 (file)
@@ -826,7 +826,7 @@ def convert_midi (in_file, out_file):
 
     
     s = ''
-    s = tag + '\n\\version "2.7.18"\n\n'
+    s = tag + '\n\\version "2.7.38"\n\n'
     for i in range (len (tracks)):
         s = s + dump_track (tracks[i], i)