From: Jan Nieuwenhuizen Date: Wed, 15 Mar 2000 15:45:18 +0000 (+0100) Subject: patch::: 1.3.34.jcn1 X-Git-Tag: release/1.3.35~3 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=a1d8d1db5b30025870fa8cc9da36ca982e126a5e;p=lilypond.git patch::: 1.3.34.jcn1 1.3.34.jcn1 =========== * Fixed vertical alignment for all dynamic items and (reluctantly) reinstated old directional behaviour for orphaned dynamics. * Finished maximumRestCount property. --- diff --git a/CHANGES b/CHANGES index 7f45cd778b..4ab7ac2c4a 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,11 @@ +1.3.34.jcn1 +=========== + +* Fixed vertical alignment for all dynamic items and (reluctantly) + reinstated old directional behaviour for orphaned dynamics. + +* Finished maximumRestCount property. + 1.3.34 ====== 1.3.33.hwn2 diff --git a/VERSION b/VERSION index 42ffa362e5..6edff1ff7e 100644 --- a/VERSION +++ b/VERSION @@ -2,7 +2,7 @@ PACKAGE_NAME=LilyPond MAJOR_VERSION=1 MINOR_VERSION=3 PATCH_LEVEL=34 -MY_PATCH_LEVEL= +MY_PATCH_LEVEL=jcn1 # use the above to send patches: MY_PATCH_LEVEL is always empty for a # released version. diff --git a/input/test/font-body.ly b/input/test/font-body.ly index 67bca85779..c640110777 100644 --- a/input/test/font-body.ly +++ b/input/test/font-body.ly @@ -51,8 +51,8 @@ c\longa*1/4 c\breve*1/2 c1 c2 c4 c8 a'^\flageolet \property Voice . textStyle = "roman" \time 1/2; a2 | - % \time 3/2; < a1. - % { s4 \ppp \< s4 \! s4 \fff s4 \> s4 \! s4\ppp} > + \time 3/2; < a1. + { s4 \ppp \< s4 \! s4 \fff s4 \> s4 \! s4\ppp} > | \time 2/4; a2 | \time 5/4; a1.. | diff --git a/input/test/maximum-rest-count.ly b/input/test/maximum-rest-count.ly index cbb02a484b..6e1759a170 100644 --- a/input/test/maximum-rest-count.ly +++ b/input/test/maximum-rest-count.ly @@ -1,18 +1,36 @@ \score{ -\context Staff \notes\relative c''{ -< a4 c e > -< r r r > -\property Staff.maximumRestCount = #3 -< r r r > -\property Staff.maximumRestCount = #2 -< r r r > -\property Staff.maximumRestCount = #1 -< r r r > -\property Staff.maximumRestCount = #0 -< r r r > -% urg -r -} +\context Staff \notes\relative c''< + \context Voice = x { + a4 + r + \property Voice.maximumRestCount = #3 + r + \property Staff.maximumRestCount = #2 + r + \property Staff.maximumRestCount = #1 + r + r8 r8 + c + } + \context Voice = y { + c4 + r + r + r + r + r + r + } + \context Voice = z { + e4 + r + r + r + r + r + r + } + > \paper{ } \midi{ diff --git a/lily/dynamic-engraver.cc b/lily/dynamic-engraver.cc index 9bd790f001..ea79cff0fe 100644 --- a/lily/dynamic-engraver.cc +++ b/lily/dynamic-engraver.cc @@ -29,8 +29,8 @@ /* TODO: - * fix vertical placement of orphaned items - * fix padding + * padding of orphaned items + * direction of orphaned items */ class Dynamic_line_spanner : public Spanner @@ -99,7 +99,6 @@ protected: virtual void do_process_music (); virtual void do_pre_move_processing (); virtual void do_post_move_processing (); - virtual void typeset_element (Score_element*); }; ADD_THIS_TRANSLATOR (Dynamic_engraver); @@ -174,7 +173,6 @@ Dynamic_engraver::do_process_music () line_spanner_ = new Dynamic_line_spanner; assert (pending_column_); line_spanner_->add_column (pending_column_); - side_position (line_spanner_).set_axis (Y_AXIS); announce_element (Score_element_info (line_spanner_, text_req_l_ ? text_req_l_ : span_req_l_drul_[START])); @@ -188,12 +186,37 @@ Dynamic_engraver::do_process_music () pending_element_arr_.clear (); } - if (span_req_l_drul_[START] || text_req_l_) + if (span_req_l_drul_[START] || span_req_l_drul_[STOP] || text_req_l_) last_request_mom_ = now_mom (); else - pending_element_arr_.clear (); + { + for (int i = 0; i < pending_element_arr_.size (); i++) + { + Score_element* e = pending_element_arr_[i]; + side_position (e).set_axis (Y_AXIS); + side_position (e).add_staff_support (); + + /* + UGH UGH + */ + Direction d = directional_element (e).get (); + if (!d) + { + SCM s = get_property ("dynamicDirection"); + if (!isdir_b (s)) + s = get_property ("verticalDirection"); + if (isdir_b (s)) + d = to_dir (s); + directional_element (e).set (d); + } + + SCM s = get_property ("dynamicPadding"); + if (gh_number_p (s)) + e->set_elt_property ("padding", s); + } + pending_element_arr_.clear (); + } - if (text_req_l_) { String loud = text_req_l_->text_str_; @@ -204,10 +227,12 @@ Dynamic_engraver::do_process_music () text_p_->set_elt_property ("style", gh_str02scm ("dynamic")); text_p_->set_elt_property ("script-priority", gh_int2scm (100)); + if (Direction d=text_req_l_->get_direction ()) + directional_element (text_p_).set (d); pending_element_arr_.push (text_p_); text_p_->set_elt_property ("self-alignment-Y", gh_int2scm (0)); text_p_->add_offset_callback (Side_position_interface::aligned_on_self, - Y_AXIS); + Y_AXIS); announce_element (Score_element_info (text_p_, text_req_l_)); } @@ -305,7 +330,6 @@ Dynamic_engraver::do_pre_move_processing () typeset_all (); } - void Dynamic_engraver::do_removal_processing () { @@ -318,18 +342,12 @@ Dynamic_engraver::do_removal_processing () typeset_all (); if (line_spanner_) { + side_position (line_spanner_).add_staff_support (); typeset_element (line_spanner_); line_spanner_ = 0; } } -void -Dynamic_engraver::typeset_element (Score_element* e) -{ - side_position (e).add_staff_support (); - Engraver::typeset_element (e); -} - void Dynamic_engraver::typeset_all () { @@ -352,6 +370,7 @@ Dynamic_engraver::typeset_all () * continue through piece */ if (line_spanner_ && last_request_mom_ < now_mom ()) { + side_position (line_spanner_).add_staff_support (); typeset_element (line_spanner_); line_spanner_ = 0; } diff --git a/lily/rest-collision.cc b/lily/rest-collision.cc index 2dd7aa890b..f551d0d253 100644 --- a/lily/rest-collision.cc +++ b/lily/rest-collision.cc @@ -86,14 +86,6 @@ Rest_collision::before_line_breaking () // meisjes met meisjes if (!ncol_l_arr.size()) { - - /* - Oeps, nu zie ik 't pas: colommen met noten. - Het commentaar, dat ik ooit geschreven had: meisjes met meisjes, - is achterhaald: urg. - - */ - Moment m = rhythmic_head2mom (col2rhythmic_head (rest_l_arr[0])); int i = 1; for (; i < rest_l_arr.size (); i++) @@ -112,20 +104,12 @@ Rest_collision::before_line_breaking () int display_count; SCM s = get_elt_property ("maximum-rest-count"); if (i == rest_l_arr.size () - && gh_number_p (s) && gh_int2scm (s) < rest_l_arr.size ()) + && gh_number_p (s) && gh_scm2int (s) < rest_l_arr.size ()) { - display_count = gh_int2scm (s); -#if 0 - /* - Setting surplus rests to transparent. - Only really necessary for maximum-rest-count == 0, - because rests wil be set at exact the same position - and thus overlap. - */ - for (i--;i > display_count; i--) + display_count = gh_scm2int (s); + for (; i > display_count; i--) col2rhythmic_head (rest_l_arr[i-1]) ->set_elt_property ("transparent", SCM_BOOL_T); -#endif } else display_count = rest_l_arr.size (); diff --git a/ly/engraver.ly b/ly/engraver.ly index f95e8cdf8d..4f828c01f0 100644 --- a/ly/engraver.ly +++ b/ly/engraver.ly @@ -113,7 +113,7 @@ VoiceContext = \translator { \type "Engraver_group_engraver"; \name Voice; - dynamicPadding = #2.0 + dynamicPadding = #10 % urg, in \pt Generic_property_list = #generic-voice-properties \consists "Output_property_engraver"; diff --git a/mutopia/Coriolan/coriolan-paper.ly b/mutopia/Coriolan/coriolan-paper.ly index 2b175075fc..83e40251d2 100644 --- a/mutopia/Coriolan/coriolan-paper.ly +++ b/mutopia/Coriolan/coriolan-paper.ly @@ -3,16 +3,10 @@ % slurs are never beautiful (no steep slurs) slur_beautiful = 0.0; - %% - %%\translator { \VoiceContext \remove "Dynamic_engraver"; } - \translator { \VoiceContext \name "VoiceOne"; - %% - %%\remove "Dynamic_engraver"; - %%\consists "Line_number_engraver"; verticalDirection = #1 stemVerticalDirection = #1 @@ -32,6 +26,7 @@ \HaraKiriStaffContext instrumentScriptPadding = #55 %% urg, this is in pt instrScriptPadding = #25 %% urg, this is in pt + maximumRestCount = #1 \accepts "VoiceOne"; \accepts "VoiceTwo"; } diff --git a/mutopia/Coriolan/coriolan-part-paper.ly b/mutopia/Coriolan/coriolan-part-paper.ly index 0610b3083d..10279f9557 100644 --- a/mutopia/Coriolan/coriolan-part-paper.ly +++ b/mutopia/Coriolan/coriolan-part-paper.ly @@ -1,11 +1,7 @@ \paper { % slurs are never beautiful (no steep slurs) slur_beautiful = 0.0; - \translator { - \OrchestralPartStaffContext - instrumentScriptPadding = #55 %% urg, this is in pt - instrScriptPadding = #25 %% urg, this is in pt - } + \translator { \VoiceContext \name "VoiceOne"; @@ -29,6 +25,10 @@ \StaffContext \accepts "VoiceOne"; \accepts "VoiceTwo"; + instrumentScriptPadding = #55 %% urg, this is in pt + instrScriptPadding = #25 %% urg, this is in pt + maximumRestCount = #1 } + \translator { \OrchestralPartStaffContext } \translator { \ScoreContext skipBars = ##t } } diff --git a/scm/lily.scm b/scm/lily.scm index f5965cb7f2..9933b82133 100644 --- a/scm/lily.scm +++ b/scm/lily.scm @@ -100,7 +100,7 @@ ;; (Measured in staff space) (define space-alist '( - (("" "Left_edge_item") . (minimum-space -15.0)) + (("" "Left_edge_item") . (extra-space -15.0)) (("" "Clef_item") . (minimum-space 1.0)) (("" "Staff_bar") . (minimum-space 0.0)) (("" "Clef_item") . (minimum-space 1.0))