]> git.donarmstrong.com Git - lilypond.git/commitdiff
* lily/note-collision.cc (do_shifts): align colliding notes to
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Sun, 4 Jul 2004 21:22:57 +0000 (21:22 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Sun, 4 Jul 2004 21:22:57 +0000 (21:22 +0000)
their leftmost note.

* input/regression/collision-alignment.ly: new file.

* input/test/volta-chord-names.ly: new file.

* lily/volta-bracket.cc (print): handle volta brackets without
bars.

ChangeLog
Documentation/user/notation.itely
THANKS
VERSION
input/regression/collision-alignment.ly [new file with mode: 0644]
input/test/volta-chord-names.ly
lily/note-collision.cc

index f34bfd07300f69c84129f5a5f78b6b96c4a4d347..a9224f4c5f48ed892b7dc348ff90d2aea33efe6f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2004-07-04  Han-Wen Nienhuys   <hanwen@xs4all.nl>
 
+       * lily/note-collision.cc (do_shifts): align colliding notes to
+       their leftmost note.
+
+       * input/regression/collision-alignment.ly: new file.
+
        * ly/init.ly: don't print gc stats.
 
        * scripts/lilypond-book.py (Lilypond_snippet.output_texinfo): add
 
        * lily/axis-group-engraver.cc (process_acknowledged_grobs): catch
        cyclic parents when two axis-group-engravers are
-       present. Fixes: crash-axis-group-engraver.ly. Backportme?
-
+       present. Fixes: crash-axis-group-engraver.ly. 
+       
        * input/test/volta-chord-names.ly: new file.
 
        * scm/define-context-properties.scm
        (all-user-translation-properties): change voltaOnThisStaff
-       definition. Backport? 
+       definition. 
 
        * lily/volta-engraver.cc (stop_translation_timestep): set bounds
        if necessary.
index 48dda9a530595023e2f77135a4acc859ceecb669..46400ac47d23ff14237c5c9aa6f8ff58410902c6 100644 (file)
@@ -3753,6 +3753,9 @@ ambitus.
 @node Tablatures
 @section Tablatures
 
+@cindex tablature
+@cindex guitar tablature
+
 Tablature notation is used for notating music for plucked string
 instruments.  It notates pitches not by using note heads, but by
 indicating on which string and fret a note must be played.  LilyPond
@@ -3782,6 +3785,7 @@ are printed as tablature, by using @internalsref{TabStaff} and
 @end lilypond
 
 @cindex minimumFret
+@cindex fret
 
 When no string is specified, the first string that does not give a
 fret number less than @code{minimumFret} is selected. The default
diff --git a/THANKS b/THANKS
index 696cdc2c6f78480e0d2ca99734353d4372c47b29..97fd22193d4d075f8acc83518a7d1e92693cdefd 100644 (file)
--- a/THANKS
+++ b/THANKS
@@ -20,6 +20,7 @@ Hendrik Maryns
 
 BUG HUNTERS/SUGGESTIONS
 
+Dave Phillips
 David Bobroff
 David Brandon
 Peter Rosenbeck
diff --git a/VERSION b/VERSION
index 2749ae442aec808b962fffab56a9d6317524aa87..a6bb7c4c18c10373ddb0b3ce295d4d356fa97791 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1,6 +1,6 @@
 PACKAGE_NAME=LilyPond
 MAJOR_VERSION=2
 MINOR_VERSION=3
-PATCH_LEVEL=5
+PATCH_LEVEL=6
 MY_PATCH_LEVEL=
 
diff --git a/input/regression/collision-alignment.ly b/input/regression/collision-alignment.ly
new file mode 100644 (file)
index 0000000..4049899
--- /dev/null
@@ -0,0 +1,21 @@
+\header {
+
+    texidoc = "Notes in different staves should be aligned to the
+ left-most note, in case of collisions."
+
+}
+
+\paper  { raggedright = ##t }
+
+\version "2.3.6"
+
+\relative <<
+    \new Staff {
+       <<
+           { f g } \\
+           { g f }
+       >> }
+    \new Staff {
+       c4 c 
+    }
+>>
index 07ac7a626ebc603c96e47efbaae06debb1837598..e1aa1108e603d4e1517300caace823a86d1d185b 100644 (file)
@@ -6,7 +6,7 @@ requires adding an engraver to @code{ChordNames}, and setting
 
 }
 
-\version "2.2.3"
+\version "2.3.5"
 <<
   \new ChordNames \with {
       voltaOnThisStaff = ##t
index 02dc5a08e691ac523be09b38ee232ceb5ee7c0b5..31d084b31ffc153bb6607a45b7692e509a59b5ff 100644 (file)
@@ -302,21 +302,37 @@ Note_collision_interface::do_shifts (Grob* me)
   while (flip (&d) != UP);
   
   Link_array<Grob> done;
+  Real left_most = 1e6;
+  
+  Array<Real> amounts;
   for (; ly_c_pair_p (hand); hand =ly_cdr (hand))
     {
       Grob * s = unsmob_grob (ly_caar (hand));
-      Real amount = ly_scm2double (ly_cdar (hand));
-      
-      s->translate_axis (amount *wid, X_AXIS);
+      Real amount = ly_scm2double (ly_cdar (hand)) * wid;
+
       done.push (s);
+      amounts.push (amount);
+      if (amount < left_most)
+       left_most = amount;
+      
     }
   for (; ly_c_pair_p (autos); autos =ly_cdr (autos))
     {
       Grob * s = unsmob_grob (ly_caar (autos));
-      Real amount = ly_scm2double (ly_cdar (autos));
+      Real amount = ly_scm2double (ly_cdar (autos)) *wid;
       
       if (!done.find (s))
-       s->translate_axis (amount * wid, X_AXIS);
+       {
+         done.push (s);
+         amounts.push (amount);
+         if (amount < left_most)
+           left_most = amount;
+       }
+    }
+
+  for (int i = 0; i < amounts.size(); i++)
+    {
+      done[i]->translate_axis (amounts[i] - left_most, X_AXIS);
     }
 }