]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/musical-request.hh
release: 1.5.29
[lilypond.git] / lily / include / musical-request.hh
1 /*
2   musical-request.hh -- declare Musical requests
3
4   source file of the GNU LilyPond music typesetter
5
6   (c)  1997--2002 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7 */
8
9
10 #ifndef MUSICALREQUESTS_HH
11 #define MUSICALREQUESTS_HH
12
13 #include "lily-proto.hh"
14 #include "request.hh"
15 #include "duration.hh"
16 #include "pitch.hh"
17 #include "array.hh"
18
19 /** a request with a duration.
20   This request is used only used as a base class.
21  */
22 class Rhythmic_req  : public virtual Request  {
23 public:
24   bool do_equal_b (Request const*) const;
25   void compress (Moment);
26   virtual Moment length_mom () const;
27   static int compare (Rhythmic_req const&,Rhythmic_req const&);
28   VIRTUAL_COPY_CONS (Music);
29 };
30
31 class Skip_req  : public Rhythmic_req  {
32 public:
33   VIRTUAL_COPY_CONS (Music);
34 };
35
36
37 struct Tremolo_req : public Request {
38   VIRTUAL_COPY_CONS (Music);
39   Tremolo_req ();
40
41   void set_type (int);
42   int get_type () const;
43 };
44
45
46 /**
47    a syllable or lyric is a string with rhythm.
48   */
49 class Lyric_req : public Rhythmic_req
50 {
51 protected:
52   VIRTUAL_COPY_CONS (Music);
53 };
54
55
56 class Articulation_req : public Script_req
57 {
58 public:
59   String get_articulation_str ();
60 protected:
61   virtual bool do_equal_b (Request const*) const;
62
63   VIRTUAL_COPY_CONS (Music);
64 };
65
66 class Text_script_req : public Script_req
67 {
68 protected:
69   VIRTUAL_COPY_CONS (Music);
70   virtual bool do_equal_b (Request const*) const;
71 };
72
73
74 /// request which has some kind of pitch
75 struct Melodic_req :virtual Request
76 {
77   static int compare (Melodic_req const&,Melodic_req const&);
78   
79 protected:
80   virtual bool do_equal_b (Request const*) const;
81
82   VIRTUAL_COPY_CONS (Music);
83 };
84
85 /*
86    Put a note of specified type, height, and with accidental on the staff.
87     /// force/supress printing of accidental.
88   bool forceacc_b_;
89   /// Cautionary, i.e. parenthesized accidental.
90   bool cautionary_b_;
91
92  */
93 class Note_req  : public Rhythmic_req, virtual public Melodic_req  {
94 public:
95     
96   Note_req ();
97 protected:
98
99   bool do_equal_b (Request const*) const;
100   VIRTUAL_COPY_CONS (Music);
101 };
102
103 /**
104 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.
105 */
106 class Rest_req : public Rhythmic_req {
107 public:
108   VIRTUAL_COPY_CONS (Music);
109 };
110
111
112 /// an extender line
113 class Extender_req : public Request  {
114 public:
115   VIRTUAL_COPY_CONS (Music);
116 };
117
118 /// a centred hyphen
119 class Hyphen_req : public Request  {
120 public:
121   VIRTUAL_COPY_CONS (Music);
122 };
123
124 /** is anyone  playing a note?
125     Used for communication between Music & Lyrics
126  */
127 class Busy_playing_req : public Request
128 {
129 public:
130   VIRTUAL_COPY_CONS (Music);
131 };
132
133
134
135 /**
136    instruct lyric context to alter typesetting (unimplemented).  */
137 class Melisma_req : public Span_req
138 {
139 public:
140   VIRTUAL_COPY_CONS (Music);
141 };
142
143
144 /**
145    Helping req to signal start of a melisma from within a context, and
146    to   */
147 class Melisma_playing_req : public Request
148 {
149 public:
150   VIRTUAL_COPY_CONS (Music);
151 };
152
153 class Arpeggio_req : public Request
154 {
155 public:
156   VIRTUAL_COPY_CONS (Music);
157 };
158
159 class Glissando_req : public Request
160 {
161 public:
162   VIRTUAL_COPY_CONS (Music);
163 };
164
165 #endif // MUSICALREQUESTS_HH