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 /** a syllable or lyric is a string with rhythm.
71 class Lyric_req : public Rhythmic_req {
74 REQUESTMETHODS(Lyric_req);
79 /// request which has some kind of pitch
80 struct Melodic_req :virtual Musical_req
83 /// transpose. #delta# is relative to central c.
84 virtual void transpose (Musical_pitch delta);
86 bool do_equal_b (Request*) const;
87 static int compare (Melodic_req const&,Melodic_req const&);
88 REQUESTMETHODS(Melodic_req);
91 /// Put a note of specified type, height, and with accidental on the staff.
92 class Note_req : public Rhythmic_req, virtual public Melodic_req {
95 /// force/supress printing of accidental.
97 /// Cautionary, i.e. parenthesized accidental.
100 bool do_equal_b (Request*) const;
101 REQUESTMETHODS(Note_req);
105 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.
107 class Rest_req : public Rhythmic_req {
109 REQUESTMETHODS(Rest_req);
113 Part: typeset a measure with the number of measures rest
114 Score: typeset all individual measures ass full rests
116 class Multi_measure_rest_req : public Rhythmic_req {
118 REQUESTMETHODS(Multi_measure_rest_req);
122 class Musical_span_req : public Span_req, public virtual Musical_req
125 REQUESTMETHODS(Musical_span_req);
131 Start / stop an abbreviation beam at this note.
133 class Abbreviation_beam_req : public Musical_span_req {
135 REQUESTMETHODS (Abbreviation_beam_req);
137 Abbreviation_beam_req ();
145 class Slur_req : public Musical_span_req {
147 REQUESTMETHODS(Slur_req);
152 class Extender_req : public Musical_span_req {
154 REQUESTMETHODS(Extender_req);
158 class Musical_script_req : public Musical_req, public Script_req {
160 REQUESTMETHODS(Musical_script_req);
164 class Dynamic_req : public virtual Musical_req {
167 for absolute dynamics
169 This sux. We'd want increasing numbers for FFF till PPP, but not
170 for FP, SF, SFZ (FP is *not* louder than FFF)
173 FFFFFF, FFFFF, FFFF, FFF, FF, F, MF, MP, P, PP, PPP, PPPP, PPPPP, PPPPPP, FP, SF, SFF, SFZ, SP, SPP, RFZ };
174 static String loudness_static_str (Loudness);
175 REQUESTMETHODS(Dynamic_req);
178 class Absolute_dynamic_req : public Dynamic_req {
181 virtual bool do_equal_b (Request*) const;
182 String loudness_str () const;
183 Absolute_dynamic_req();
184 REQUESTMETHODS(Absolute_dynamic_req);
187 class Span_dynamic_req : public Dynamic_req, public Musical_span_req {
189 virtual bool do_equal_b (Request*) const;
190 /// Grow or shrink the volume: 1=cresc, -1 = decresc
191 Direction dynamic_dir_;
193 REQUESTMETHODS(Span_dynamic_req);
196 #endif // MUSICALREQUESTS_HH