From: fred Date: Wed, 27 Mar 2002 00:33:55 +0000 (+0000) Subject: lilypond-1.3.113 X-Git-Tag: release/1.5.59~1077 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=f490c8c0183de5648361c44ba87369edc18c84f9;p=lilypond.git lilypond-1.3.113 --- diff --git a/lily/include/stem-tremolo.hh b/lily/include/stem-tremolo.hh index e093b3a497..adfdf739d1 100644 --- a/lily/include/stem-tremolo.hh +++ b/lily/include/stem-tremolo.hh @@ -18,8 +18,9 @@ class Stem_tremolo public: static void set_interface (Grob*); static bool has_interface (Grob*); - DECLARE_SCHEME_CALLBACK(dim_callback, (SCM smob, SCM axis)); - DECLARE_SCHEME_CALLBACK(brew_molecule, (SCM )); + DECLARE_SCHEME_CALLBACK (dim_callback, (SCM smob, SCM axis)); + DECLARE_SCHEME_CALLBACK (brew_molecule, (SCM )); + DECLARE_SCHEME_CALLBACK (height, (SCM,SCM)); static void set_stem (Grob*me, Grob *st); }; diff --git a/lily/stem-tremolo.cc b/lily/stem-tremolo.cc index 689d24e71f..36cbc63f97 100644 --- a/lily/stem-tremolo.cc +++ b/lily/stem-tremolo.cc @@ -48,6 +48,20 @@ Stem_tremolo::dim_callback (SCM e, SCM ) return ly_interval2scm ( Interval (-space, space)); } +/* + ugh ? --from Slur + */ +MAKE_SCHEME_CALLBACK (Stem_tremolo, height, 2); +SCM +Stem_tremolo::height (SCM smob, SCM ax) +{ + Axis a = (Axis)gh_scm2int (ax); + Grob * me = unsmob_grob (smob); + assert ( a == Y_AXIS); + + SCM mol = me->get_uncached_molecule (); + return ly_interval2scm (unsmob_molecule (mol)->extent (a)); +} MAKE_SCHEME_CALLBACK(Stem_tremolo,brew_molecule,1); diff --git a/scm/beam.scm b/scm/beam.scm index 9e7005e31f..8ae7f30044 100644 --- a/scm/beam.scm +++ b/scm/beam.scm @@ -122,26 +122,3 @@ ;; - take #forced stems into account (now done in C++)? ;; - take y-position of chord or beam into account -; -; todo: clean this up a bit: the list is getting rather long. -; -(define basic-beam-properties - `( - (molecule-callback . ,Beam::brew_molecule) - (thickness . 0.42) ; in staff-space, should use stafflinethick? - (before-line-breaking-callback . ,Beam::before_line_breaking) - (after-line-breaking-callback . ,Beam::after_line_breaking) - (default-neutral-direction . 1) - (dir-function . ,beam-dir-majority) - (height-quants . ,default-beam-dy-quants) - (vertical-position-quant-function . ,default-beam-y-quants) - (beamed-stem-shorten . (0.5)) - (outer-stem-length-limit . 0.2) - (slope-limit . 0.2) - (flag-width-function . ,default-beam-flag-width-function) - (space-function . ,default-beam-space-function) - (damping . 1) - (meta . ,(element-description "Beam" beam-interface)) - ) - ) - diff --git a/scm/element-descriptions.scm b/scm/element-descriptions.scm index 5ab89e84df..15e9b9ff67 100644 --- a/scm/element-descriptions.scm +++ b/scm/element-descriptions.scm @@ -46,7 +46,25 @@ text-interface font-interface break-aligned-interface)) )) - (Beam . ,basic-beam-properties) + (Beam . ( + ;; todo: clean this up a bit: the list is getting + ;; rather long. + (molecule-callback . ,Beam::brew_molecule) + (thickness . 0.42) ; in staff-space, should use stafflinethick? + (before-line-breaking-callback . ,Beam::before_line_breaking) + (after-line-breaking-callback . ,Beam::after_line_breaking) + (default-neutral-direction . 1) + (dir-function . ,beam-dir-majority) + (height-quants . ,default-beam-dy-quants) + (vertical-position-quant-function . ,default-beam-y-quants) + (beamed-stem-shorten . (0.5)) + (outer-stem-length-limit . 0.2) + (slope-limit . 0.2) + (flag-width-function . ,default-beam-flag-width-function) + (space-function . ,default-beam-space-function) + (damping . 1) + (meta . ,(element-description "Beam" beam-interface)) + )) (BreakAlignment . ( (breakable . #t) @@ -287,13 +305,24 @@ rhythmic-head-interface font-interface note-head-interface )) )) - (NoteHeadLine . ( + (Glissando . ( (type . line) (gap . 0.5) + (breakable . #t) (X-extent-callback . #f) (Y-extent-callback . #f) (molecule-callback . ,Line_spanner::brew_molecule) - (meta . ,(element-description "NoteHeadLine" + (meta . ,(element-description "Glissando" + line-spanner-interface)) + )) + (FollowThread . ( + (type . line) + (gap . 0.5) + (breakable . #t) + (X-extent-callback . #f) + (Y-extent-callback . #f) + (molecule-callback . ,Line_spanner::brew_molecule) + (meta . ,(element-description "FollowThread" line-spanner-interface)) )) @@ -356,7 +385,27 @@ (meta . ,(element-description "ScriptColumn" script-column-interface)) )) - (Slur . ,default-basic-slur-properties) + (Slur . ( + (molecule-callback . ,Slur::brew_molecule) + (thickness . 1.2) + (spacing-procedure . ,Slur::set_spacing_rods) + (minimum-length . 1.5) + (after-line-breaking-callback . ,Slur::after_line_breaking) + (extremity-rules . ,default-slur-extremity-rules) + (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))) + (beautiful . 0.5) + (y-free . 0.75) + (attachment-offset . ((0 . 0) . (0 . 0))) + (slope-limit . 0.8) + (meta . ,(element-description "Slur" slur-interface)) + )) + (SpacingSpanner . ( (spacing-procedure . ,Spacing_spanner::set_springs) (stem-spacing-correction . 0.5) @@ -438,6 +487,9 @@ (StemTremolo . ( (molecule-callback . ,Stem_tremolo::brew_molecule) + (Y-extent-callback . ,Stem_tremolo::height) + (X-extent-callback . #f) + (beam-width . 2.0) ; staff-space (beam-thickness . 0.42) ; staff-space (beam-space-function . ,default-beam-space-function) diff --git a/scm/slur.scm b/scm/slur.scm index a91bc2f04e..02e4642f0e 100644 --- a/scm/slur.scm +++ b/scm/slur.scm @@ -107,25 +107,3 @@ )) -(define default-basic-slur-properties - `( - (molecule-callback . ,Slur::brew_molecule) - (thickness . 1.2) - (spacing-procedure . ,Slur::set_spacing_rods) - (minimum-length . 1.5) - (after-line-breaking-callback . ,Slur::after_line_breaking) - (extremity-rules . ,default-slur-extremity-rules) - (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))) - (beautiful . 0.5) - (y-free . 0.75) - (attachment-offset . ((0 . 0) . (0 . 0))) - (slope-limit . 0.8) - (meta . ,(element-description "Slur" slur-interface)) - ) - )