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"
18 #include "protected-scm.hh"
21 /** a request with a duration.
22 This request is used only used as a base class.
24 class Rhythmic_req : public virtual Request {
29 bool do_equal_b (Request const*) const;
30 void compress (Moment);
31 virtual Moment length_mom () const;
32 static int compare (Rhythmic_req const&,Rhythmic_req const&);
33 VIRTUAL_COPY_CONS(Music);
36 class Skip_req : public Rhythmic_req {
38 VIRTUAL_COPY_CONS(Music);
42 struct Tremolo_req : public Request {
43 VIRTUAL_COPY_CONS (Music);
51 a syllable or lyric is a string with rhythm.
53 class Lyric_req : public Rhythmic_req
59 VIRTUAL_COPY_CONS (Music);
63 class Articulation_req : public Script_req
66 String articulation_str_;
68 virtual bool do_equal_b (Request const*) const;
70 VIRTUAL_COPY_CONS(Music);
73 class Text_script_req : public Script_req
79 VIRTUAL_COPY_CONS (Music);
80 virtual bool do_equal_b (Request const*) const;
83 class Dynamic_script_req : public Script_req
89 VIRTUAL_COPY_CONS (Music);
92 /// request which has some kind of pitch
93 struct Melodic_req :virtual Request
97 static int compare (Melodic_req const&,Melodic_req const&);
100 /// transpose. #delta# is relative to central c.
101 virtual void transpose (Musical_pitch delta);
102 virtual bool do_equal_b (Request const*) const;
104 VIRTUAL_COPY_CONS(Music);
107 /// specify tonic of a chord
108 struct Tonic_req : public Melodic_req
110 VIRTUAL_COPY_CONS (Music);
113 /// specify inversion of a chord
114 struct Inversion_req : public Melodic_req
116 VIRTUAL_COPY_CONS (Music);
119 /// specify bass of a chord
120 struct Bass_req : public Melodic_req
122 VIRTUAL_COPY_CONS (Music);
125 /// Put a note of specified type, height, and with accidental on the staff.
126 class Note_req : public Rhythmic_req, virtual public Melodic_req {
129 /// force/supress printing of accidental.
131 /// Cautionary, i.e. parenthesized accidental.
136 bool do_equal_b (Request const*) const;
137 VIRTUAL_COPY_CONS(Music);
141 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.
143 class Rest_req : public Rhythmic_req {
145 VIRTUAL_COPY_CONS(Music);
150 class Extender_req : public Request {
152 VIRTUAL_COPY_CONS(Music);
156 class Hyphen_req : public Request {
158 VIRTUAL_COPY_CONS(Music);
161 /** is anyone playing a note?
162 Used for communication between Music & Lyrics
164 class Busy_playing_req : public Request
167 VIRTUAL_COPY_CONS (Music);
173 instruct lyric context to alter typesetting (unimplemented). */
174 class Melisma_req : public Span_req
177 VIRTUAL_COPY_CONS(Music);
182 Helping req to signal start of a melisma from within a context, and
184 class Melisma_playing_req : public Request
187 VIRTUAL_COPY_CONS (Music);
190 class Arpeggio_req : public Request
193 VIRTUAL_COPY_CONS (Music);
196 #endif // MUSICALREQUESTS_HH