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;
27 bool do_equal_b (Request*) const;
28 void compress (Moment);
29 virtual Moment length_mom () const;
30 static int compare (Rhythmic_req const&,Rhythmic_req const&);
31 VIRTUAL_COPY_CONS(Music);
34 class Skip_req : public Rhythmic_req {
36 VIRTUAL_COPY_CONS(Music);
40 struct Tremolo_req : public Request {
41 VIRTUAL_COPY_CONS (Music);
44 virtual void do_print () const;
48 /** a syllable or lyric is a string with rhythm.
50 class Lyric_req : public Rhythmic_req {
52 virtual void do_print () const;
54 VIRTUAL_COPY_CONS(Music);
58 class Articulation_req : public Script_req
61 String articulation_str_;
63 virtual bool do_equal_b (Request*) const;
64 virtual void do_print () const;
65 VIRTUAL_COPY_CONS(Music);
68 class Text_script_req : public Script_req {
72 // should be generic property of some kind..
75 VIRTUAL_COPY_CONS(Music);
76 virtual bool do_equal_b (Request*)const;
77 virtual void do_print () const;
81 /// request which has some kind of pitch
82 struct Melodic_req :virtual Request
86 static int compare (Melodic_req const&,Melodic_req const&);
89 /// transpose. #delta# is relative to central c.
90 virtual void transpose (Musical_pitch delta);
91 virtual bool do_equal_b (Request*) const;
92 virtual void do_print () const;
93 VIRTUAL_COPY_CONS(Music);
96 /// specify tonic of a chord
97 struct Tonic_req : public Melodic_req
99 VIRTUAL_COPY_CONS(Music);
102 /// Put a note of specified type, height, and with accidental on the staff.
103 class Note_req : public Rhythmic_req, virtual public Melodic_req {
106 /// force/supress printing of accidental.
108 /// Cautionary, i.e. parenthesized accidental.
112 virtual void do_print () const;
113 bool do_equal_b (Request*) const;
114 VIRTUAL_COPY_CONS(Music);
118 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.
120 class Rest_req : public Rhythmic_req {
122 VIRTUAL_COPY_CONS(Music);
126 Part: typeset a measure with the number of measures rest
127 Score: typeset all individual measures as full rests
129 class Multi_measure_rest_req : public Rhythmic_req {
131 VIRTUAL_COPY_CONS(Music);
135 Typeset a repetition sign in each bar.
137 class Repetitions_req : public Rhythmic_req {
139 VIRTUAL_COPY_CONS(Music);
143 class Extender_req : public Request {
145 VIRTUAL_COPY_CONS(Music);
148 #endif // MUSICALREQUESTS_HH