]> git.donarmstrong.com Git - lilypond.git/blobdiff - scm/grob-description.scm
* Documentation/user/lilypond-book.itely: small cleanups
[lilypond.git] / scm / grob-description.scm
index 7c5cb8dfdfc71e38adb5c8d366e680bff1b084ad..da46eb95c98d2e1e8845982941ca4d05fcf8e3d0 100644 (file)
        ))
     (AccidentalPlacement
      . (
-       (X-extent-callback . ,Accidental_placement::extent_callback)
+       (X-extent-callback . ,Axis_group_interface::group_extent_callback)
        (left-padding . 0.3)
-       (right-padding . 0.3)
+
+       ;; this is quite small, but it is very ugly to have
+       ;; accs closer to the previous note than to the next one.
+       (right-padding . 0.15)
        (meta . ((interfaces . (item-interface accidental-placement-interface))))
        ))
 
        (after-line-breaking-callback . ,Beam::after_line_breaking)
        (neutral-direction . -1)
        (dir-function . ,beam-dir-majority-median)
-       (beamed-stem-shorten . (1.0 0.5))
+       
+       ;; Whe have some unreferenced problems here.
+       ;;
+       ;; If we shorten beamed stems less than normal stems (1 staffspace),
+       ;; or high order less than 8th beams, patterns like
+       ;;     c''4 [c''8 c''] c''4 [c''16 c]
+       ;; are ugly (different stem lengths).
+       ;;
+       ;; But if we shorten 16th beams as much as 8th beams, a single
+       ;; forced 16th beam looks *very* short.
+
+       ;; We choose to shorten 8th beams the same as single stems,
+       ;; and high order beams less than 8th beams, so that all
+       ;; isolated shortened beams look nice and a bit shortened,
+       ;; sadly possibly breaking patterns with high order beams.
+       (beamed-stem-shorten . (1.0 0.5 0.25))
+       
        (outer-stem-length-limit . 0.2)
        (slope-limit . 0.2)
        (flag-width-function . ,default-beam-flag-width-function)
        (damping . 1)
-       (auto-knee-gap . 7)
+       (auto-knee-gap . 5.5)
        (font-name . "cmr10")
        (space-function . ,Beam::space_function)
        (meta . ((interfaces . (staff-symbol-referencer-interface beam-interface spanner-interface))))
        (font-family . dynamic)
        (font-shape . italic)
        (self-alignment-Y . 0)
-       (meta . ((interfaces . (font-interface text-interface self-alignment-interface  dynamic-interface item-interface ))))
+       (meta . ((interfaces . (font-interface text-interface self-alignment-interface  dynamic-interface script-interface item-interface ))))
        ))
 
     (DynamicLineSpanner
        (X-extent-callback . ,Grob::point_dimension_callback)
        (breakable . #t)
        (space-alist . (
+                       (custos . (extra-space . 0.0))
                        (ambitus . (extra-space . 2.0))
                        (time-signature . (extra-space . 0.0)) 
                        (staff-bar . (extra-space . 0.0))
     (LyricText
      . (
        (molecule-callback . ,Text_item::brew_molecule)
-       (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
+       (X-offset-callbacks . (,Self_alignment_interface::centered_on_parent
+                              ,Self_alignment_interface::aligned_on_self))
        (self-alignment-X . 0)
        (word-space . 0.6)
        (ignore-length-mismatch . #f)
        (end-alignment . 2)
        (font-family . roman)
        (font-shape . upright)
+       
        ;; duh, side-position-interface?
        (meta . ((interfaces . (lyric-syllable-interface self-alignment-interface text-interface font-interface item-interface ))))
        ))
        (direction . 1)
        (breakable . #t)
        (font-family . roman)
+       (baseline-skip . 2)
        (break-visibility . ,end-of-line-invisible)
        (padding . 0.8)
        (meta . ((interfaces . (text-interface side-position-interface font-interface mark-interface self-alignment-interface item-interface ))))
        (Y-offset-callbacks . (,Side_position_interface::aligned_side))
        (molecule-callback . ,Text_item::brew_molecule)
        (font-shape . italic)
+       (padding . 0.4)
+       (font-relative-size . -2)
        (font-family . roman)
        (meta . ((interfaces . (text-interface self-alignment-interface side-position-interface font-interface item-interface ))))
        ))
     (PaperColumn
      . (
        (axes . (0))
+       (before-line-breaking-callback . ,Paper_column::before_line_breaking)
        (X-extent-callback . ,Axis_group_interface::group_extent_callback)
 
 ;              (molecule-callback . ,Paper_column::brew_molecule) (font-name . "cmr8") (Y-extent-callback . #f)
        (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))))
        ))
 
      . (
        (axes . (0))
        (X-extent-callback . ,Axis_group_interface::group_extent_callback)
-
+       (before-line-breaking-callback . ,Paper_column::before_line_breaking)
        ;; debugging stuff: print column number.
 ;      (molecule-callback . ,Paper_column::brew_molecule) (font-name . "cmr8") (Y-extent-callback . #f)
 
        (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))))
        ))
 
      . (
        (breakable . #t)
        (stem-spacing-correction . 0.4)
+       (knee-spacing-correction . 0.75)
        (meta . ((interfaces . (spacing-interface staff-spacing-interface item-interface ))))
        ))
     (NoteSpacing
      . (
        (stem-spacing-correction . 0.5)
+       (knee-spacing-correction . 0.75)
        (meta . ((interfaces . (spacing-interface note-spacing-interface item-interface ))))
        ))
 
      . (
        (molecule-callback . ,Staff_symbol::brew_molecule)
        (line-count . 5)
-       (ragged-right . #f)
        (layer . 0)
        (meta . ((interfaces . (staff-symbol-interface spanner-interface))))
        ))
      . (
        (axes . (1))
        (Y-extent-callback . ,Axis_group_interface::group_extent_callback)      
+       (Y-offset-callbacks . (,Side_position_interface::aligned_side))
+       
 
        (padding . 1.2)
        (minimum-space . 1.0)
        (before-line-breaking-callback . ,Stem::before_line_breaking)
        (molecule-callback . ,Stem::brew_molecule)
        (thickness . 1.3)
-       (beamed-lengths . (0.0 2.5 2.0 1.5))
-
-       ;; 
-       (beamed-minimum-lengths . (0.0 1.5 1.25 1.0))
-
-       ;;  Stems in unnatural (forced) direction should be shortened,
-       ;;  according to [Roush & Gourlay].  Their suggestion to knock off
-       ;;  a whole staffspace seems a bit drastical: we'll do half.
 
+       ;; 3.5 (or 3 measured from note head) is standar length
+       ;; 32nd, 64th flagged stems should be longer
        (lengths . (3.5 3.5 3.5 4.5 5.0))
+       
+       ;; Stems in unnatural (forced) direction should be shortened by
+       ;; one staff space, according to [Roush & Gourlay].
+       ;; Flagged stems we shorten only half a staff space.
        (stem-shorten . (1.0 0.5))
-                                       ; if stem is on middle line, choose this direction.
+
+       ;; default stem direction for note on middle line
        (neutral-direction . -1)
+       
+       ;; [Wanske]: standard length (but no shorter than minimum).
+       ;; (beamed-lengths . (3.5))
+       
+       ;; FIXME.  3.5 yields too long beams (according to Ross and
+       ;; looking at Baerenreiter examples) for a number of common
+       ;; boundary cases.  Subtracting half a beam thickness fixes
+       ;; this, but the bug may well be somewhere else.
+       (beamed-lengths . (3.26))
+
+       ;; [Wanske] lists three sets of minimum lengths.  One
+       ;; set for the nomal case, and one set for beams with `der
+       ;; Balkenendpunkt weiter "uber bzw. unter die Systemgrenze
+       ;; hinaus (bei Gruppen mit grossem Tonumfang)' and the extreme
+       ;; case.
+
+       ;; Note that Wanske lists numbers lengths starting from top of
+       ;; head, so we must add half a staff space.
+       
+       ;; We use the normal minima as minimum for the ideal lengths,
+       ;; and the extreme minima as abolute minimum length.
+       
+       ;; The 'normal' minima
+       (beamed-minimum-free-lengths . (2.5 2.0 1.5))
+       
+       ;; The 'far outside staff' minima, not used
+       ;(beamed-far-minimum-free-lengths . (1.83))
+       
+       ;; The 'extreme case' minima
+       (beamed-extreme-minimum-free-lengths . (1.83 1.5))
+
        (X-offset-callbacks . (,Stem::off_callback))
        (X-extent-callback . ,Stem::dim_callback)       
        (Y-extent-callback . ,Stem::height)
        (Y-extent-callback . ,Stem_tremolo::height)
        (X-extent-callback . #f)
 
-       (beam-width . 2.0) ; staff-space
+       (beam-width . 1.6) ; staff-space
        (beam-thickness . 0.48) ; staff-space
        (meta . ((interfaces . (stem-tremolo-interface item-interface ))))
        ))
     (SustainPedalLineSpanner 
      . (
        (axes . (1))
-       (Y-extent-callback . ,Axis_group_interface::group_extent_callback)      
+       (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
+       (Y-offset-callbacks . (,Side_position_interface::aligned_side))
        
        (padding . 1.2)
        (minimum-space . 1.0)
      . (
        (molecule-callback . ,Text_item::brew_molecule)
        (no-spacing-rods . #t)
+       (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
        (direction . -1)
        (padding . 0.5)
        (script-priority . 200)
        (molecule-callback . ,tablature-molecule-callback)
        (Y-offset-callbacks  . (,Staff_symbol_referencer::callback))
        (stem-attachment-function . ,tablature-stem-attachment-function)
-       (meta . ((interfaces . (rhythmic-head-interface font-interface note-head-interface staff-symbol-referencer-interface item-interface ))))
+       (meta . ((interfaces
+                 . (rhythmic-head-interface
+                    font-interface
+                    note-head-interface staff-symbol-referencer-interface
+                    text-interface item-interface ))))
        ))
 
 
      . (
        (axes . (1))
        (Y-extent-callback . ,Axis_group_interface::group_extent_callback)      
+       (Y-offset-callbacks . (,Side_position_interface::aligned_side))
+       
        (padding . 1.2)
        (minimum-space . 1.0)
        (direction . -1)
 (map (lambda (x)
                                        ; (display (car x)) (newline)
 
-       (set-object-property! (car x) 'translation-type? list?))
+       (set-object-property! (car x) 'translation-type? list?)
+       (set-object-property! (car x) 'is-grob? #t))
      all-grob-descriptions)