source file of the GNU LilyPond music typesetter
- (c) 1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+ (c) 1997--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
*/
#include "timing-translator.hh"
}
bool
-Timing_translator::do_try_request(Request*r)
+Timing_translator::do_try_music (Music*r)
{
if (Timing_req *t = dynamic_cast <Timing_req *> (r))
{
{
if (timing_req_l_arr_[i]->equal_b(t))
return true;
- if (timing_req_l_arr_[i]->name() == r->name())
+ if (String (classname (timing_req_l_arr_[i])) == classname (r))
{
r->warning (_ ("conflicting timing request"));
return false;
else
{
time_.set_time_signature (b_i, o_i);
+
default_grouping_ =
- Rhythmic_grouping (MInterval (0,Moment (b_i, o_i)), b_i);
+ Rhythmic_grouping (MInterval (0,Moment (b_i, o_i)),
+ b_i == 1 ? 2 : b_i);
}
}
else if (Partial_measure_req *pm = dynamic_cast <Partial_measure_req *> (tr_l))
{
- Moment m = pm->duration_;
+ Moment m = pm->length_mom_;
String error = time_.try_set_partial_str (m);
if (error.length_i ())
{
time_.whole_in_measure_ = 0; // resync
time_.error_b_ = true;
}
-
}
else if (Cadenza_req *cr = dynamic_cast <Cadenza_req *> (tr_l))
{
}
}
+
+ Translator_group * tr=0;
+
+ Scalar barn = get_property ("currentBarNumber", &tr);
+ if (!barn.empty_b () && barn.isnum_b ())
+ {
+ time_.bars_i_ = int(barn);
+ tr->set_property ("currentBarNumber", "");
+ }
+
+
}
/* allbars == ! skipbars */
- bool allbars = ! get_property ("SkipBars").to_bool ();
-
+ bool allbars = ! get_property ("skipBars", 0).to_bool ();
+ // urg: multi bar rests: should always must process whole of first bar?
if (!time_.cadenza_b_ && allbars)
global_l->add_moment_to_process (time_.next_bar_moment ());
}
-IMPLEMENT_IS_TYPE_B1(Timing_translator, Translator);
+
ADD_THIS_TRANSLATOR(Timing_translator);
void
Timing_translator::do_creation_processing()
{
- time_.when_ = now_moment ();
+ time_.when_ = now_mom ();
}
void
Timing_translator::do_post_move_processing()
{
- time_.add (now_moment () - time_.when_);
+ time_.add (now_mom () - time_.when_);
+
+
}
void