From 99749409ff38a51bf864bed15cea78a75f901263 Mon Sep 17 00:00:00 2001 From: hanwen Date: Sun, 4 Jul 2004 21:22:57 +0000 Subject: [PATCH] * lily/note-collision.cc (do_shifts): align colliding notes to 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 | 11 ++++++++--- Documentation/user/notation.itely | 4 ++++ THANKS | 1 + VERSION | 2 +- input/regression/collision-alignment.ly | 21 ++++++++++++++++++++ input/test/volta-chord-names.ly | 2 +- lily/note-collision.cc | 26 ++++++++++++++++++++----- 7 files changed, 57 insertions(+), 10 deletions(-) create mode 100644 input/regression/collision-alignment.ly diff --git a/ChangeLog b/ChangeLog index f34bfd0730..a9224f4c5f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2004-07-04 Han-Wen Nienhuys + * 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 @@ -12,13 +17,13 @@ * 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. diff --git a/Documentation/user/notation.itely b/Documentation/user/notation.itely index 48dda9a530..46400ac47d 100644 --- a/Documentation/user/notation.itely +++ b/Documentation/user/notation.itely @@ -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 696cdc2c6f..97fd22193d 100644 --- 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 2749ae442a..a6bb7c4c18 100644 --- 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 index 0000000000..4049899e29 --- /dev/null +++ b/input/regression/collision-alignment.ly @@ -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 + } +>> diff --git a/input/test/volta-chord-names.ly b/input/test/volta-chord-names.ly index 07ac7a626e..e1aa1108e6 100644 --- a/input/test/volta-chord-names.ly +++ b/input/test/volta-chord-names.ly @@ -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 diff --git a/lily/note-collision.cc b/lily/note-collision.cc index 02dc5a08e6..31d084b31f 100644 --- a/lily/note-collision.cc +++ b/lily/note-collision.cc @@ -302,21 +302,37 @@ Note_collision_interface::do_shifts (Grob* me) while (flip (&d) != UP); Link_array done; + Real left_most = 1e6; + + Array 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); } } -- 2.39.5