From: Han-Wen Nienhuys Date: Tue, 14 Sep 2004 22:52:16 +0000 (+0000) Subject: (score_edges): add exp(slope*dir*leftright) X-Git-Tag: release/2.3.17~31 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=bd61ea759c769abca9b74b8477eb5d83d023e393;p=lilypond.git (score_edges): add exp(slope*dir*leftright) factor in edge attraction. This reflects that the left edge may have a larger gap for an ascending up-slur. (get_base_attachments): copy bound Y from right bound, if there is only one note-column after the line break. --- diff --git a/ChangeLog b/ChangeLog index 4b464ba74c..c8d2f26848 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,8 @@ * lily/slur-scoring.cc (score_edges): add exp(slope*dir*leftright) factor in edge attraction. This reflects that the left edge may have a larger gap for an ascending up-slur. + (get_base_attachments): copy bound Y from right bound, if there is + only one note-column after the line break. 2004-09-14 Jan Nieuwenhuizen diff --git a/lily/slur-scoring.cc b/lily/slur-scoring.cc index bb7904e9c3..c17d5e630b 100644 --- a/lily/slur-scoring.cc +++ b/lily/slur-scoring.cc @@ -413,7 +413,8 @@ Drul_array get_bound_info (Spanner* me, Grob **common) { Drul_array extremes; - Direction d = LEFT; + + Direction d = RIGHT; Direction dir = get_grob_direction (me); do @@ -450,15 +451,8 @@ get_bound_info (Spanner* me, Grob **common) right side anticipates on the next note. */ extremes[d].neighbor_y_ = broken_trend_y (me, common, d); - - else - { - Link_array columns - = Pointer_group_interface__extract_grobs (me, (Grob *) 0, "note-columns"); - extremes[d].neighbor_y_ = columns[0]->extent (common[Y_AXIS], Y_AXIS)[dir]; - } } - while (flip (&d) != LEFT); + while (flip (&d) != RIGHT); return extremes; } @@ -617,7 +611,7 @@ get_base_attachments (Spanner *me, Drul_array base_attachment; Real staff_space = Staff_symbol_referencer::staff_space ((Grob *) me); Direction dir = get_grob_direction (me); - Direction d = LEFT; + Direction d = RIGHT; do { Grob *stem = extremes[d].stem_; @@ -626,11 +620,23 @@ get_base_attachments (Spanner *me, Real x, y; if (!extremes[d].note_column_) { - y = extremes[d].neighbor_y_; - if (d== RIGHT) - x = extremes[d].bound_->extent (common[X_AXIS], X_AXIS)[d]; + if (d == RIGHT) + { + y = extremes[d].neighbor_y_; + x = extremes[d].bound_->extent (common[X_AXIS], X_AXIS)[d]; + } else - x = me->get_broken_left_end_align (); + { + x = me->get_broken_left_end_align (); + if (extremes[RIGHT].bound_ == columns[0]) + { + y = base_attachment[RIGHT][Y_AXIS]; + } + else + { + y = columns[0]->extent (common[Y_AXIS], Y_AXIS)[dir]; + } + } } else { @@ -672,7 +678,7 @@ get_base_attachments (Spanner *me, } base_attachment[d] = Offset (x, y); - } while (flip (&d) != LEFT); + } while (flip (&d) != RIGHT); return base_attachment; } diff --git a/po/lilypond.pot b/po/lilypond.pot index da89ef84d6..c5f0fefa95 100644 --- a/po/lilypond.pot +++ b/po/lilypond.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2004-09-12 02:23+0200\n" +"POT-Creation-Date: 2004-09-15 00:34+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -130,6 +130,8 @@ msgstr "" #. for --output-format. #. Bug in option parser: --output=foe is taken as an abbreviation #. for --output-format. +#. Bug in option parser: --output=foe is taken as an abbreviation +#. for --output-format. #: lilypond-book.py:89 main.cc:130 lily/main.cc:130 msgid "EXT" msgstr "" @@ -620,6 +622,7 @@ msgstr "" msgid "Error parsing AFM file: `%s'" msgstr "" +#. FIXME: broken sentence #. FIXME: broken sentence #. FIXME: broken sentence #: all-font-metrics.cc:95 lily/all-font-metrics.cc:95 @@ -719,7 +722,7 @@ msgstr "" msgid "removing beam with less than two stems" msgstr "" -#: beam.cc:1038 lily/beam.cc:1038 +#: beam.cc:1038 lily/beam.cc:1038 lily/beam.cc:1063 msgid "no viable initial configuration found: may not find good beam slope" msgstr "" @@ -745,6 +748,12 @@ msgstr "" #. #. last->translator_id_string () = get_change ()->change_to_id_string (); #. +#. +#. We could change the current translator's id, but that would make +#. errors hard to catch +#. +#. last->translator_id_string () = get_change ()->change_to_id_string (); +#. #: change-iterator.cc:93 lily/change-iterator.cc:93 msgid "I'm one myself" msgstr "" @@ -1006,12 +1015,12 @@ msgstr "" msgid "Type check for `%s' failed; value `%s' must be of type `%s'" msgstr "" -#: lily-lexer.cc:220 lily/lily-lexer.cc:220 +#: lily-lexer.cc:220 lily/lily-lexer.cc:220 lily/lily-lexer.cc:224 #, c-format msgid "Identifier name is a keyword: `%s'" msgstr "" -#: lily-lexer.cc:237 lily/lily-lexer.cc:237 +#: lily-lexer.cc:237 lily/lily-lexer.cc:237 lily/lily-lexer.cc:241 #, c-format msgid "error at EOF: %s" msgstr "" @@ -1123,6 +1132,7 @@ msgid "" "%s and others." msgstr "" +#. No version number or newline here. It confuses help2man. #. No version number or newline here. It confuses help2man. #. No version number or newline here. It confuses help2man. #: main.cc:192 lily/main.cc:192 @@ -1210,6 +1220,9 @@ msgstr "" #. #. music for the softenon children? #. +#. +#. music for the softenon children? +#. #: new-fingering-engraver.cc:155 lily/new-fingering-engraver.cc:155 msgid "music for the martians." msgstr "" @@ -1407,6 +1420,7 @@ msgstr "" msgid "This is the previous music" msgstr "" +#. FIXME: #. FIXME: #. FIXME: #: script-engraver.cc:102 lily/script-engraver.cc:102 @@ -1417,6 +1431,7 @@ msgstr "" msgid "Scheme encoding: " msgstr "" +#. this shouldn't happen, but let's continue anyway. #. this shouldn't happen, but let's continue anyway. #. this shouldn't happen, but let's continue anyway. #: separation-item.cc:53 separation-item.cc:97 lily/separation-item.cc:53 @@ -1452,6 +1467,7 @@ msgstr "" msgid "tremolo duration is too long" msgstr "" +#. FIXME: #. FIXME: #. FIXME: #: stem-engraver.cc:125 lily/stem-engraver.cc:125 @@ -1507,6 +1523,8 @@ msgstr "" #. more of a programming error. #. Not using ngettext's plural feature here, as this message is #. more of a programming error. +#. Not using ngettext's plural feature here, as this message is +#. more of a programming error. #: tfm-reader.cc:108 lily/tfm-reader.cc:108 #, c-format msgid "TFM header of `%s' has only %u word (s)" @@ -1540,6 +1558,11 @@ msgstr "" #. #. OTOH, Tristan Keuris writes 8/20 in his Intermezzi. #. +#. +#. Todo: should make typecheck? +#. +#. OTOH, Tristan Keuris writes 8/20 in his Intermezzi. +#. #: time-signature-engraver.cc:57 lily/time-signature-engraver.cc:57 #, c-format msgid "Found strange time signature %d/%d." @@ -1549,6 +1572,8 @@ msgstr "" #. (Here really with a warning!) #. If there is no such symbol, we default to the numbered style. #. (Here really with a warning!) +#. If there is no such symbol, we default to the numbered style. +#. (Here really with a warning!) #: time-signature.cc:91 lily/time-signature.cc:91 #, c-format msgid "time signature symbol `%s' not found; reverting to numbered style"