// Moment mom = items.top()->at_mom();
Moment mom = 0;
- for (PCursor<Mudela_item*> i (items); i.ok();)
+ for (PCursor<Mudela_item*> i (items); i.ok();)
{
LOGOUT(DEBUG_ver) << "At: " << i->at_mom() << "; ";
LOGOUT(DEBUG_ver) << "dur: " << i->duration_mom() << "; ";
LOGOUT(DEBUG_ver) << "mom: " << mom << " -> ";
- if (i->at_mom() > mom)
+ if (i->at_mom() > mom)
{
Moment dur = i->at_mom() - mom;
// ugh, need score
voice_p->add_item (new Mudela_skip (start, dur));
mom = i->at_mom();
}
- if (i->at_mom() == mom)
+ if (i->at_mom() == mom)
{
mom = i->at_mom() + i->duration_mom();
voice_p->add_item (i.remove_p());
mudela_stream_r << "$" << id_str() << " = \\melodic";
mudela_stream_r << (mudela_voice_p_list_.size() > 1 ? "<" : "{");
mudela_stream_r << "\n";
- mudela_stream_r << "% midi copyright:" << copyright_str_ << "\n";
- mudela_stream_r << "% instrument:" << instrument_str_ << "\n";
+ mudela_stream_r << _("% midi copyright:") << copyright_str_ << "\n";
+ mudela_stream_r << _("% instrument:") << instrument_str_ << "\n";
if (mudela_voice_p_list_.size() == 1)
mudela_voice_p_list_.top()->output (mudela_stream_r);
else
- for (PCursor<Mudela_voice*> i (mudela_voice_p_list_); i.ok(); i++)
+ for (PCursor<Mudela_voice*> i (mudela_voice_p_list_); i.ok(); i++)
{
mudela_stream_r << "{ ";
i->output (mudela_stream_r);
{
Moment bar_mom = mudela_meter_l_->bar_mom();
Moment into_bar_mom = now_mom - Moment (bar_i - 1) * bar_mom;
- if (bar_i > 1)
+ if (bar_i > 1)
{
if (!into_bar_mom)
mudela_stream_r << "|\n";
#if 0 // not used for now
-void
+void
Mudela_staff::output_mudela_rest (Mudela_stream& mudela_stream_r, Moment begin_mom, Moment end_mom)
{
Moment bar_mom = mudela_meter_l_->bar_mom();
Moment now_mom = begin_mom;
- int begin_bar_i = (int) (now_mom / bar_mom) + 1;
+ int begin_bar_i = (int) (now_mom / bar_mom) + 1;
int end_bar_i = (int) (end_mom / bar_mom) + 1;
- if (end_bar_i == begin_bar_i)
+ if (end_bar_i == begin_bar_i)
{
output_mudela_rest_remain (mudela_stream_r, end_mom - begin_mom);
return;
//fill current bar
Moment begin_bar_mom = Moment (begin_bar_i - 1) * bar_mom;
- if (now_mom > begin_bar_mom)
+ if (now_mom > begin_bar_mom)
{
- int next_bar_i = (int) (now_mom / bar_mom) + 2;
+ int next_bar_i = (int) (now_mom / bar_mom) + 2;
Moment next_bar_mom = Moment (next_bar_i - 1) * bar_mom;
assert (next_bar_mom <= end_mom);
Moment remain_mom = next_bar_mom - now_mom;
- if (remain_mom > Moment (0))
+ if (remain_mom > Moment (0))
{
output_mudela_rest_remain (mudela_stream_r, remain_mom);
now_mom += remain_mom;
// fill whole bars
int count_i = end_bar_i - bar_i;
- for (int i = 0; i < count_i; i++)
+ for (int i = 0; i < count_i; i++)
{
int begin_bar_i = check_begin_bar_i (now_mom, bar_i);
if (begin_bar_i)
mudela_stream_r << "r1 ";
// *mudela_stream_r.os_p_ << flush;
if (begin_bar_i)
- LOGOUT(NORMAL_ver) << begin_bar_i << flush;
+ LOGOUT(NORMAL_ver) << begin_bar_i << flush;
bar_i = check_end_bar_i (now_mom, bar_i);
now_mom += bar_mom;
}
// bar_i = check_end_bar_i (now_mom, bar_i);
Moment remain_mom = end_mom - Moment (end_bar_i - 1) * bar_mom;
- if (remain_mom > Moment (0))
+ if (remain_mom > Moment (0))
{
output_mudela_rest_remain (mudela_stream_r, remain_mom);
now_mom += remain_mom;
void
Mudela_staff::output_mudela_rest_remain (Mudela_stream& mudela_stream_r, Moment mom)
{
- if (Duration_convert::no_quantify_b_s)
+ if (Duration_convert::no_quantify_b_s)
{
Duration dur = Duration_convert::mom2_dur (mom);
mudela_stream_r << "r" << dur.str() << " ";
assert (mom == dur.length());
return;
}
-
+
Duration dur = Duration_convert::mom2standardised_dur (mom);
if (dur.type_i_>-10)
mudela_stream_r << "r" << dur.str() << " ";
void
Mudela_staff::process()
{
- /*
+ /*
group items into voices
*/
Link_list<Mudela_item*> items;
for (PCursor<Mudela_item*> i (mudela_item_p_list_); i.ok(); i++)
items.bottom().add (*i);
-
+
while (items.size())
eat_voice (items);
}
-