2 musical-request.hh -- declare Musical requests
4 source file of the GNU LilyPond music typesetter
6 (c) 1997--2000 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 /// specify inversion of a chord
104 struct Inversion_req : public Melodic_req
106 VIRTUAL_COPY_CONS (Music);
109 /// specify bass of a chord
110 struct Bass_req : public Melodic_req
112 VIRTUAL_COPY_CONS (Music);
115 /// Put a note of specified type, height, and with accidental on the staff.
116 class Note_req : public Rhythmic_req, virtual public Melodic_req {
119 /// force/supress printing of accidental.
121 /// Cautionary, i.e. parenthesized accidental.
125 virtual void do_print () const;
126 bool do_equal_b (Request const*) const;
127 VIRTUAL_COPY_CONS(Music);
131 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.
133 class Rest_req : public Rhythmic_req {
135 VIRTUAL_COPY_CONS(Music);
140 class Extender_req : public Request {
142 VIRTUAL_COPY_CONS(Music);
146 class Hyphen_req : public Request {
148 VIRTUAL_COPY_CONS(Music);
151 /** is anyone playing a note?
152 Used for communication between Music & Lyrics
154 class Busy_playing_req : public Request
157 VIRTUAL_COPY_CONS (Music);
161 What pitches have ben acked ?
163 class Pitch_interrogate_req : public Request
166 Array<Musical_pitch> pitch_arr_;
167 VIRTUAL_COPY_CONS (Music);
173 instruct lyric context to alter typesetting (unimplemented). */
174 class Melisma_req : public Span_req
177 VIRTUAL_COPY_CONS(Music);
180 Start / stop a tremolo beam. */
181 class Chord_tremolo_req : public Span_req
184 VIRTUAL_COPY_CONS (Music);
186 Chord_tremolo_req ();
188 virtual void do_print () const;
194 Helping req to signal start of a melisma from within a context, and
196 class Melisma_playing_req : public Request
199 VIRTUAL_COPY_CONS (Music);
201 #endif // MUSICALREQUESTS_HH