]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/include/midi-def.hh
release: 1.0.1
[lilypond.git] / lily / include / midi-def.hh
index 9673783d25fed2cecd240c36ebd37f197d172e6d..dcf0a9819dc7e7806e22b48a331b59584ec05ce4 100644 (file)
@@ -3,40 +3,40 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c) 1997 Jan Nieuwenhuizen <jan@digicash.com>
+  (c)  1997--1998 Jan Nieuwenhuizen <janneke@gnu.org>
 */
 
 
-#ifndef MIDIDEF_HH
-#define MIDIDEF_HH
+#ifndef MIDI_DEF_HH
+#define MIDI_DEF_HH
+
 #include "lily-proto.hh"
 #include "real.hh"
 #include "string.hh"
 #include "moment.hh"
-
+#include "music-output-def.hh"
 
 /** 
+  definitions for midi output. Rather empty
  */
-struct Midi_def {
-    // ugh!
-    static int den_i_s;
-    static int num_i_s;
-
-    /// output file name
-    String outfile_str_;
-
-    /// duration of whole note
-    Real whole_seconds_f_;
-
-    Midi_def();
-    Midi_def(Midi_def const& midi_c_r);
-    ~Midi_def();
-
-    Real duration_to_seconds_f(Moment);
-    int get_tempo_i( Moment moment );
-    void set_tempo( Moment moment, int count_per_minute_i );
-    void print() const;
+class Midi_def : public Music_output_def {
+  static int default_count_i_;
+public:
+  VIRTUAL_COPY_CONS(Midi_def, Music_output_def);
+  DECLARE_MY_RUNTIME_TYPEINFO;
+
+  /// duration of whole note measured in seconds.
+  Moment whole_in_seconds_mom_;
+
+  Midi_def();
+  ~Midi_def();
+
+  Real duration_to_seconds_f (Moment);
+  int get_tempo_i (Moment moment);
+  void print() const;
+  void set_tempo (Moment moment, int count_per_minute_i);
+  virtual int get_next_default_count () const;
 };
 
-#endif // MIDIDEF_HH //
+#endif // MIDI_DEF_HH