From ab4a244b8cf89a831db6f55534e1cb12500f7742 Mon Sep 17 00:00:00 2001 From: fred Date: Wed, 27 Mar 2002 00:48:26 +0000 Subject: [PATCH] lilypond-1.3.125 --- Documentation/user/features.itely | 4 +++ input/test/auto-isknee.ly | 47 +++++++++++++++---------------- input/test/auto-knee.ly | 24 +++++++++------- lily/include/beam.hh | 27 +++++++++--------- 4 files changed, 54 insertions(+), 48 deletions(-) diff --git a/Documentation/user/features.itely b/Documentation/user/features.itely index cb60274f36..cdff41fb77 100644 --- a/Documentation/user/features.itely +++ b/Documentation/user/features.itely @@ -1,3 +1,4 @@ +@c -*-texinfo-*- @ignore TODO @@ -124,6 +125,9 @@ switches to another staff. This is enabled if the property @cindex beam settings @cindex manual beams + +@c auto knees + In some cases it may be necessary to override LilyPond's automatic beaming algorithm. For example, the auto beamer will not beam over rests, so if you want that, specify the begin and end point manually diff --git a/input/test/auto-isknee.ly b/input/test/auto-isknee.ly index afe22047f2..fa3256b668 100644 --- a/input/test/auto-isknee.ly +++ b/input/test/auto-isknee.ly @@ -1,26 +1,25 @@ -\version "1.3.117"; +\header{ +texidoc="Two automatic knees"; +} + \score { - \notes \context PianoStaff < - \context Staff = "up" { - \autochange Staff \relative c' { - [c8 e'] [c' c,,] - \stemDown - c'8 c c g, - g8 d' d d - \stemUp - b8 c d e - } - } - \context Staff = "down" { - \clef bass; - s1*2 - } - > - \paper{ - \translator{ - \StaffContext - autoKneeGap = #13.0 - autoInterstaffKneeGap = #4.0 - } - } + \notes \context PianoStaff < + \context Staff = "up" \notes\relative c''{ + [ b8 \translator Staff="down" d,, ] + [ c \translator Staff="up" c'' ] + [ b, \translator Staff="down" d ] + } + \context Staff = "down" { + \clef bass; + s2. + } + > + \paper{ + linewidth = 40*\staffspace; +% Now by default +% \translator{ +% \VoiceContext +% Beam \override #'auto-knee-gap = #7 +% } + } } diff --git a/input/test/auto-knee.ly b/input/test/auto-knee.ly index 3a3fbf55d2..b49954b60c 100644 --- a/input/test/auto-knee.ly +++ b/input/test/auto-knee.ly @@ -1,13 +1,17 @@ +\header{ +texidoc="One automatic knee"; +} \score { - \context Staff \notes\relative c'{ -% \property Voice.autoKneeGap = #13 - [c8 e'] [c' c,,] - } - \paper{ - \translator{ - \StaffContext - autoKneeGap = #13 - } - } + \context Staff \notes\relative c''{ + [c'8 c,,] [c8 e'] + } + \paper{ + linewidth = 40*\staffspace; +% Now by default +% \translator { +% \VoiceContext +% Beam \override #'auto-knee-gap = #7 +% } + } } diff --git a/lily/include/beam.hh b/lily/include/beam.hh index 4f01a16982..18126770af 100644 --- a/lily/include/beam.hh +++ b/lily/include/beam.hh @@ -16,8 +16,8 @@ class Beam { public: static int visible_stem_count (Grob*); - static Item* first_visible_stem (Grob*); - static Item* last_visible_stem (Grob*); + static Item* first_visible_stem (Grob*); + static Item* last_visible_stem (Grob*); static bool has_interface (Grob*); static void set_interface (Grob*); DECLARE_SCHEME_CALLBACK(rest_collision_callback, (SCM element, SCM axis)); @@ -33,20 +33,19 @@ public: private: static Direction get_default_dir (Grob*); - static void set_stem_directions (Grob*); - static void auto_knees (Grob*); - static bool auto_knee (Grob*,String gap_str, bool interstaff_b); + static void set_stem_directions (Grob*); + static void consider_auto_knees (Grob*); static void set_stem_shorten (Grob*); - static void calc_default_position_and_height (Grob*,Real* y, Real* dy); - static bool suspect_slope_b (Grob*, Real y, Real dy); - static Real calc_slope_damping_f (Grob*, Real dy); - static Real calc_stem_y_f (Grob*, Item* s, Real y, Real dy); - static Real check_stem_length_f (Grob*, Real y, Real dy); - static void set_stem_length (Grob*, Real y, Real dy); - static Real quantise_dy_f (Grob*, Real dy); - static Real quantise_y_f (Grob*, Real y, Real dy, int quant_dir); + static void calc_default_position_and_height (Grob*,Real* y, Real* dy); + static bool suspect_slope_b (Grob*, Real y, Real dy); + static Real calc_slope_damping_f (Grob*, Real dy); + static Real calc_stem_y_f (Grob*, Item* s, Real y, Real dy); + static Real check_stem_length_f (Grob*, Real y, Real dy); + static void set_stem_length (Grob*, Real y, Real dy); + static Real quantise_dy_f (Grob*, Real dy); + static Real quantise_y_f (Grob*, Real y, Real dy, int quant_dir); static int forced_stem_count (Grob*); }; -#endif // BEAM_HH +#endif /* BEAM_HH */ -- 2.39.5