+pl 33.jcn1
+ - allow autobeaming according to duration iso (crude) multiplicity
+
pl 32.mb1
- bf: \> and \< were interchanged!!
- Added property: textScriptPadding
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.
--- /dev/null
+\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;
+ }
+ }
+}
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;
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)
/*
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 ())
/*
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 ())
finished_grouping_p_ = grouping_p_;
beam_p_ = 0;
grouping_p_ = 0;
- mult_i_ = 0;
+ shortest_mom_ = 1;
}
}
}
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);
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
void junk_beam ();
void typeset_beam ();
- int mult_i_;
+ Moment shortest_mom_;
Beam *finished_beam_p_;
Beam *beam_p_;
Moment last_add_mom_;
%
% 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";
+
\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;