2 beam.hh -- part of GNU LilyPond
4 (c) 1996--2000 Han-Wen Nienhuys
10 #include "lily-proto.hh"
14 /** a beam connects multiple stems.
16 Beam adjusts the stems its owns to make sure that they reach the
17 beam and that point in the correct direction (urg?)
21 y-position -- real (position of left edge)
25 damping -- amount of beam slope damping. (int)
26 should beam slope be damped? 0: no, 1: yes, 100000: horizontal beams
28 class Beam : public Spanner
33 int visible_stem_count () const;
34 Item* first_visible_stem () const;
35 Item* last_visible_stem () const;
36 static Real rest_collision_callback (Score_element *,Axis);
38 void add_stem (Score_element*);
39 void set_grouping (Rhythmic_grouping def, Rhythmic_grouping current);
40 void set_beaming (Beaming_info_list *);
42 VIRTUAL_COPY_CONS(Score_element);
44 int get_multiplicity () const;
46 static SCM brew_molecule (SCM);
47 static SCM before_line_breaking (SCM);
48 static SCM after_line_breaking (SCM);
50 Molecule stem_beams (Item *here, Item *next, Item *prev) const;
52 Direction get_default_dir () const;
53 void set_stem_directions ();
55 bool auto_knee (String gap_str, bool interstaff_b);
56 void set_stem_shorten ();
57 void calc_default_position_and_height (Real* y, Real* dy) const;
58 bool suspect_slope_b (Real y, Real dy) const;
59 Real calc_slope_damping_f (Real dy) const;
60 Real calc_stem_y_f (Item* s, Real y, Real dy) const;
61 Real check_stem_length_f (Real y, Real dy) const;
62 void set_stem_length (Real y, Real dy);
63 Real quantise_dy_f (Real dy) const;
64 Real quantise_y_f (Real y, Real dy, int quant_dir);
65 int forced_stem_count () const;