]> git.donarmstrong.com Git - lilypond.git/blobdiff - scm/grob-description.scm
release: 1.5.43
[lilypond.git] / scm / grob-description.scm
index cbe545bd0a18ab9dce5b2f3b2f796233db84daf9..997cbb755f3cd2724e57a4c4fca3414ba0b10f7d 100644 (file)
@@ -5,10 +5,10 @@
 ;;;; (c) 1998--20.301  Han-Wen Nienhuys <hanwen@cs.uu.nl>
 ;;;;                 Jan Nieuwenhuizen <janneke@gnu.org>
 
-                                       ; distances are given in stafflinethickness (thicknesses) and
-                                       ; staffspace (distances)
+;;;; distances are given in stafflinethickness (thicknesses) and
+;;;; staffspace (distances)
 
-;;; WARNING: the meta field should be the last one.
+;;;; WARNING: the meta field should be the last one.
 
 ;; TODO: junk the meta field in favor of something more compact?
 (define all-grob-descriptions
@@ -20,7 +20,7 @@
        (after-line-breaking-callback . ,Local_key_item::after_line_breaking)
        (direction . -1)
        (left-padding . 0.2)
-       (right-padding . 0.4)
+       (right-padding . 0.5)
        (paren-cautionaries . #t)
        (font-family . music)
        (meta . ,(grob-description accidentals-interface font-interface side-position-interface))
@@ -52,7 +52,7 @@
                        (time-signature . (extra-space . 0.75)) 
                        (custos . (minimum-space . 2.0))
                        (clef .   (minimum-space . 1.0))
-                       (begin-of-note . (extra-space . 1.0))
+                       (begin-of-note . (extra-space . 1.3))
                        ))
 
        ;;
        ;; todo: clean this up a bit: the list is getting
        ;; rather long.
        (molecule-callback . ,Beam::brew_molecule)
-       (y-dy-callbacks . (,Beam::least_squares
-                          ,Beam::cancel_suspect_slope
-                          ,Beam::slope_damping
-                          ,Beam::quantise_dy
-                          ,Beam::user_override
-                          ,Beam::do_quantise_y))
-
+       (concaveness-threshold . 0.08)
+       (positions . (#f . #f))
+       (position-callbacks . (,Beam::least_squares
+                              ,Beam::check_concave
+                              ,Beam::slope_damping
+                              ,Beam::quanting
+                              ))
+       
        (thickness . 0.48) ; in staff-space
        (before-line-breaking-callback . ,Beam::before_line_breaking)
-       (after-line-breaking-callback . ,Beam::after_line_breaking)
+       (after-line-breaking-callback . (,Beam::after_line_breaking
+                                        ,Beam::end_after_line_breaking))
+       (quant-score-functions . (,Beam::score_forbidden_quants
+                                 ,Beam::score_slopes_dy
+                                 ,Beam::score_stem_lengths
+                                 ))
        (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))
+       (dir-function . ,beam-dir-majority-median)
+       (beamed-stem-shorten . (1.0 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)
        (auto-knee-gap . 7)
+       (font-name . "cmr10")
        (meta . ,(grob-description beam-interface))
        ))
 
        (meta . ,(grob-description multi-measure-rest-interface  font-interface percent-repeat-interface))
        ))
 
+    (PianoPedalBracket   ;; an example of a text spanner
+     . (
+       (molecule-callback . ,Text_spanner::brew_molecule)
+       (font-family . roman)
+       (type . line)
+       (if-text-padding . 1.0)
+       (width-correct . 0)
+       (outer . #t)
+       (direction . -1)
+       (edge-width . (0.5 . 0.5))
+       (edge-height . (1.0 . 1.0))
+       (shorten-pair . (0.0 . 0.0))
+       (left-widen  . #f)
+       (right-widen . #f)
+       (text-start  . #f)
+       (meta . ,(grob-description piano-pedal-interface))
+       ))
+
     (RepeatSlash
      . (
        (molecule-callback . , Percent_repeat_item_interface::beat_slash)
        (spacing-procedure .  ,Spacing_spanner::set_springs)
        (grace-space-factor . 0.8)
 
-       ;; TODO: change naming -- unintuitive
-       (arithmetic-basicspace . 2.0)
-       (arithmetic-multiplier . ,(* 0.9 1.32))
+       (shortest-duration-space . 2.0)
+       (spacing-increment . 1.2)
+       
        (X-extent-callback . #f)
        (Y-extent-callback . #f)
-       ;; assume that notes at least this long are present.
-       (maximum-duration-for-spacing . ,(make-moment 1 8))
+
+
        (meta . ,(grob-description  spacing-spanner-interface))
        ))
 
      . (
        (breakable . #t)
        (X-extent-callback . #f)
+       (stem-spacing-correction . 0.4)
        (Y-extent-callback . #f)
        (meta . ,(grob-description staff-spacing-interface))
        ))
     (SostenutoPedal
      . (
        (molecule-callback . ,Text_item::brew_molecule)
-       (direction . -1)
+       (direction . 1)
        (X-offset-callbacks . (,Side_position_interface::aligned_on_self))
-       (Y-offset-callbacks .
-                           (,Side_position_interface::aligned_side
-                            ,Side_position_interface::centered_on_parent))
        (no-spacing-rods . #t)
+       (padding . 0.0) ;; padding relative to SostenutoPedalLineSpanner
+       (pedal-type . mixed)
+       (font-family . roman)
        (font-shape . italic)
        (self-alignment-X . 0)
        (meta . ,(grob-description text-interface  font-interface))
        ))
 
+    (SostenutoPedalLineSpanner 
+     . (
+       (axes . ( 1))
+       (padding . 1.2)
+       (minimum-space . 1.0)
+       (direction . -1)
+       (meta . ,(grob-description piano-pedal-interface axis-group-interface side-position-interface))
+       ))
+       
     (Stem
      . (
        (before-line-breaking-callback . ,Stem::before_line_breaking)
        ;;  a whole staffspace seems a bit drastical: we'll do half.
 
        (lengths . (3.5 3.5 3.5 4.5 5.0))
-       (stem-shorten . (0.5))
+       (stem-shorten . (1.0 0.5))
                                        ; if stem is on middle line, choose this direction.
        (neutral-direction . -1)
        (X-offset-callbacks . (,Stem::off_callback))
        (X-extent-callback . #f)
 
        (beam-width . 2.0) ; staff-space
-       (beam-thickness . 0.42) ; staff-space
-       (beam-space-function . ,default-beam-space-function)
+       (beam-thickness . 0.48) ; staff-space
        (meta . ,(grob-description stem-tremolo-interface ))
        ))
 
        (no-spacing-rods . #t)
        (molecule-callback . ,Sustain_pedal::brew_molecule)
        (self-alignment-X . 0)
-       (direction . -1)
+       (direction . 1)
+       (padding . 0.0)  ;; padding relative to SustainPedalLineSpanner
+       (pedal-type . text)
        (X-offset-callbacks . (,Side_position_interface::aligned_on_self))
-       (Y-offset-callbacks .
-                           (,Side_position_interface::aligned_side
-                            ,Side_position_interface::centered_on_parent))
+       (meta . ,(grob-description piano-pedal-interface side-position-interface font-interface))
+       ))
 
-       (meta . ,(grob-description sustain-pedal-interface side-position-interface font-interface))
+    (SustainPedalLineSpanner 
+     . (
+       (axes . ( 1))
+       (padding . 1.2)
+       (minimum-space . 1.0)
+       (direction . -1)
+       (meta . ,(grob-description piano-pedal-interface axis-group-interface side-position-interface))
        ))
 
     (SystemStartBrace
      . (
        (molecule-callback . ,Text_spanner::brew_molecule)
        (font-family . roman)
-       (type . "line")
+       (type . line)
 
        ;; urg, only for (de)cresc. text spanners
        (if-text-padding . 1.0)
        (font-shape . italic)
        (no-spacing-rods . #t)
        (self-alignment-X . 0)
-       (direction . -1)
+       (direction . 1)
+       (pedal-type . text)
+       (padding . 0.0)  ;; padding relative to UnaCordaPedalLineSpanner
        (X-offset-callbacks . (,Side_position_interface::aligned_on_self))
-       (Y-offset-callbacks .
-                           (,Side_position_interface::aligned_side
-                            ,Side_position_interface::centered_on_parent))
        (meta . ,(grob-description text-interface font-interface))
        ))
 
+    (UnaCordaPedalLineSpanner 
+     . (
+       (axes . ( 1))
+       (padding . 1.2)
+       (minimum-space . 1.0)
+       (direction . -1)
+       (meta . ,(grob-description piano-pedal-interface axis-group-interface side-position-interface))
+       ))
+
     (VoltaBracket
      . (
        (molecule-callback . ,Volta_spanner::brew_molecule)