2 musical-request.hh -- declare Musical requests
4 source file of the GNU LilyPond music typesetter
6 (c) 1997--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
10 #ifndef MUSICALREQUESTS_HH
11 #define MUSICALREQUESTS_HH
13 #include "lily-proto.hh"
15 #include "duration.hh"
16 #include "musical-pitch.hh"
20 /** a request with a duration.
21 This request is used only used as a base class.
23 class Rhythmic_req : public virtual Request {
28 bool do_equal_b (Request const*) const;
29 void compress (Moment);
30 virtual Moment length_mom () const;
31 static int compare (Rhythmic_req const&,Rhythmic_req const&);
32 VIRTUAL_COPY_CONS(Music);
35 class Skip_req : public Rhythmic_req {
37 VIRTUAL_COPY_CONS(Music);
41 struct Tremolo_req : public Request {
42 VIRTUAL_COPY_CONS (Music);
49 /** a syllable or lyric is a string with rhythm.
51 class Lyric_req : public Rhythmic_req {
55 VIRTUAL_COPY_CONS(Music);
59 class Articulation_req : public Script_req
62 String articulation_str_;
64 virtual bool do_equal_b (Request const*) const;
66 VIRTUAL_COPY_CONS(Music);
69 class Text_script_req : public Script_req
72 String text_str_; // to be deprecated
73 String style_str_; // to be deprecated
78 VIRTUAL_COPY_CONS(Music);
79 virtual bool do_equal_b (Request const*)const;
83 /// request which has some kind of pitch
84 struct Melodic_req :virtual Request
88 static int compare (Melodic_req const&,Melodic_req const&);
91 /// transpose. #delta# is relative to central c.
92 virtual void transpose (Musical_pitch delta);
93 virtual bool do_equal_b (Request const*) const;
95 VIRTUAL_COPY_CONS(Music);
98 /// specify tonic of a chord
99 struct Tonic_req : public Melodic_req
101 VIRTUAL_COPY_CONS (Music);
104 /// specify inversion of a chord
105 struct Inversion_req : public Melodic_req
107 VIRTUAL_COPY_CONS (Music);
110 /// specify bass of a chord
111 struct Bass_req : public Melodic_req
113 VIRTUAL_COPY_CONS (Music);
116 /// Put a note of specified type, height, and with accidental on the staff.
117 class Note_req : public Rhythmic_req, virtual public Melodic_req {
120 /// force/supress printing of accidental.
122 /// Cautionary, i.e. parenthesized accidental.
127 bool do_equal_b (Request const*) const;
128 VIRTUAL_COPY_CONS(Music);
132 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.
134 class Rest_req : public Rhythmic_req {
136 VIRTUAL_COPY_CONS(Music);
141 class Extender_req : public Request {
143 VIRTUAL_COPY_CONS(Music);
147 class Hyphen_req : public Request {
149 VIRTUAL_COPY_CONS(Music);
152 /** is anyone playing a note?
153 Used for communication between Music & Lyrics
155 class Busy_playing_req : public Request
158 VIRTUAL_COPY_CONS (Music);
164 instruct lyric context to alter typesetting (unimplemented). */
165 class Melisma_req : public Span_req
168 VIRTUAL_COPY_CONS(Music);
173 Helping req to signal start of a melisma from within a context, and
175 class Melisma_playing_req : public Request
178 VIRTUAL_COPY_CONS (Music);
181 class Arpeggio_req : public Request
184 VIRTUAL_COPY_CONS (Music);
187 #endif // MUSICALREQUESTS_HH