//
// mudela-staff.cc -- implement Mudela_staff
//
-// copyright 1997 Jan Nieuwenhuizen <jan@digicash.com>
+// copyright 1997 Jan Nieuwenhuizen <janneke@gnu.org>
#include <assert.h>
#include <ctype.h>
instrument_str_ = instrument_str;
name_str_ = track_name_str;
mudela_key_l_ = 0;
- mudela_meter_l_ = 0;
+ mudela_time_signature_l_ = 0;
mudela_tempo_l_ = 0;
}
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 << " -> ";
+ LOGOUT(DEBUG_ver) << "At: " << i->at_mom ().str () << "; ";
+ LOGOUT(DEBUG_ver) << "dur: " << i->duration_mom ().str () << "; ";
+ LOGOUT(DEBUG_ver) << "mom: " << mom.str () << " -> ";
if (i->at_mom() > mom)
{
Moment dur = i->at_mom() - mom;
}
else if (i.ok())
i++;
- LOGOUT(DEBUG_ver) << "mom: " << mom << "\n";
+ LOGOUT(DEBUG_ver) << "mom: " << mom.str () << '\n';
}
}
{
if (name_str_.length_i())
return name_str_;
- return String ("track") + String (number_i_);
+ return String ("track") + to_str (number_i_);
}
void
{
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 << '\n';
+ mudela_stream_r << _ ("% midi copyright:") << copyright_str_ << '\n';
+ mudela_stream_r << _ ("% instrument:") << instrument_str_ << '\n';
+ // don't use last duration mode
+ // mudela_stream_r << "\\duration 4;\n";
if (mudela_voice_p_list_.size() == 1)
mudela_voice_p_list_.top()->output (mudela_stream_r);
else
}
mudela_stream_r << (mudela_voice_p_list_.size() > 1 ? "\n>" : "\n}");
- mudela_stream_r << " % " << name_str() << "\n";
+ mudela_stream_r << " % " << name_str() << '\n';
}
void
Mudela_staff::output_mudela_begin_bar (Mudela_stream& mudela_stream_r, Moment now_mom, int bar_i)
{
- Moment bar_mom = mudela_meter_l_->bar_mom();
+ Moment bar_mom = mudela_time_signature_l_->bar_mom();
Moment into_bar_mom = now_mom - Moment (bar_i - 1) * bar_mom;
if (bar_i > 1)
{
mudela_stream_r << "% " << String_convert::i2dec_str (bar_i, 0, ' ');
if (into_bar_mom)
mudela_stream_r << ":" << Duration_convert::dur2_str (Duration_convert::mom2_dur (into_bar_mom));
- mudela_stream_r << "\n";
+ mudela_stream_r << '\n';
}
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 bar_mom = mudela_time_signature_l_->bar_mom();
Moment now_mom = begin_mom;
int begin_bar_i = (int) (now_mom / bar_mom) + 1;
assert (mudela_score_l_g);
mudela_key_l_ = mudela_score_l_g->mudela_key_l_;
- mudela_meter_l_ = mudela_score_l_g->mudela_meter_l_;
+ mudela_time_signature_l_ = mudela_score_l_g->mudela_time_signature_l_;
mudela_tempo_l_ = mudela_score_l_g->mudela_tempo_l_;
Link_list<Mudela_item*> items;