]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/musical-request.hh
f7f62efc35473114b8499ced7e27af6d36b19cea
[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
79 /// request which has some kind of pitch
80 struct Melodic_req :virtual Request
81 {
82   static int compare (Melodic_req const&,Melodic_req const&);
83   
84 protected:
85   virtual bool do_equal_b (Request const*) const;
86
87   VIRTUAL_COPY_CONS (Music);
88 };
89
90 /*
91    Put a note of specified type, height, and with accidental on the staff.
92     /// force/supress printing of accidental.
93   bool forceacc_b_;
94   /// Cautionary, i.e. parenthesized accidental.
95   bool cautionary_b_;
96
97  */
98 class Note_req  : public Rhythmic_req, virtual public Melodic_req  {
99 public:
100     
101   Note_req ();
102 protected:
103
104   bool do_equal_b (Request const*) const;
105   VIRTUAL_COPY_CONS (Music);
106 };
107
108 /**
109 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.
110 */
111 class Rest_req : public Rhythmic_req {
112 public:
113   VIRTUAL_COPY_CONS (Music);
114 };
115
116
117 /// an extender line
118 class Extender_req : public Request  {
119 public:
120   VIRTUAL_COPY_CONS (Music);
121 };
122
123 /// a centred hyphen
124 class Hyphen_req : public Request  {
125 public:
126   VIRTUAL_COPY_CONS (Music);
127 };
128
129 /** is anyone  playing a note?
130     Used for communication between Music & Lyrics
131  */
132 class Busy_playing_req : public Request
133 {
134 public:
135   VIRTUAL_COPY_CONS (Music);
136 };
137
138
139
140 /**
141    instruct lyric context to alter typesetting.  */
142 class Melisma_req : public Span_req
143 {
144 public:
145   VIRTUAL_COPY_CONS (Music);
146 };
147
148
149 /**
150    Helping req to signal start of a melisma from within a context, and
151    to   */
152 class Melisma_playing_req : public Request
153 {
154 public:
155   VIRTUAL_COPY_CONS (Music);
156 };
157
158 class Arpeggio_req : public Request
159 {
160 public:
161   VIRTUAL_COPY_CONS (Music);
162 };
163
164 class Glissando_req : public Request
165 {
166 public:
167   VIRTUAL_COPY_CONS (Music);
168 };
169
170 class Bass_figure_req:  public Rhythmic_req
171 {
172 public:
173   VIRTUAL_COPY_CONS(Music);
174 };
175
176 #endif // MUSICALREQUESTS_HH