From: Jan Nieuwenhuizen Date: Mon, 8 Mar 1999 20:15:02 +0000 (+0100) Subject: patch::: 1.1.33.jcn1: Re: jcn1 X-Git-Tag: release/1.1.34~3 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=c4e1eb5f1a1196b393fa9e32a99b34f01fdc2b29;p=lilypond.git patch::: 1.1.33.jcn1: Re: jcn1 pl 33.jcn1 - allow autobeaming according to duration iso (crude) multiplicity --- diff --git a/NEWS b/NEWS index 6034166157..d4ffd6d070 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,6 @@ +pl 33.jcn1 + - allow autobeaming according to duration iso (crude) multiplicity + pl 32.mb1 - bf: \> and \< were interchanged!! - Added property: textScriptPadding diff --git a/VERSION b/VERSION index 374f94ba07..acfa121bf2 100644 --- a/VERSION +++ b/VERSION @@ -2,7 +2,7 @@ PACKAGE_NAME=LilyPond MAJOR_VERSION=1 MINOR_VERSION=1 PATCH_LEVEL=33 -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/auto-beam-triplet.ly b/input/test/auto-beam-triplet.ly new file mode 100644 index 0000000000..4f3e4b7f62 --- /dev/null +++ b/input/test/auto-beam-triplet.ly @@ -0,0 +1,13 @@ +\score{ + \notes\relative c''{ + c8 c c c + \times 2/3 { c c c c c c} + } + \paper{ + % urg, avoid crash + \translator{ + \VoiceContext + \remove Tuplet_engraver; + } + } +} diff --git a/lily/auto-beam-engraver.cc b/lily/auto-beam-engraver.cc index a29ec75e67..c4c72ea4bb 100644 --- a/lily/auto-beam-engraver.cc +++ b/lily/auto-beam-engraver.cc @@ -22,7 +22,7 @@ ADD_THIS_TRANSLATOR (Auto_beam_engraver); Auto_beam_engraver::Auto_beam_engraver () { beam_p_ = 0; - mult_i_ = 0; + shortest_mom_ = 1; finished_beam_p_ = 0; finished_grouping_p_ = 0; grouping_p_ = 0; @@ -41,8 +41,11 @@ Auto_beam_engraver::consider_end_and_begin () int num = time->whole_per_measure_ / time->one_beat_; int den = time->one_beat_.den_i (); String time_str = String ("time") + to_str (num) + "_" + to_str (den); - int type = 1 << (mult_i_ + 2); - String type_str = to_str (type); + String type_str; + if (shortest_mom_.num () != 1) + type_str = to_str (shortest_mom_.num ()); + if (shortest_mom_.den () != 1) + type_str = type_str + "_" + to_str (shortest_mom_.den ()); /* Determine end moment for auto beaming (and begin, mostly 0==anywhere) @@ -92,7 +95,7 @@ Auto_beam_engraver::consider_end_and_begin () /* third guess: property time exception, specific for duration type */ - if (mult_i_) + if (type_str.length_i ()) { Scalar end_mult = get_property (time_str + "beamAutoEnd" + type_str, 0); if (end_mult.length_i ()) @@ -116,7 +119,7 @@ Auto_beam_engraver::consider_end_and_begin () /* fifth guess [user override]: property plain, specific for duration type */ - if (mult_i_) + if (type_str.length_i ()) { Scalar end_mult = get_property (String ("beamAutoEnd") + type_str, 0); if (end_mult.length_i ()) @@ -194,7 +197,7 @@ Auto_beam_engraver::end_beam () finished_grouping_p_ = grouping_p_; beam_p_ = 0; grouping_p_ = 0; - mult_i_ = 0; + shortest_mom_ = 1; } } @@ -300,17 +303,16 @@ Auto_beam_engraver::acknowledge_element (Score_element_info info) } else { - int m = (rhythmic_req->duration_.durlog_i_ - 2); /* - if multiplicity would become greater, + if shortest duration would change reconsider ending/starting beam first. */ - if (m > mult_i_) + Moment mom = rhythmic_req->duration_.length_mom (); + if (mom < shortest_mom_) { - mult_i_ = m; + shortest_mom_ = mom; consider_end_and_begin (); } - mult_i_ = m; grouping_p_->add_child (start, rhythmic_req->length_mom ()); stem_l->flag_i_ = rhythmic_req->duration_.durlog_i_; beam_p_->add_stem (stem_l); @@ -325,22 +327,11 @@ void Auto_beam_engraver::junk_beam () { assert (beam_p_); -#if 0 - for (int i=0; i < beam_p_->stems_.size (); i++) - { - Stem* s = beam_p_->stems_[i]; - s->beams_i_drul_[LEFT] = 0; - s->beams_i_drul_[RIGHT] = 0; - s->mult_i_ = 0; - s->beam_l_ = 0; - } -#endif - beam_p_->unlink (); beam_p_ = 0; delete grouping_p_; grouping_p_ = 0; - mult_i_ = 0; + shortest_mom_ = 1; } void diff --git a/lily/include/auto-beam-engraver.hh b/lily/include/auto-beam-engraver.hh index a2ebc6d4cc..671967ba0a 100644 --- a/lily/include/auto-beam-engraver.hh +++ b/lily/include/auto-beam-engraver.hh @@ -33,7 +33,7 @@ private: void junk_beam (); void typeset_beam (); - int mult_i_; + Moment shortest_mom_; Beam *finished_beam_p_; Beam *beam_p_; Moment last_add_mom_; diff --git a/ly/auto-beam-settings.ly b/ly/auto-beam-settings.ly index 09113b139d..b24a713d41 100644 --- a/ly/auto-beam-settings.ly +++ b/ly/auto-beam-settings.ly @@ -1,25 +1,31 @@ % % setup for auto beamer % + +% *num_den (omitted if "1") + time2_8beamAutoEnd = "2/8"; time3_2beamAutoEnd = "1/2"; -time3_2beamAutoEnd16 = "1/4"; -time3_2beamAutoEnd32 = "1/8"; +time3_2beamAutoEnd_16 = "1/4"; +time3_2beamAutoEnd_32 = "1/8"; time3_4beamAutoBegin = "1/4"; -time3_4beamAutoEnd8 = "3/4"; -time3_4beamAutoBegin32 = "1/8"; -time3_4beamAutoEnd32 = "1/8"; +time3_4beamAutoEnd_8 = "3/4"; +time3_4beamAutoBegin_32 = "1/8"; +time3_4beamAutoEnd_32 = "1/8"; time3_8beamAutoBegin = "1/8"; time3_8beamAutoEnd = "3/8"; -time4_4beamAutoEnd8 = "1/2"; -time4_4beamAutoEnd32 = "1/8"; -time4_8beamAutoEnd8 = "1/4"; -time4_8beamAutoEnd16 = "1/4"; -time4_8beamAutoEnd32 = "1/8"; +time4_4beamAutoEnd_8 = "1/2"; +% 1/12 == 1/8 * 2/3 +time4_4beamAutoEnd_12 = "1/4"; +time4_4beamAutoEnd_32 = "1/8"; +time4_8beamAutoEnd_8 = "1/4"; +time4_8beamAutoEnd_16 = "1/4"; +time4_8beamAutoEnd_32 = "1/8"; time4_16beamAutoEnd = "1/8"; -time6_8beamAutoEnd8 = "3/8"; -time6_8beamAutoEnd16 = "3/8"; -time6_8beamAutoEnd32 = "1/8"; -time9_8beamAutoEnd8 = "3/8"; -time9_8beamAutoEnd16 = "3/8"; -time6_8beamAutoEnd32 = "1/8"; +time6_8beamAutoEnd_8 = "3/8"; +time6_8beamAutoEnd_16 = "3/8"; +time6_8beamAutoEnd_32 = "1/8"; +time9_8beamAutoEnd_8 = "3/8"; +time9_8beamAutoEnd_16 = "3/8"; +time6_8beamAutoEnd_32 = "1/8"; + diff --git a/mutopia/N.W.Gade/score.ly b/mutopia/N.W.Gade/score.ly index 23181116e2..6f858159ab 100644 --- a/mutopia/N.W.Gade/score.ly +++ b/mutopia/N.W.Gade/score.ly @@ -132,18 +132,18 @@ copyright = "Mats Bengtsson, 1999. Free circulation permitted and " + \score{ \type StaffGroup < - \oboe - \flauto - \type Staff = cor {\notes \transpose bes <\clarI \clarII >} - \fagotto - \type Staff = cor {\notes \transpose f <\corI \corII >} - \type Staff = cor {\notes \transpose bes <\trpI \trpII >} - \timpani - \viI - \viII - \vla - \vlc - \cb + \type Staff = oboe \oboe + \type Staff = flauto \flauto + \type Staff = clarinetsInBes {\notes \transpose bes <\clarI \clarII >} + \type Staff = fagotto \fagotto + \type Staff = corniInF {\notes \transpose f <\corI \corII >} + \type Staff = trumpetsInBes {\notes \transpose bes <\trpI \trpII >} + \type Staff = timpani \timpani + \type Staff = violinoi \viI + \type Staff = violinoii \viII + \type Staff = viola \vla + \type Staff = violoncello \vlc + \type Staff = contrabass \cb > \midi { \tempo 4=120;