X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fperformance.cc;h=436224bde8ae3c95417bb64f6d8f3dfa48f11df4;hb=a2991295b2c1fb36bec19de207161855ca3c1756;hp=9e8715b1116d757bdec861186b7a44963f310fd5;hpb=5d5fbb2641fda6605cde61ebcd99b9bef2e94b4a;p=lilypond.git diff --git a/lily/performance.cc b/lily/performance.cc index 9e8715b111..436224bde8 100644 --- a/lily/performance.cc +++ b/lily/performance.cc @@ -32,7 +32,7 @@ Performance::Performance () } -Performance::~Performance() +Performance::~Performance () { delete audio_elem_p_list_; } @@ -40,7 +40,7 @@ Performance::~Performance() void Performance::output (Midi_stream& midi_stream) { - int tracks_i = audio_staff_l_arr_.size() + 1; + int tracks_i = audio_staff_l_arr_.size () + 1; // ugh int clocks_per_4_i = 384; @@ -53,7 +53,7 @@ Performance::output (Midi_stream& midi_stream) for (int i =0; i < audio_staff_l_arr_.size (); i++) { Audio_staff *s = audio_staff_l_arr_[i]; - if(verbose_global_b) + if (verbose_global_b) progress_indication ("[" + to_str (i)) ; /* @@ -64,7 +64,7 @@ Performance::output (Midi_stream& midi_stream) if (channel == 9) channel++; s->output (midi_stream, channel++); - if(verbose_global_b) + if (verbose_global_b) progress_indication ("]"); } } @@ -76,11 +76,8 @@ Performance::output_header_track (Midi_stream& midi_stream) // perhaps multiple text events? String id_str; - String str = String (_("Creator: ")); - if (no_timestamps_global_b) - id_str = gnu_lilypond_str (); - else - id_str = gnu_lilypond_version_str(); + String str = String (_ ("Creator: ")); + id_str = String_convert::pad_to (gnu_lilypond_version_str (), 40); str += id_str; str += "\n"; @@ -95,19 +92,15 @@ Performance::output_header_track (Midi_stream& midi_stream) /* Better not translate this */ str = "Generated automatically by: "; str += id_str; - if (no_timestamps_global_b) - str += ".\n"; - else - { - str += _(", at "); - time_t t (time (0)); - str += ctime (&t); - str = str.left_str (str.length_i() - 1); - } + str += _ (", at "); + time_t t (time (0)); + str += ctime (&t); + str = str.left_str (str.length_i () - 1); /* Pad out time stamps to 120 chars. */ - str = str + to_str (' ' , (120 - str.length_i ()) >? 0); + + str = String_convert::pad_to (str, 120); Audio_text generate_a (Audio_text::TEXT, str); Midi_text generate (&generate_a); @@ -140,7 +133,7 @@ Performance::add_element (Audio_element *p) { audio_staff_l_arr_.push (s); } - else if (Audio_column *c = dynamic_cast(p)) + else if (Audio_column *c = dynamic_cast (p)) { c->performance_l_ = this; } @@ -149,7 +142,7 @@ Performance::add_element (Audio_element *p) void -Performance::process() +Performance::process () { String out = output_name_global; if (out == "-") @@ -168,9 +161,9 @@ Performance::process() out = p.str (); Midi_stream midi_stream (out); - progress_indication ( _f ("MIDI output to %s...", out)); + progress_indication (_f ("MIDI output to %s...", out)); target_str_global_array.push (out); output (midi_stream); - progress_indication("\n"); + progress_indication ("\n"); }