#include "performance.hh"
#include "score.hh"
#include "file-results.hh"
+#include "file-path.hh"
#include "lily-version.hh"
#include "killing-cons.tcc"
for (int i =0; i < audio_staff_l_arr_.size (); i++)
{
Audio_staff *s = audio_staff_l_arr_[i];
- progress_indication ("[" + to_str (i)) ;
+ if(verbose_global_b)
+ progress_indication ("[" + to_str (i)) ;
/*
Aargh, let's hear it for the MIDI standard.
if (channel == 9)
channel++;
s->output (midi_stream, channel++);
- progress_indication ("]");
+ if(verbose_global_b)
+ progress_indication ("]");
}
}
Midi_track midi_track;
// perhaps multiple text events?
+ String id_str;
String str = String (_("Creator: "));
if (no_timestamps_global_b)
- str += gnu_lilypond_str ();
+ id_str = gnu_lilypond_str ();
else
- str += gnu_lilypond_version_str();
+ id_str = gnu_lilypond_version_str();
+ str += id_str;
str += "\n";
/*
Midi_text creator (&creator_a);
midi_track.add (Moment (0), &creator);
- str = _("Automatically generated");
+ str = _("Generated automatically by: ");
+ str += id_str;
if (no_timestamps_global_b)
str += ".\n";
else
audio_elem_p_list_ = new Killing_cons<Audio_element> (p, audio_elem_p_list_);
}
-void
-Performance::print() const
-{
-#ifndef NPRINT
- DEBUG_OUT << "Performance { ";
- DEBUG_OUT << "Items: ";
- for (Cons<Audio_element>* i =audio_elem_p_list_; i; i = i->next_)
- i->car_->print ();
- DEBUG_OUT << "}";
-#endif
-}
void
Performance::process()
{
- print ();
-
- String out = midi_l_->get_default_output ();
- if (out.empty_b ())
+ String out = outname_global;
+ if (out == "-")
+ out = "lelie.midi";
+ int def = midi_l_->get_next_default_count ();
+ if (def)
{
-
- out = default_outname_base_global;
- if (out == "-")
- out = "lelie";
- int def = midi_l_->get_next_default_count ();
- if (def)
- {
- out += "-" + to_str (def);
- }
-
- out += ".midi";
+ Path p = split_path (out);
+ p.base += "-" + to_str (def);
+ out = p.path ();
}
Midi_stream midi_stream (out);