From dab42653efbd768ca13200124d925531107f8dc1 Mon Sep 17 00:00:00 2001 From: fred Date: Tue, 26 Mar 2002 23:21:57 +0000 Subject: [PATCH] lilypond-1.3.52 --- Documentation/regression-test.tely | 11 +++++++++++ input/bugs/auto-beam-tuplets.ly | 10 ++++++++++ input/test/keys.ly | 6 ++---- input/test/orchestscore.ly | 4 +++- lily/include/key-engraver.hh | 3 ++- lily/include/system-start-delimiter.hh | 1 + lily/key-engraver.cc | 21 +++++++++++++-------- lily/system-start-delimiter.cc | 23 +++++++++++++++++++---- ly/engraver.ly | 2 ++ 9 files changed, 63 insertions(+), 18 deletions(-) create mode 100644 input/bugs/auto-beam-tuplets.ly diff --git a/Documentation/regression-test.tely b/Documentation/regression-test.tely index 3aa7844041..d2b24987f6 100644 --- a/Documentation/regression-test.tely +++ b/Documentation/regression-test.tely @@ -348,8 +348,17 @@ way, so this is fragile as well. @mudelafile{clefs.ly} + +Key signatures appear on key changes. They may also +appear without barlines. The restoration accidentals are not printed at +the start of the line. If @code{createKeyOnClefChange} is set, they're +also created on a clef change. + +@mudelafile{keys.ly} + @ignore @c the input file is too long and does not test for specific bugs + By default, time signatures are written with two numbers. With style ``C'', 4/4 and 2/2 are written with their corresponding symbols and with style ``old'', 2/2, 3/2, 2/4, 3/4, 4/4, 6/4, 9/4, 4/8, 6/8 and @@ -360,6 +369,8 @@ signatures. \mu delafile{time.ly} @end ignore + + @section Hacks and Features As a last resort, the placement of items can be adjusted manually. diff --git a/input/bugs/auto-beam-tuplets.ly b/input/bugs/auto-beam-tuplets.ly new file mode 100644 index 0000000000..3af118fafb --- /dev/null +++ b/input/bugs/auto-beam-tuplets.ly @@ -0,0 +1,10 @@ +\score { \notes { + \property Voice.tupletSpannerDuration = #(make-moment 1 4) + \property Voice.tupletNumberVisibility = #'if-no-beam + \property Voice.tupletBracketVisibility = #'if-no-beam + % Gm7 / F | A7 / Dm | + \times 2/3 { + [f,8 bes, d] [g d bes,] [f, a, c] [f c a,] | e, a, cis e cis a, d, f, a, d a, f, | + % Db | + des, aes, des f des aes, des, aes, des f des aes, | } +}} diff --git a/input/test/keys.ly b/input/test/keys.ly index 0d49507e5f..98ddbe08b0 100644 --- a/input/test/keys.ly +++ b/input/test/keys.ly @@ -1,13 +1,11 @@ \version "1.3.42"; -%{ -test key itemv breaking -%} \score { \notes \relative c'' { + \property Staff. createKeyOnClefChange = ##t \key bes; c2 \key c \minor; c2 \break - \key bes \major; c1 \key d;\break c1 + \key bes \major; c2 \clef alto; c2 \key d; c1 } } diff --git a/input/test/orchestscore.ly b/input/test/orchestscore.ly index d13b04c84a..ccf4d926e1 100644 --- a/input/test/orchestscore.ly +++ b/input/test/orchestscore.ly @@ -1,6 +1,7 @@ \version "1.3.42"; m = \notes \relative c''{ + c1 | c2 c | c c | c c | \break c c | c c | c c | c c | } @@ -89,7 +90,8 @@ c1 | c2 c | c c | c c | \break c c | c c | c c | c c | \translator { \OrchestralScoreContext barNumberScriptPadding = 10; - minVerticalAlign = 2.2*\staffheight; + minVerticalAlign = 2.2*\staffheight; + } \translator { \StaffContext \consists "Instrument_name_engraver"; diff --git a/lily/include/key-engraver.hh b/lily/include/key-engraver.hh index f91f7eea8b..171ef13e9e 100644 --- a/lily/include/key-engraver.hh +++ b/lily/include/key-engraver.hh @@ -18,7 +18,7 @@ Make the key signature. */ class Key_engraver : public Engraver { - void create_key(); + void create_key(bool); void read_req (Key_change_req const * r); public: @@ -32,6 +32,7 @@ public: Key key_; Key_change_req * keyreq_l_; Key_item * item_p_; + Array accidental_idx_arr_; Array old_accidental_idx_arr_; diff --git a/lily/include/system-start-delimiter.hh b/lily/include/system-start-delimiter.hh index 7d7b5c6977..d594c7ff87 100644 --- a/lily/include/system-start-delimiter.hh +++ b/lily/include/system-start-delimiter.hh @@ -21,6 +21,7 @@ public: System_start_delimiter (); VIRTUAL_COPY_CONS (Score_element); protected: + virtual void after_line_breaking(); virtual Molecule do_brew_molecule () const; Molecule staff_bracket (Real) const; Molecule staff_brace (Real) const; diff --git a/lily/key-engraver.cc b/lily/key-engraver.cc index 6d01fb2b6d..e4b76f68d8 100644 --- a/lily/key-engraver.cc +++ b/lily/key-engraver.cc @@ -29,7 +29,7 @@ Key_engraver::key_changed_b () const } void -Key_engraver::create_key () +Key_engraver::create_key (bool def) { if (!item_p_) { @@ -65,6 +65,12 @@ Key_engraver::create_key () item_p_->add_old (m_l.notename_i_, a); } } + + + if (!def) + item_p_->set_elt_property ("visibility-lambda", + scm_eval (ly_symbol2scm ("all-visible"))); + } @@ -89,12 +95,15 @@ Key_engraver::acknowledge_element (Score_element_info info) { SCM c = get_property ("createKeyOnClefChange"); if (to_boolean (c)) - create_key (); + { + create_key (false); + + } } else if (dynamic_cast (info.elem_l_) && accidental_idx_arr_.size ()) { - create_key (); + create_key (true); } } @@ -104,7 +113,7 @@ Key_engraver::do_process_music () { if (keyreq_l_) { - create_key (); + create_key (false); } } @@ -113,10 +122,6 @@ Key_engraver::do_pre_move_processing () { if (item_p_) { - if (keyreq_l_) - item_p_->set_elt_property ("visibility-lambda", - scm_eval (ly_symbol2scm ("all-visible"))); - typeset_element (item_p_); item_p_ = 0; } diff --git a/lily/system-start-delimiter.cc b/lily/system-start-delimiter.cc index 130a6328fc..be44c6c6e2 100644 --- a/lily/system-start-delimiter.cc +++ b/lily/system-start-delimiter.cc @@ -51,7 +51,19 @@ System_start_delimiter::simple_bar (Real h) const Real w = paper_l ()->get_var ("barthick_score"); return lookup_l ()->filledbox (Box (Interval(0,w), Interval(-h/2, h/2))); } - + +void +System_start_delimiter::after_line_breaking () +{ + SCM gl = get_elt_property ("glyph"); + + if (scm_ilength (get_elt_property ("elements")) <= 1 && gl == ly_symbol2scm ("bar-line")) + { + set_elt_property ("transparent", SCM_BOOL_T); + set_extent_callback (0, X_AXIS); + set_extent_callback (0, Y_AXIS); + } +} Molecule System_start_delimiter::do_brew_molecule ()const @@ -72,11 +84,14 @@ System_start_delimiter::do_brew_molecule ()const s = get_elt_property ("glyph"); - if (gh_symbol_p (s) && s == ly_symbol2scm ("bracket")) + if (!gh_symbol_p(s)) + return m; + + if (s == ly_symbol2scm ("bracket")) m = staff_bracket (l); - else if (gh_symbol_p (s) && s == ly_symbol2scm ("brace")) + else if ( s == ly_symbol2scm ("brace")) m = staff_brace (l); - else + else if (s == ly_symbol2scm ("bar-line")) m = simple_bar (l); diff --git a/ly/engraver.ly b/ly/engraver.ly index 68e35d82bc..f52fb942b4 100644 --- a/ly/engraver.ly +++ b/ly/engraver.ly @@ -376,6 +376,8 @@ ScoreContext = \translator { alignmentReference = \down; defaultClef = #"treble" defaultBarType = #"|" + systemStartDelimiterGlyph = #'bar-line + \accepts "Staff"; \accepts "StaffGroup"; \accepts "RhythmicStaff"; -- 2.39.5