- Midi_track midi_track;
-
- time_t t = time (0);
-
- // perhaps multiple text events?
- String str = String (_("Creator: ")) + get_version_str() + "\n";
-
- Midi_text creator (Midi_text::TEXT, str);
- midi_track.add (Moment (0), &creator);
-
- str = _("Automatically generated at ");
- str += ctime (&t);
- str = str.left_str (str.length_i() - 1);
- str += "\n";
- Midi_text generate (Midi_text::TEXT, str);
- midi_track.add (Moment (0), &generate);
-
- str = _("from musical definition: ");
-
- str += origin_str_;
- Midi_text from (Midi_text::TEXT, str);
- midi_track.add (Moment (0), &from);
-
- Midi_text track_name (Midi_text::TRACK_NAME, "Track "
- + String_convert::i2dec_str (0, 0, '0'));
- midi_track.add (Moment (0), &track_name);
-
- Midi_tempo tempo (midi_l_->get_tempo_i (Moment (1, 4)));
- midi_track.add (Moment (0), &tempo);
-
- midi_stream_r << midi_track;