source file of the GNU LilyPond music typesetter
- (c) 1997--1999 Jan Nieuwenhuizen <janneke@gnu.org>
+ (c) 1997--2000 Jan Nieuwenhuizen <janneke@gnu.org>
*/
#include <time.h>
#include "performance.hh"
#include "score.hh"
#include "file-results.hh"
+#include "file-path.hh"
#include "lily-version.hh"
#include "killing-cons.tcc"
midi_stream << Midi_header (1, tracks_i, clocks_per_4_i);
output_header_track (midi_stream);
- *mlog << "\n";
- *mlog << _ ("Track ... ");
+ progress_indication ("\n");
+ progress_indication (_ ("Track ... "));
int channel = 1;
for (int i =0; i < audio_staff_l_arr_.size (); i++)
{
- *mlog << '[' << flush;
Audio_staff *s = audio_staff_l_arr_[i];
-
- *mlog << i << flush;
+ 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++);
- *mlog << ']' << flush;
+ 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
midi_track.add (Moment (0), &track_name);
- Audio_tempo tempo_a (midi_l_->get_tempo_i (Moment (1, 4)));
- Midi_tempo tempo (&tempo_a);
- midi_track.add (Moment (0), &tempo);
+ // Some sequencers read track 0 last.
+ // Audio_tempo tempo_a (midi_l_->get_tempo_i (Moment (1, 4)));
+ // Midi_tempo tempo (&tempo_a);
+ // midi_track.add (Moment (0), &tempo);
midi_stream << midi_track;
}
audio_elem_p_list_ = new Killing_cons<Audio_element> (p, audio_elem_p_list_);
}
-void
-Performance::print() const
-{
-#ifndef NPRINT
- DOUT << "Performance { ";
- DOUT << "Items: ";
- for (Cons<Audio_element>* i =audio_elem_p_list_; i; i = i->next_)
- i->car_->print ();
- DOUT << "}";
-#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);
- *mlog << _f ("MIDI output to %s...", out) << endl;
+ progress_indication ( _f ("MIDI output to %s...", out));
target_str_global_array.push (out);
output (midi_stream);
- *mlog << endl;
+ progress_indication("\n");
}