]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/midi-def.cc
release: 1.0.1
[lilypond.git] / lily / midi-def.cc
index 1415298439c1fc7d6da9c0d4a727dee4f3d1415c..202205d0899524a71a60fd9cf34cb54d1d4ccd11 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c) 1997 Jan Nieuwenhuizen <jan@digicash.com>
+  (c)  1997--1998 Jan Nieuwenhuizen <janneke@gnu.org>
 
 */
 #include <math.h>
@@ -23,7 +23,6 @@
 
 Midi_def::Midi_def()
 {
-  outfile_str_ = ""; 
   // ugh
   set_tempo (Moment (1, 4), 60);
 }
@@ -54,19 +53,26 @@ void
 Midi_def::set_tempo (Moment one_beat_mom, int beats_per_minute_i)
 {
   Moment beats_per_second = Moment (beats_per_minute_i) / Moment (60);
-  whole_in_seconds_mom_ = 1/(beats_per_second * one_beat_mom);
+  whole_in_seconds_mom_ = Moment(1)/Moment(beats_per_second * one_beat_mom);
 }
 
 void
 Midi_def::print() const
 {
 #ifndef NPRINT
+  Music_output_def::print ();
   DOUT << "Midi {";
-  DOUT << "4/min: " << Real (60) / (whole_in_seconds_mom_ * 4);
-  DOUT << "out: " << outfile_str_;
+  DOUT << "4/min: " << Moment (60) / (whole_in_seconds_mom_ * Moment (4));
   DOUT << "}\n";
 #endif
 }
 
 
 IMPLEMENT_IS_TYPE_B1(Midi_def, Music_output_def);
+
+int Midi_def::default_count_i_=0;
+int
+Midi_def::get_next_default_count () const
+{
+  return default_count_i_++;
+}