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"
20 /** a request with a duration.
21 This request is used only used as a base class.
23 class Rhythmic_req : public virtual Request {
26 virtual void do_print () const;
28 bool do_equal_b (Request const*) 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 Tremolo_req : public Request {
42 VIRTUAL_COPY_CONS (Music);
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 Script_req
62 String articulation_str_;
64 virtual bool do_equal_b (Request const*) const;
65 virtual void do_print () const;
66 VIRTUAL_COPY_CONS(Music);
69 class Text_script_req : public Script_req {
73 // should be generic property of some kind..
76 VIRTUAL_COPY_CONS(Music);
77 virtual bool do_equal_b (Request const*)const;
78 virtual void do_print () const;
82 /// request which has some kind of pitch
83 struct Melodic_req :virtual Request
87 static int compare (Melodic_req const&,Melodic_req const&);
90 /// transpose. #delta# is relative to central c.
91 virtual void transpose (Musical_pitch delta);
92 virtual bool do_equal_b (Request const*) const;
93 virtual void do_print () const;
94 VIRTUAL_COPY_CONS(Music);
97 /// specify tonic of a chord
98 struct Tonic_req : public Melodic_req
100 VIRTUAL_COPY_CONS(Music);
103 /// Put a note of specified type, height, and with accidental on the staff.
104 class Note_req : public Rhythmic_req, virtual public Melodic_req {
107 /// force/supress printing of accidental.
109 /// Cautionary, i.e. parenthesized accidental.
113 virtual void do_print () const;
114 bool do_equal_b (Request const*) const;
115 VIRTUAL_COPY_CONS(Music);
119 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.
121 class Rest_req : public Rhythmic_req {
123 VIRTUAL_COPY_CONS(Music);
127 Part: typeset a measure with the number of measures rest
128 Score: typeset all individual measures as full rests
130 class Multi_measure_rest_req : public Rhythmic_req {
132 VIRTUAL_COPY_CONS(Music);
136 Typeset a repetition sign in each bar.
138 class Repetitions_req : public Rhythmic_req {
140 VIRTUAL_COPY_CONS(Music);
144 class Extender_req : public Request {
146 VIRTUAL_COPY_CONS(Music);
150 class Hyphen_req : public Request {
152 VIRTUAL_COPY_CONS(Music);
155 /** is anyone playing a note?
156 Used for communication between Music & Lyrics
158 class Busy_playing_req : public Request
161 VIRTUAL_COPY_CONS (Music);
165 What pitches have ben acked ?
167 class Pitch_interrogate_req : public Request
170 Array<Musical_pitch> pitch_arr_;
171 VIRTUAL_COPY_CONS (Music);
177 instruct lyric context to alter typesetting (unimplemented). */
178 class Melisma_req : public Span_req
181 VIRTUAL_COPY_CONS(Music);
184 Start / stop an abbreviation beam. */
185 class Chord_tremolo_req : public Span_req
188 VIRTUAL_COPY_CONS (Music);
190 Chord_tremolo_req ();
192 virtual void do_print () const;
198 Helping req to signal start of a melisma from within a context, and
200 class Melisma_playing_req : public Request
203 VIRTUAL_COPY_CONS (Music);
205 #endif // MUSICALREQUESTS_HH