]> git.donarmstrong.com Git - lilypond.git/commitdiff
* lily/stem.cc (get_beaming): return max of scm_ilength. Fixes
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Wed, 14 Jun 2006 11:55:57 +0000 (11:55 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Wed, 14 Jun 2006 11:55:57 +0000 (11:55 +0000)
slurring from/to beams.

* ly/lilypond-book-preamble.ly: new file.

* lily/slur.cc: add inspect-index feature.

ChangeLog
lily/slur-scoring.cc
lily/slur.cc
lily/stem.cc
ly/init.ly
ly/lilypond-book-preamble.ly [new file with mode: 0644]
scm/define-grob-properties.scm

index 6bcfcbfdcdd151ceff1aa0c9b2f46923dee63650..ccdae1a0ec6a2c28926cc10646538b6bc5b27319 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2006-06-14  Han-Wen Nienhuys  <hanwen@lilypond.org>
+
+       * lily/stem.cc (get_beaming): return max of scm_ilength. Fixes
+       slurring from/to beams. 
+
+       * ly/lilypond-book-preamble.ly: new file.
+
+       * lily/slur.cc: add inspect-index feature.
+
 2006-06-13  Graham Percival  <gpermus@gmail.com>
 
        * Documentation/user/tutorial.itely: trivial fix.
        format.
 
        * lily/stem.cc (calc_stem_end_position): calc quantized-positions
-       for beamed case. Backportme.
+       for beamed case. 
 
        * lily/note-spacing.cc (stem_dir_correction): don't inspect
-       stem_end_position, but estimate instead. Backportme.
+       stem_end_position, but estimate instead. 
 
        * lily/tuplet-bracket.cc (calc_positions): look at
        stem-end-position for tuplet bracket slope. Fixes sloped tuplet
-       brackets narrower than beams. Backportme.
+       brackets narrower than beams. 
 
        * lily/lexer.ll: set version-seen? even if version is
-       INVALID. Backportme.
+       INVALID. 
 
        * lily/rest.cc (y_offset_callback): bugfix: decide position
        override based on scm_is_number(). Fixes \rest on center staff
-       line. Backportme.
+       line. 
 
        * lily/beaming-pattern.cc (best_splitpoint_index): fix beaming
        patterns for 16th triplets.
index f4b312e5bdad78f18f9b3723d7fa55c573b8b0ca..ef5002538b1014f7402d23338d1a10203bdb3cd7 100644 (file)
@@ -354,8 +354,16 @@ Slur_score_state::get_best_curve ()
   bool debug_slurs = to_boolean (slur_->layout ()
                                 ->lookup_variable (ly_symbol2scm ("debug-slur-scoring")));
   SCM inspect_quants = slur_->get_property ("inspect-quants");
+  SCM inspect_index = slur_->get_property ("inspect-index");
   if (debug_slurs
-      && scm_is_pair (inspect_quants))
+      && scm_is_integer (inspect_index))
+    {
+      opt_idx = scm_to_int (inspect_index);
+      configurations_[opt_idx]->calculate_score (*this);
+      opt = configurations_[opt_idx]->score ();
+    }
+  else if (debug_slurs
+          && scm_is_pair (inspect_quants))
     {
       opt_idx = get_closest_index (inspect_quants);
       configurations_[opt_idx]->calculate_score (*this);
index 92610d47e7db7f4866b49015bbfaa1df36b4e495..557200b239f47b9ad9b3f481783b9369ec73e772 100644 (file)
@@ -286,12 +286,13 @@ ADD_INTERFACE (Slur, "slur-interface",
               "eccentricity "
               "encompass-objects "
               "height-limit "
+              "inspect-quants "
+              "inspect-index "
               "line-thickness "
               "note-columns "
               "positions "
               "quant-score "
               "ratio "
               "thickness "
-
               );
 
index 4bfac0eb6e75200c6368743e4bea9506c720d3be..d95ff4be3951c8ac7b6403a76fa0e09e09f2225e 100644 (file)
@@ -65,7 +65,9 @@ Stem::get_beaming (Grob *me, Direction d)
     return 0;
 
   SCM lst = index_get_cell (pair, d);
-  return scm_ilength (lst);
+
+  int len = scm_ilength (lst);
+  return max (len, 0);
 }
 
 Interval
index 71633013a6b3ede8bee6b484a9a0d23a804c6f8d..1a9ec369cbbde283f99e7bf40e3662600516d0b1 100644 (file)
@@ -16,7 +16,7 @@
 #(define toplevel-scores '())
 #(define output-count 0) 
 #(define $defaultheader #f)
-#(define version-seen? #f)
+#(define version-seen #f)
 
 \maininput
 %% there is a problem at the end of the input file
@@ -30,7 +30,7 @@
       (not (ly:get-option 'old-relative-used)))
   (old-relative-not-used-message input-file-name))%% there is a problem at the end of the input file
 
-#(if (and (not version-seen?)
+#(if (and (not version-seen)
       (defined? 'input-file-name))
   (version-not-seen-message input-file-name))
 
diff --git a/ly/lilypond-book-preamble.ly b/ly/lilypond-book-preamble.ly
new file mode 100644 (file)
index 0000000..9ff3e63
--- /dev/null
@@ -0,0 +1,12 @@
+
+
+#(set! toplevel-score-handler print-score-with-defaults)
+#(set! toplevel-music-handler
+  (lambda (p m)
+   (if (not (eq? (ly:music-property m \'void) #t))
+        (print-score-with-defaults
+         p (scorify-music m p)))))
+
+#(ly:set-option (quote no-point-and-click))
+#(define inside-lilypond-book #t)
+#(define version-seen #t)
index 2c84e2d822ff01d16af24fa86bc3215a038ad533..27018602d09e8005228f8323f52a8ef45dc6c49b 100644 (file)
@@ -242,7 +242,9 @@ of note-column for horizontal shifting. This is used by
 Choices are @code{around}, @code{inside}, @code{outside}.  If unset, script
 and slur ignore eachother.")
      (inspect-quants ,number-pair? "If debugging is set,
-set beam quant to this position, and print the respective scores.")
+set beam/slur quant to this position, and print the respective scores.")
+     (inspect-index ,integer? "If debugging is set,
+set beam/slur configuration to this index, and print the respective scores.")
      (implicit ,boolean? "Is this an implicit bass figure?")
      (keep-inside-line ,boolean? "If set, this column cannot have
 things sticking into the margin.")