5 #include "paper-def.hh"
8 #include "musical-request.hh"
12 Notehead::Notehead(int ss)
24 Notehead::set_rhythmic(Rhythmic_req*r_req_l)
26 balltype_i_ = r_req_l->duration_.type_i_;
27 dots_i_ = r_req_l->duration_.dots_i_;
30 IMPLEMENT_STATIC_NAME(Notehead);
33 Notehead::do_print()const
38 mtor << "balltype_i_ "<< balltype_i_ << ", position_i_ = "<< position_i_
39 << "dots_i_ " << dots_i_;
45 Notehead::compare(Notehead *const &a, Notehead * const &b)
47 return a->position_i_ - b->position_i_;
51 Notehead::brew_molecule_p() const
54 Paper_def *p = paper();
56 Real dy = p->internote();
59 s = p->lookup_l()->ball(balltype_i_);
61 s = p->lookup_l()->rest(balltype_i_);
63 out = new Molecule(Atom(s));
65 Symbol d = p->lookup_l()->dots(dots_i_);
68 if (!(position_i_ %2))
69 dm.translate(Offset(0,dy));
72 out->translate(Offset(x_dir_i_ * p->note_width(),0));
73 bool streepjes = (position_i_<-1)||(position_i_ > staff_size_i_+1);
75 if (rest_b_ && balltype_i_ > 2)
79 int dir = sign(position_i_);
80 int s =(position_i_<-1) ? -((-position_i_)/2): (position_i_-staff_size_i_)/2;
81 Symbol str = p->lookup_l()->streepjes(s);
85 sm.translate(Offset(0,-dy* dir));
89 out->translate(Offset(0,dy*position_i_));