]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/musical-request.hh
release: 1.3.110
[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--2000 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   /// transpose. #delta# is relative to central c.
81   virtual void transpose (Pitch delta);
82   virtual bool do_equal_b (Request const*) const;
83
84   VIRTUAL_COPY_CONS(Music);
85 };
86
87 /*
88    Put a note of specified type, height, and with accidental on the staff.
89     /// force/supress printing of accidental.
90   bool forceacc_b_;
91   /// Cautionary, i.e. parenthesized accidental.
92   bool cautionary_b_;
93
94  */
95 class Note_req  : public Rhythmic_req, virtual public Melodic_req  {
96 public:
97     
98   Note_req();
99 protected:
100
101   bool do_equal_b (Request const*) const;
102   VIRTUAL_COPY_CONS(Music);
103 };
104
105 /**
106 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.
107 */
108 class Rest_req : public Rhythmic_req {
109 public:
110   VIRTUAL_COPY_CONS(Music);
111 };
112
113
114 /// an extender line
115 class Extender_req : public Request  {
116 public:
117   VIRTUAL_COPY_CONS(Music);
118 };
119
120 /// a centred hyphen
121 class Hyphen_req : public Request  {
122 public:
123   VIRTUAL_COPY_CONS(Music);
124 };
125
126 /** is anyone  playing a note?
127     Used for communication between Music & Lyrics
128  */
129 class Busy_playing_req : public Request
130 {
131 public:
132   VIRTUAL_COPY_CONS (Music);
133 };
134
135
136
137 /**
138    instruct lyric context to alter typesetting (unimplemented).  */
139 class Melisma_req : public Span_req
140 {
141 public:
142   VIRTUAL_COPY_CONS(Music);
143 };
144
145
146 /**
147    Helping req to signal start of a melisma from within a context, and
148    to   */
149 class Melisma_playing_req : public Request
150 {
151 public:
152   VIRTUAL_COPY_CONS (Music);
153 };
154
155 class Arpeggio_req : public Request
156 {
157 public:
158   VIRTUAL_COPY_CONS (Music);
159 };
160
161 #endif // MUSICALREQUESTS_HH