flower-1.0.2
[lilypond.git] / request.cc
blob27816e5b4325f8f7b0caa1e5f2467790cd3b9576
1 #include "request.hh"
2 #include "debug.hh"
4 void
5 Request::print() const
7 #ifndef NPRINT
8 mtor << "Req{ unknown }\n";
9 #endif
12 Request::Request(Voice_element*v)
14 elt = v;
17 Note_req::Note_req(Voice_element*v)
18 : Rhythmic_req(v)
20 name = 'c';
21 octave = 0;
22 accidental = 0;
23 forceacc = false;
26 Rhythmic_req::Rhythmic_req(Voice_element*v)
27 :Request(v)
29 balltype = 1;
30 dots = 0;
33 Request::Request()
35 elt = 0;
39 Real
40 wholes(int dur, int dots)
42 Real f = 1.0/Real(dur);
43 Real delta = f;
45 while (dots--) {
46 delta /= 2.0;
47 f += delta;
49 return f;
52 Real
53 Rhythmic_req::duration() const {
54 return wholes( balltype,dots);