2002-08-15 Jan Nieuwenhuizen <janneke@gnu.org>
+ * scm/grob-property-description.scm (height-limit, ratio): Add.
+
+ * lily/slur.cc:
+ * scm/grob-description.scm (Slur, PhrasingSlur): Move height-limit
+ and ratio out of details.
+
* lily/scores.cc (Input_file_settings): Initalize global_header_.
* lily/include/file-results.hh (class Input_file_settings): Add
Real staff_space = Staff_symbol_referencer::staff_space ((Grob*)me);
SCM details = me->get_grob_property ("details");
- SCM h_inf_scm = scm_assq (ly_symbol2scm ("height-limit"), details);
- SCM r_0_scm = scm_assq (ly_symbol2scm ("ratio"), details);
+ SCM h_inf_scm = me->get_grob_property ("height-limit");
+ SCM r_0_scm = me->get_grob_property ("ratio");
- Real r_0 = gh_scm2double (ly_cdr (r_0_scm));
- Real h_inf = staff_space * gh_scm2double (ly_cdr (h_inf_scm));
+ Real r_0 = gh_scm2double (r_0_scm);
+ Real h_inf = staff_space * gh_scm2double (h_inf_scm);
Slur_bezier_bow bb (get_encompass_offsets (me),
Directional_element_interface::get (me),
ADD_INTERFACE (Slur,"slur-interface",
"A slur",
- "slope-limit de-uglify-parameters details attachment direction attachment-offset beautiful y-free control-points extremity-rules extremity-offset-alist thickness dashed");
+ "attachment attachment-offset beautiful control-points dashed details de-uglify-parameters direction extremity-rules extremity-offset-alist height-limit ratio slope-limit thickness y-free");
(extremity-offset-alist . ,default-phrasing-slur-extremity-offset-alist)
(de-uglify-parameters . (1.5 0.8 -2.0))
(Y-extent-callback . ,Slur::height)
- (details . ((height-limit . 2.0) (ratio . 0.333) (force-blowfit . 0.5)
- (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)))
+ (height-limit . 2.0)
+ (ratio . 0.333)
(beautiful . 0.5)
(y-free . 0.75)
(attachment . (#f . #f))
(attachment-offset . ((0 . 0) . (0 . 0)))
(slope-limit . 0.8)
+ (details . ((force-blowfit . 0.5)
+ (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)))
(meta . ((interfaces . (slur-interface spanner-interface))))
))
(extremity-offset-alist . ,default-slur-extremity-offset-alist)
(de-uglify-parameters . (1.5 0.8 -2.0))
(Y-extent-callback . ,Slur::height)
- (details . ((height-limit . 2.0) (ratio . 0.333) (force-blowfit . 0.5)
- (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)))
+ (height-limit . 2.0)
+ (ratio . 0.333)
(beautiful . 0.5)
(y-free . 0.75)
(attachment . (#f . #f))
(attachment-offset . ((0 . 0) . (0 . 0)))
(slope-limit . 0.8)
+ (details . ((force-blowfit . 0.5)
+ (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)))
(meta . ((interfaces . (slur-interface spanner-interface))))
))
(grob-property-description 'hair-thickness number? "thickness, measured in stafflinethickness.")
(grob-property-description 'heads pair? "Pair of grob pointers, pointing to the two heads of the tie.")
(grob-property-description 'height number? "in staffspace.")
+(grob-property-description 'height-limit number? "Maximum slur height,
+ long slurs approach this height.
+
+ For small width w, the height should be proportional to w, for w ->
+ infinity, the height should rise to limit h_infinity asymptotically.
+
+ Hence we take F (x) such that
+@quotation
+@example
+ F (0) = 0 , F' (0) = 1, and F (infinity) = 1
+@end example
+@end quotation
+ where
+@quotation
+@example
+ h = height-limit * F (x * ratio / height-limit)
+@end example
+@end quotation
+ Currently, for F we use
+@quotation
+@example
+ F (x) = 2/pi * atan (pi * x/2)
+@end example
+@end quotation
+")
(grob-property-description 'horizontal-shift integer? "integer that identifies ranking of note-column for horizontal shifting. This is used by @ref{note-collision-interface}.")
(grob-property-description 'ideal-distances list? "(OBJ . (DIST . STRENGTH)) pairs.")
(grob-property-description 'interfaces list? "list of symbols indicating the interfaces supported by this object. Is initialized from the @code{meta} field.")
(grob-property-description 'pitches list? "list of musical-pitch.")
(grob-property-description 'positions pair? "cons of staff positions (LEFT . RIGHT")
(grob-property-description 'raise number? "height for text to be raised (a negative value lowers the text.")
+(grob-property-description 'ratio number? "Slur parameter. See height-limit.")
(grob-property-description 'right-padding number? "space right of accs.")
(grob-property-description 'right-trim-amount number? "shortening of the lyric extender on the right.")
(grob-property-description 'right-widen boolean? "Whether the right edge of a piano pedal bracket should be widened by the second element of edge-widen")