2 musical-request.hh -- declare Musical requests
4 source file of the GNU LilyPond music typesetter
6 (c) 1997--1998 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"
19 A request which is coupled to a note (that has duration).
22 class Musical_req : public virtual Request {
26 REQUESTMETHODS(Musical_req);
31 /** a request with a duration.
32 This request is used only used as a base class.
34 class Rhythmic_req : public virtual Musical_req {
38 bool do_equal_b (Request*) const;
39 void compress (Moment);
40 virtual Moment duration() const;
41 static int compare (Rhythmic_req const&,Rhythmic_req const&);
42 REQUESTMETHODS(Rhythmic_req);
45 class Skip_req : public Rhythmic_req {
47 REQUESTMETHODS(Skip_req);
50 struct Spacing_req :virtual Request {
55 REQUESTMETHODS(Spacing_req);
58 struct Abbreviation_req : public Musical_req {
59 REQUESTMETHODS (Abbreviation_req);
64 class Blank_req : public Spacing_req, Rhythmic_req {
66 REQUESTMETHODS(Spacing_req);
69 /// Put a text above or below (?) this staff.
70 class Text_req : public virtual Musical_req {
72 /// preferred position (above/below)
74 /// the characteristics of the text
77 Text_req (int d, Text_def*);
79 Text_req (Text_req const&);
81 REQUESTMETHODS(Text_req);
84 /** a syllable or lyric is a string with rhythm.
86 class Lyric_req : public Rhythmic_req {
89 REQUESTMETHODS(Lyric_req);
94 /// request which has some kind of pitch
95 struct Melodic_req :virtual Musical_req
98 /// transpose. #delta# is relative to central c.
99 virtual void transpose (Musical_pitch delta);
101 bool do_equal_b (Request*) const;
102 static int compare (Melodic_req const&,Melodic_req const&);
103 REQUESTMETHODS(Melodic_req);
106 /// Put a note of specified type, height, and with accidental on the staff.
107 class Note_req : public Rhythmic_req, virtual public Melodic_req {
110 /// force/supress printing of accidental.
112 /// Cautionary, i.e. parenthesized accidental.
115 bool do_equal_b (Request*) const;
116 REQUESTMETHODS(Note_req);
120 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.
122 class Rest_req : public Rhythmic_req {
124 REQUESTMETHODS(Rest_req);
128 Part: typeset a measure with the number of measures rest
129 Score: typeset all individual measures ass full rests
131 class Multi_measure_rest_req : public Rhythmic_req {
133 REQUESTMETHODS(Multi_measure_rest_req);
137 class Musical_span_req : public Span_req, public virtual Musical_req
140 REQUESTMETHODS(Musical_span_req);
146 Start / stop an abbreviation beam at this note.
148 class Abbreviation_beam_req : public Musical_span_req {
150 REQUESTMETHODS (Abbreviation_beam_req);
152 Abbreviation_beam_req ();
160 class Slur_req : public Musical_span_req {
162 REQUESTMETHODS(Slur_req);
167 class Extender_req : public Musical_span_req {
169 REQUESTMETHODS(Extender_req);
173 class Musical_script_req : public Musical_req, public Script_req {
175 REQUESTMETHODS(Musical_script_req);
179 class Dynamic_req : public virtual Musical_req {
182 for absolute dynamics
184 This sux. We'd want increasing numbers for FFF till PPP, but not
185 for FP, SF, SFZ (FP is *not* louder than FFF)
188 FFF, FF, F, MF, MP, P, PP, PPP, FP, SF, SFZ
190 static String loudness_static_str (Loudness);
191 REQUESTMETHODS(Dynamic_req);
194 class Absolute_dynamic_req : public Dynamic_req {
197 virtual bool do_equal_b (Request*) const;
198 String loudness_str () const;
199 Absolute_dynamic_req();
200 REQUESTMETHODS(Absolute_dynamic_req);
203 class Span_dynamic_req : public Dynamic_req, public Musical_span_req {
205 virtual bool do_equal_b (Request*) const;
206 /// Grow or shrink the volume: 1=cresc, -1 = decresc
207 Direction dynamic_dir_;
209 REQUESTMETHODS(Span_dynamic_req);
212 #endif // MUSICALREQUESTS_HH