2 // lilypond-item.hh -- declare lilypond_item
4 // (c) 1997--2001 Jan Nieuwenhuizen <janneke@gnu.org>
6 #ifndef LILYPOND_ITEM_HH
7 #define LILYPOND_ITEM_HH
9 #include "midi2ly-proto.hh"
11 #include "rational.hh"
12 #include "duration.hh"
15 // * be Lilypond_items
16 // * be Voice_elements/requests
17 // * get a name-change
24 Lilypond_item (Lilypond_column* lilypond_column_l);
25 virtual ~Lilypond_item ();
27 virtual Rational at_mom ();
28 virtual Rational duration_mom ();
29 void output (Lilypond_stream& lilypond_stream_r);
30 virtual String str () = 0;
32 Lilypond_column* lilypond_column_l_;
35 class Lilypond_key : public Lilypond_item
38 Lilypond_key (int accidentals_i, int minor_i);
40 String notename_str (int pitch_i);
41 virtual String str ();
48 class Lilypond_time_signature : public Lilypond_item
51 Lilypond_time_signature (int num_i, int den_i, int division_4_i, int count_32_i);
53 Duration i2_dur (int time_i, int division_1_i);
57 virtual String str ();
68 class Lilypond_note : public Lilypond_item
71 Lilypond_note (Lilypond_column* lilypond_column_l, int channel_i, int pitch_i, int dyn_i);
74 virtual Rational duration_mom ();
75 virtual String str ();
77 // int const c0_pitch_i_c_ = 60; // huh?
78 static int const c0_pitch_i_c_ = 48;
80 static bool const simple_plet_b_s = false;
83 Lilypond_column* end_column_l_;
86 class Lilypond_skip : public Lilypond_item
89 Lilypond_skip (Lilypond_column* lilypond_column_l, Rational skip_mom);
92 virtual Rational duration_mom ();
93 virtual String str ();
100 class Lilypond_tempo : public Lilypond_item
103 Lilypond_tempo (int useconds_per_4_i);
105 int get_tempo_i (Rational rational);
106 virtual String str ();
107 int useconds_per_4_i ();
110 int useconds_per_4_i_;
111 Rational seconds_per_1_mom_;
114 class Lilypond_text : public Lilypond_item
118 TEXT = 1, COPYRIGHT, TRACK_NAME, INSTRUMENT_NAME, LYRIC,
121 Lilypond_text (Lilypond_text::Type type, String str);
122 virtual String str ();
129 #endif // LILYPOND_ITEM_HH