2 beam.hh -- part of GNU LilyPond
4 (c) 1996--2000 Han-Wen Nienhuys
10 #include "lily-proto.hh"
11 #include "lily-guile.hh"
18 static int visible_stem_count (Score_element*);
19 static Item* first_visible_stem (Score_element*);
20 static Item* last_visible_stem (Score_element*);
21 static bool has_interface (Score_element*);
22 static void set_interface (Score_element*);
23 DECLARE_SCHEME_CALLBACK(rest_collision_callback, (SCM element, SCM axis));
25 static void add_stem (Score_element*,Score_element*);
26 static void set_beaming (Score_element*,Beaming_info_list *);
27 static void set_stemlens (Score_element*);
28 static int get_multiplicity (Score_element*me);
29 DECLARE_SCHEME_CALLBACK(brew_molecule, (SCM ));
30 DECLARE_SCHEME_CALLBACK(before_line_breaking, (SCM ));
31 DECLARE_SCHEME_CALLBACK(after_line_breaking, (SCM ));
32 static Molecule stem_beams (Score_element*,Item *here, Item *next, Item *prev);
35 static Direction get_default_dir (Score_element*);
36 static void set_stem_directions (Score_element*);
37 static void auto_knees (Score_element*);
38 static bool auto_knee (Score_element*,String gap_str, bool interstaff_b);
39 static void set_stem_shorten (Score_element*);
40 static void calc_default_position_and_height (Score_element*,Real* y, Real* dy);
41 static bool suspect_slope_b (Score_element*, Real y, Real dy);
42 static Real calc_slope_damping_f (Score_element*, Real dy);
43 static Real calc_stem_y_f (Score_element*, Item* s, Real y, Real dy);
44 static Real check_stem_length_f (Score_element*, Real y, Real dy);
45 static void set_stem_length (Score_element*, Real y, Real dy);
46 static Real quantise_dy_f (Score_element*, Real dy);
47 static Real quantise_y_f (Score_element*, Real y, Real dy, int quant_dir);
48 static int forced_stem_count (Score_element*);