2 #include "note-head.hh"
5 #include "paper-def.hh"
8 #include "musical-request.hh"
12 Note_head::Note_head(int ss)
24 Note_head::set_rhythmic(Rhythmic_req*r_req_l)
26 balltype_i_ = r_req_l->duration_.type_i_;
29 dots_i_ = r_req_l->duration_.dots_i_;
32 IMPLEMENT_STATIC_NAME(Note_head);
35 Note_head::do_print()const
40 mtor << "balltype_i_ "<< balltype_i_ << ", position_i_ = "<< position_i_
41 << "dots_i_ " << dots_i_;
47 Note_head::compare(Note_head *const &a, Note_head * const &b)
49 return a->position_i_ - b->position_i_;
53 Note_head::brew_molecule_p() const
56 Paper_def *p = paper();
58 Real dy = p->internote_f();
61 s = p->lookup_l()->ball(balltype_i_);
63 s = p->lookup_l()->rest(balltype_i_);
65 out = new Molecule(Atom(s));
67 Symbol d = p->lookup_l()->dots(dots_i_);
70 if (!(position_i_ %2))
71 dm.translate(Offset(0,dy));
74 out->translate(Offset(x_dir_i_ * p->note_width(),0));
75 bool streepjes = (position_i_<-1)||(position_i_ > staff_size_i_+1);
77 if (rest_b_ && balltype_i_ > 2)
81 int dir = sign(position_i_);
82 int s =(position_i_<-1) ? -((-position_i_)/2): (position_i_-staff_size_i_)/2;
83 Symbol str = p->lookup_l()->streepjes(s);
87 sm.translate(Offset(0,-dy* dir));
91 out->translate(Offset(0,dy*position_i_));