]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/musical-request.hh
* VERSION (MY_PATCH_LEVEL): make 1.7.0
[lilypond.git] / lily / include / musical-request.hh
1 /*
2   musical-request.hh -- declare Musical requests
3
4   source file of the GNU LilyPond music typesetter
5
6   (c)  1997--2002 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7 */
8
9
10 #ifndef MUSICALREQUESTS_HH
11 #define MUSICALREQUESTS_HH
12
13 #include "lily-proto.hh"
14 #include "request.hh"
15 #include "duration.hh"
16 #include "pitch.hh"
17 #include "array.hh"
18
19 /** a request with a duration.
20   This request is used only used as a base class.
21  */
22 class Rhythmic_req  : public virtual Request  {
23 public:
24   bool do_equal_b (Request const*) const;
25   void compress (Moment);
26   virtual Moment length_mom () const;
27   static int compare (Rhythmic_req const&,Rhythmic_req const&);
28   VIRTUAL_COPY_CONS (Music);
29 };
30
31 class Skip_req  : public Rhythmic_req  {
32 public:
33   VIRTUAL_COPY_CONS (Music);
34 };
35
36
37 struct Tremolo_req : public Request {
38   VIRTUAL_COPY_CONS (Music);
39   Tremolo_req ();
40 };
41
42 struct Chord_tremolo_notify_req : public Request
43 {
44
45   Rational factor_;
46   VIRTUAL_COPY_CONS(Chord_tremolo_notify_req);
47   Chord_tremolo_notify_req();
48 };
49
50
51 /**
52    a syllable or lyric is a string with rhythm.
53   */
54 class Lyric_req : public Rhythmic_req
55 {
56 protected:
57   VIRTUAL_COPY_CONS (Music);
58 };
59
60
61 class Articulation_req : public Script_req
62 {
63 public:
64   String get_articulation_string ();
65 protected:
66   virtual bool do_equal_b (Request const*) const;
67
68   VIRTUAL_COPY_CONS (Music);
69 };
70
71 class Text_script_req : public Script_req
72 {
73 protected:
74   VIRTUAL_COPY_CONS (Music);
75   virtual bool do_equal_b (Request const*) const;
76 };
77
78 class String_number_req : public Script_req
79 {
80 protected:
81   VIRTUAL_COPY_CONS (Music);
82   virtual bool do_equal_b (Request const*) const;
83 };
84
85 /// request which has some kind of pitch
86 struct Melodic_req :virtual Request
87 {
88   static int compare (Melodic_req const&,Melodic_req const&);
89   
90 protected:
91   virtual bool do_equal_b (Request const*) const;
92
93   VIRTUAL_COPY_CONS (Music);
94 };
95
96 /*
97    Put a note of specified type, height, and with accidental on the staff.
98     /// force/supress printing of accidental.
99   bool forceacc_b_;
100   /// Cautionary, i.e. parenthesized accidental.
101   bool cautionary_b_;
102
103  */
104 class Note_req  : public Rhythmic_req, virtual public Melodic_req  {
105 public:
106     
107   Note_req ();
108 protected:
109
110   bool do_equal_b (Request const*) const;
111   VIRTUAL_COPY_CONS (Music);
112 };
113
114 /**
115 Put a rest on the staff. Why a request? It might be a good idea to not typeset the rest, if the paper is too crowded.
116 */
117 class Rest_req : public Rhythmic_req {
118 public:
119   VIRTUAL_COPY_CONS (Music);
120 };
121
122
123 /// an extender line
124 class Extender_req : public Request  {
125 public:
126   VIRTUAL_COPY_CONS (Music);
127 };
128
129 /// a centred hyphen
130 class Hyphen_req : public Request  {
131 public:
132   VIRTUAL_COPY_CONS (Music);
133 };
134
135 /** is anyone  playing a note?
136     Used for communication between Music & Lyrics
137  */
138 class Busy_playing_req : public Request
139 {
140 public:
141   VIRTUAL_COPY_CONS (Music);
142 };
143
144
145
146 /**
147    instruct lyric context to alter typesetting.  */
148 class Melisma_req : public Span_req
149 {
150 public:
151   VIRTUAL_COPY_CONS (Music);
152 };
153
154
155 /**
156    Helping req to signal start of a melisma from within a context, and
157    to   */
158 class Melisma_playing_req : public Request
159 {
160 public:
161   VIRTUAL_COPY_CONS (Music);
162 };
163
164 class Arpeggio_req : public Request
165 {
166 public:
167   VIRTUAL_COPY_CONS (Music);
168 };
169
170 class Glissando_req : public Request
171 {
172 public:
173   VIRTUAL_COPY_CONS (Music);
174 };
175
176 class Bass_figure_req:  public Rhythmic_req
177 {
178 public:
179   VIRTUAL_COPY_CONS(Music);
180 };
181
182 #endif // MUSICALREQUESTS_HH