2 musical-request.hh -- declare Musical requests
4 source file of the GNU LilyPond music typesetter
6 (c) 1997--1999 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 with a duration.
20 This request is used only used as a base class.
22 class Rhythmic_req : public virtual Request {
25 virtual void do_print () const;
28 bool do_equal_b (Request*) 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 Abbreviation_req : public Request {
42 VIRTUAL_COPY_CONS (Abbreviation_req);
45 virtual void do_print () const;
49 /** a syllable or lyric is a string with rhythm.
51 class Lyric_req : public Rhythmic_req {
53 virtual void do_print () const;
55 VIRTUAL_COPY_CONS(Music);
59 class Articulation_req : public G_script_req
62 String articulation_str_;
64 virtual void do_print () const;
65 VIRTUAL_COPY_CONS(Music);
68 class Text_script_req : public G_script_req {
72 // should be generic property of some kind..
75 VIRTUAL_COPY_CONS(Music);
76 virtual void do_print () const;
80 /// request which has some kind of pitch
81 struct Melodic_req :virtual Request
85 static int compare (Melodic_req const&,Melodic_req const&);
88 /// transpose. #delta# is relative to central c.
89 virtual void transpose (Musical_pitch delta);
90 virtual bool do_equal_b (Request*) const;
91 virtual void do_print () const;
92 VIRTUAL_COPY_CONS(Music);
95 /// specify tonic of a chord
96 struct Tonic_req : public Melodic_req
98 VIRTUAL_COPY_CONS(Music);
101 /// Put a note of specified type, height, and with accidental on the staff.
102 class Note_req : public Rhythmic_req, virtual public Melodic_req {
105 /// force/supress printing of accidental.
107 /// Cautionary, i.e. parenthesized accidental.
111 virtual void do_print () const;
112 bool do_equal_b (Request*) const;
113 VIRTUAL_COPY_CONS(Music);
117 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.
119 class Rest_req : public Rhythmic_req {
121 VIRTUAL_COPY_CONS(Music);
125 Part: typeset a measure with the number of measures rest
126 Score: typeset all individual measures ass full rests
128 class Multi_measure_rest_req : public Rhythmic_req {
130 VIRTUAL_COPY_CONS(Music);
136 Start / stop an abbreviation beam at this note.
138 class Abbreviation_beam_req : public Span_req {
140 VIRTUAL_COPY_CONS(Abbreviation_beam_req);
142 Abbreviation_beam_req ();
150 class Slur_req : public Span_req {
152 VIRTUAL_COPY_CONS(Music);
157 class Extender_req : public Request {
159 VIRTUAL_COPY_CONS(Music);
164 class Dynamic_req : public virtual Request {
166 VIRTUAL_COPY_CONS(Music);
169 class Absolute_dynamic_req : public Dynamic_req {
171 String loudness_str_;
172 String loudness_str () const;
173 Absolute_dynamic_req();
176 virtual void do_print () const;
177 virtual bool do_equal_b (Request*) const;
178 VIRTUAL_COPY_CONS(Music);
181 class Span_dynamic_req : public Dynamic_req, public Span_req {
184 /// Grow or shrink the volume: 1=cresc, -1 = decresc
185 Direction dynamic_dir_;
189 virtual bool do_equal_b (Request*) const;
190 virtual void do_print () const;
191 VIRTUAL_COPY_CONS(Music);
194 #endif // MUSICALREQUESTS_HH