]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-1.3.29
authorfred <fred>
Tue, 26 Mar 2002 22:46:26 +0000 (22:46 +0000)
committerfred <fred>
Tue, 26 Mar 2002 22:46:26 +0000 (22:46 +0000)
input/test/bar-script-visibility.ly [new file with mode: 0644]
lily/bar-script-engraver.cc
lily/base-span-bar-engraver.cc
lily/clef-engraver.cc
lily/key-engraver.cc
lily/mark-engraver.cc
lily/staff-margin-engraver.cc
ly/engraver.ly
ly/params.ly
scm/lily.scm

diff --git a/input/test/bar-script-visibility.ly b/input/test/bar-script-visibility.ly
new file mode 100644 (file)
index 0000000..48b2479
--- /dev/null
@@ -0,0 +1,13 @@
+
+\score {
+\notes { c1 c1 \break c1 c1 }
+\paper {
+
+\translator{
+       \StaffContext
+       \consists Bar_number_engraver;
+       barNumberVisibilityFunction = #end-of-line-invisible
+}
+}
+}
+
index 98d4c92fdf098d65d1c00aed6aa255254d9c9a44..689ecea2bcff4166f9b1cadc40d61915ce8da4e3 100644 (file)
@@ -24,15 +24,19 @@ Bar_script_engraver::Bar_script_engraver ()
 {
   axis_ = Y_AXIS;
   text_p_ =0;
-  visibility_lambda_ 
-    = ly_eval_str ("non-postbreak-visibility");
 }
 
 void
 Bar_script_engraver::do_creation_processing ()
 {
+  String t = type_  + "VisibilityFunction";
+  SCM proc = get_property (t, 0);
+
+  if (gh_procedure_p (proc))
+      visibility_lambda_ = proc;
 }
 
+
 /*
   Some interesting item came across.  Lets attach the text and the
   positioner to the item.
@@ -142,9 +146,10 @@ Bar_script_engraver::create_items (Request *rq)
        ->set_elt_property ("padding",
                            gh_double2scm(paper_l ()->get_var ("interline")));
     }
-  
-  text_p_->set_elt_property ("visibility-lambda",
-                            visibility_lambda_);
+
+  if (gh_procedure_p (visibility_lambda_))
+      text_p_->set_elt_property ("visibility-lambda",
+                                visibility_lambda_);
   
   announce_element (Score_element_info (text_p_, rq));
 }
index 4636f957fac115a266f370bcf29d21969df3afbd..0c7177017f1cf6211c4f2c1b8fd9a6ed616b2d91 100644 (file)
@@ -51,6 +51,11 @@ Base_span_bar_engraver::acknowledge_element (Score_element_info i)
        {
          spanbar_p_ = get_span_bar_p();
          spanbar_p_->set_parent (bar_l_arr_[0], Y_AXIS);
+
+         /*
+           UGH. UGH UUHGK GUHG G
+           (ly_eval_str ??)
+          */
          String visnam =  String(name()) + "-visibility";
          
          spanbar_p_->set_elt_property ("visibility-lambda",
index 4dd5889831c5503a32d09c7f7d9f1763bec90a9b..e0c167b87f2fbd1a20c69d616f5622717294b32d 100644 (file)
@@ -199,7 +199,7 @@ Clef_engraver::do_pre_move_processing()
     {
       if(to_boolean (clef_p_->remove_elt_property("non-default")))
         clef_p_->set_elt_property("visibility-lambda",
-                                  ly_eval_str ("all-visibility"));
+                                  ly_eval_str ("all-visible"));
       
       typeset_element (clef_p_);
       clef_p_ =0;
index c94b17811bfead762db31d3b86b6b14cfb331458..40b9bd4bfd04408f47aedd999da52cf9a08de05d 100644 (file)
@@ -99,7 +99,7 @@ Key_engraver::acknowledge_element (Score_element_info info)
       if (!def)
        {
          item_p_->set_elt_property ("visibility-lambda",
-                                   ly_eval_str ("all-visibility"));
+                                   ly_eval_str ("all-visible"));
        }
     }
 
index 6e9dbfdb24c76166c8512132acdbe86bbd6c2e06..404644f2cea633c6ede89df0f58ab6326aaf3903 100644 (file)
@@ -18,7 +18,6 @@ Mark_engraver::Mark_engraver ()
   mark_req_l_ = 0;
   axis_ = Y_AXIS;
   type_ = "mark";
-  visibility_lambda_ = ly_eval_str ("mark-visibility");
 }
 
 void
index a7f2607c26cbda21ac42a0e52caf42eede5c8d2c..9a93d91e7dfebce9d07ce63bf62824357cd3af1a 100644 (file)
@@ -18,7 +18,6 @@ Staff_margin_engraver::Staff_margin_engraver ()
 {
   axis_ = X_AXIS;
   type_ = "margin";
-  visibility_lambda_ = ly_eval_str ("postbreak-only-visibility");
 }
 
 
index 177cbb8d53a72912091703e5e85b4cd10b14c0c1..b30c731e86e386674688d46680f970686b66ffa6 100644 (file)
@@ -61,8 +61,6 @@ StaffContext=\translator {
 %}
        defaultClef = #"treble"
 
-       marginBreakPriority = #-5
-
        \consists "Separating_line_group_engraver";
          
        \accepts "Voice";
@@ -291,8 +289,6 @@ StupidScore = \translator {
 
 BarNumberingStaffContext = \translator {
        \StaffContext
-       barColumnPriority = #0
-       marginBreakPriority = #-4
        \consists "Mark_engraver";
        \consists "Bar_number_engraver";
 };
@@ -306,8 +302,6 @@ HaraKiriStaffContext = \translator {
 
 OrchestralPartStaffContext = \translator {
        \StaffContext
-       barColumnPriority = #0
-       marginBreakPriority = #-4
        \consists "Mark_engraver";
        \consists "Bar_number_engraver";
 };
@@ -345,8 +339,9 @@ ScoreContext = \translator {
        \accepts "PianoStaff";
        \accepts "NoteNames";
 
-       clefBreakPriority = #-2
-       breathingSignBreakPriority = #-4
+       markVisibilityFunction = #end-of-line-invisible
+       barNumberVisibilityFunction = #end-of-line-invisible
+       marginVisibilityFunction = #begin-of-line-visible
 };
 
 \translator { \ScoreContext }
index 063c8e92cd7cd48ef4d78b2323fa3760276f318d..5c5d505123f5d972f426d62635833e1a075d7ac4 100644 (file)
@@ -41,9 +41,9 @@ arithmetic_multiplier = 0.9 * \quartwidth ;
 
 #'Stem_tremolo::beam-width = 1.5 * \quartwidth ; 
 
-#'Clef_item::visibility-lambda = #postbreak-only-visibility
-#'Key_item::visibility-lambda = #postbreak-only-visibility
-#'Breathing_sign::visibility-lambda = #non-postbreak-visibility
+#'Clef_item::visibility-lambda = #begin-of-line-visible
+#'Key_item::visibility-lambda = #begin-of-line-visible
+#'Breathing_sign::visibility-lambda = #begin-of-line-invisible
 
 % catch suspect beam slopes, set slope to zero if
 % outer stem is lengthened more than
@@ -51,10 +51,22 @@ beam_lengthened = 0.2 * \staffspace;
 % and slope is running away steeper than
 beam_steep_slope = 0.2 / 1.0;
 
+
+
 %{
-dit(code(slur_x_gap)) Horizontal space between note and slur.  Set to
-code(\staffspace / 5) by default.  
+  Slur parameters.
+  
+  See Documentation/programmer/fonts.doc
+%}
+% Height-limit (h_inf) = factor * staff_space
+slur_height_limit_factor = 2.0;
+slur_ratio = 1.0 / 3.0;
+
+slur_thickness = 1.2 * \stafflinethickness;
 
+
+%{
+Horizontal space between centre of notehead and slur.
 %}
 % OSU: suggested gap = ss / 5;
 slur_x_gap = \staffspace / 5.0;
@@ -62,25 +74,34 @@ slur_y_gap = 0.25 * \staffspace;
 slur_y_free = 0.75 * \staffspace;
 slur_x_minimum = 1.5 * \staffspace;
 
+
+bezier_asymmetry = 1.0;
+bezier_beautiful = 2.0;
+
+% The constants that define the valid areas for the middle control points
+% Used in de_uglyfy.  Bit empirical.
+bezier_control1 = 1.5;
+bezier_control2 = 0.8;
+bezier_control3 = -2.0;
+
+% URG: the magic constants for area asymmetry
+bezier_pct_c0 = -0.2;
+bezier_pct_c3 = 0.000006;
+bezier_pct_out_max = 0.8;
+bezier_pct_in_max = 1.2;
+bezier_area_steps = 1.0;
+
+slur_force_blowfit = 0.5;
+slur_beautiful = 0.5;
+
+
 %{
-Like beams, slurs often aren't as steep as the notes they encompass.
-This sets the amount of damping.
+  Tie parameters
 %}
-% slope damping: keep dy/dx < slur_slope_damping
-slur_slope_damping = 0.3;
-slur_interstaff_slope_damping = 0.6;
-% height damping: keep h/dx < slur_height_damping
-slur_height_damping = 0.4;
-slur_interstaff_height_damping = 0.5;
-% snap to stem if slur ends closer to stem than
-slur_snap_to_stem = 1.75 * \staffspace;
-slur_interstaff_snap_to_stem = 2.5 * \staffspace;
-% maximum dy change allowed by snapping
-slur_snap_max_slope_change = 0.5;
-slur_interstaff_snap_max_slope_change = 0.5;
-slur_thickness = 1.2 * \stafflinethickness;
-
 
+tie_height_limit_factor = \slur_height_limit_factor;
+tie_ratio = \slur_ratio;
+tie_thickness = \slur_thickness;
 
 tie_x_minimum = \staffspace + \slur_x_minimum;
 % OSU: tie gap == slur gap
@@ -89,29 +110,10 @@ tie_y_gap = 0.25 * \staffspace;
 % length of a tie that's a staffspace high
 tie_staffspace_length = 4.0 * \staffspace;
 
-% ugh: rename to bow (in bezier.cc and fonts.doc too...)
-
-% used to be 1.4 .
-tie_thickness = 1.2 * \stafflinethickness;
 tie_staffline_clearance = 2.0 *\tie_thickness;
 
-%{
- Specifies the maximum height of slurs.
-%}
-slur_height_limit = \staffheight;
 
 
-%{
-Specifes the ratio of slur hight to slur width
-to aim for.  Default value is 0.3. 
-%}
-% slur_ratio = 0.3;
-% try bit flatter slurs
-slur_ratio = 0.25;
-slur_clip_ratio = 1.2;
-slur_clip_height = 3.0 * \staffheight;
-slur_clip_angle = 100.0;
-slur_rc_factor = 2.4;
 
 % ugh
 notewidth = (\quartwidth + \wholewidth) / 2.0;
index 582c55e24be4b06338f12212a772ebdde8450925..f2b009aa9e7ebc6e86e51cf85f39069e0db07552 100644 (file)
 
 
 ;; See documentation of Item::visibility_lambda_
-(define (postbreak-only-visibility d) (if (= d 1) '(#f . #f) '(#t . #t)))
-(define (spanbar-non-postbreak-visibility d) (if (= d -1) '(#t . #t) '(#f . #f)))
-(define (all-visibility d) '(#f . #f))
-(define (non-postbreak-visibility d) (if (= d 1) '(#t . #t) '(#f . #f)))
-(define (non-prebreak-visibility d) (if (= d -1) '(#t . #t) '(#f . #f)))
+(define (begin-of-line-visible d) (if (= d 1) '(#f . #f) '(#t . #t)))
+(define (spanbar-begin-of-line-invisible d) (if (= d -1) '(#t . #t) '(#f . #f)))
+(define (all-visible d) '(#f . #f))
+(define (begin-of-line-invisible d) (if (= d 1) '(#t . #t) '(#f . #f)))
+(define (end-of-line-invisible d) (if (= d -1) '(#t . #t) '(#f . #f)))
 
 
 ;; Score_span_bars are only visible at start of line
 ;; i.e. if break_dir == RIGHT == 1
-(define Span_bar_engraver-visibility non-postbreak-visibility)
-(define Base_span_bar_engraver-visibility non-postbreak-visibility)
-(define mark-visibility non-prebreak-visibility)
-(define Span_score_bar_engraver-visibility postbreak-only-visibility)
-(define Piano_bar_engraver-visibility postbreak-only-visibility)
-(define Staff_group_bar_engraver-visibility postbreak-only-visibility)
+(define Span_bar_engraver-visibility begin-of-line-invisible)
+(define Base_span_bar_engraver-visibility begin-of-line-invisible)
+(define mark-visibility end-of-line-invisible)
+(define Span_score_bar_engraver-visibility begin-of-line-visible)
+(define Piano_bar_engraver-visibility begin-of-line-visible)
+(define Staff_group_bar_engraver-visibility begin-of-line-visible)
 
 ;; Spacing constants for prefatory matter.
 ;;
 
 ;;;;;;;;;;;;;;;;;;; generic output
 
-(define (translate-atom offset exp)
-  exp)
+(define (translate-molecule offset)
+  "")
 
 
 ;;;;;;;;;;;;;;;;;;; TeX output