X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=scm%2Fdefine-grobs.scm;h=5e2dd4d86c14ea0572aadc11d7d5ae6a9e2f28b1;hb=6f664e0e318a1651f6fe9317a842bf9c7f476f08;hp=e2a2d7746741d7fc83d7f03ba36f887003ca56c1;hpb=a497efbce1531b035384a9eb22d963f759428c5f;p=lilypond.git diff --git a/scm/define-grobs.scm b/scm/define-grobs.scm index e2a2d77467..5e2dd4d86c 100644 --- a/scm/define-grobs.scm +++ b/scm/define-grobs.scm @@ -2,7 +2,7 @@ ;;;; ;;;; source file of the GNU LilyPond music typesetter ;;;; -;;;; (c) 1998--2006 Han-Wen Nienhuys +;;;; (c) 1998--2006 Han-Wen Nienhuys ;;;; Jan Nieuwenhuizen ;;;; distances are given in line-thickness (thicknesses) and @@ -51,10 +51,15 @@ accidental-suggestion-interface self-alignment-interface font-interface)))))) + (AccidentalPlacement . ( (left-padding . 0.2) + ;; for horizontally stacked scripts. + (script-priority . -100) + (direction . ,LEFT) + (positioning-done . ,ly:accidental-placement::calc-positioning-done) (X-extent . ,ly:axis-group-interface::width) @@ -63,6 +68,7 @@ (right-padding . 0.15) (meta . ((class . Item) (interfaces . (accidental-placement-interface)))))) + (Ambitus . ( (axes . (0 1)) @@ -130,6 +136,7 @@ (X-offset . ,ly:side-position-interface::x-aligned-side) (direction . ,LEFT) (padding . 0.5) + (script-priority . 0) (side-axis . ,X) (staff-position . 0.0) (meta . ((class . Item) @@ -138,6 +145,14 @@ side-position-interface font-interface)))))) + (BalloonTextItem + . ((stencil . ,ly:balloon-interface::print) + (text . ,(grob::calc-property-by-copy 'text)) + (X-offset . ,(grob::calc-property-by-copy 'X-offset)) + (Y-offset . ,(grob::calc-property-by-copy 'Y-offset)) + (meta . ((class . Item) + (interfaces . (text-interface + font-interface)))))) (BarLine . ( (break-align-symbol . staff-bar) @@ -194,6 +209,8 @@ (list ly:self-alignment-interface::x-aligned-on-self))))) (self-alignment-X . 1) + + ;; want the bar number before the clef at line start. (break-align-symbol . left-edge) (meta . ((class . Item) @@ -405,6 +422,7 @@ (stencil . ,ly:clef::print) (glyph-name . ,ly:clef::calc-glyph-name) (non-musical . #t) + (avoid-slur . inside) (font-family . music) (break-align-symbol . clef) (break-visibility . ,begin-of-line-visible) @@ -506,7 +524,7 @@ (Dots . ( (stencil . ,ly:dots::print) - (dot-count . 1) + (dot-count . ,dots::calc-dot-count) (meta . ((class . Item) (interfaces . (font-interface staff-symbol-referencer-interface @@ -628,7 +646,7 @@ (stencil . ,ly:text-interface::print) (direction . ,ly:script-interface::calc-direction) - + (text . ,fingering::calc-text) (font-encoding . fetaNumber) (font-size . -5) ; don't overlap when next to heads. (meta . ((class . Item) @@ -639,6 +657,14 @@ side-position-interface self-alignment-interface item-interface)))))) + (FretBoard + . ((stencil . ,fret-board::calc-stencil) + (finger-code . below-string) + (meta . ((class . Item) + (interfaces . (fret-diagram-interface + font-interface + )))) + )) (Glissando . ( (style . line) @@ -690,6 +716,7 @@ (stencil . ,ly:hairpin::print) (springs-and-rods . ,ly:spanner::set-spacing-rods) (after-line-breaking . ,ly:hairpin::after-line-breaking) + (grow-direction . ,hairpin::calc-grow-direction) (circled-tip . #f) (thickness . 1.0) (height . 0.6666) @@ -709,6 +736,8 @@ (thickness . 1.0) (stencil . ,ly:horizontal-bracket::print) (Y-offset . ,ly:side-position-interface::y-aligned-side) + (connect-to-neighbor . ,ly:tuplet-bracket::calc-connect-to-neighbors) + (padding . 0.2) (staff-padding . 0.2) (direction . ,DOWN) @@ -765,6 +794,7 @@ (KeySignature . ( (stencil . ,ly:key-signature-interface::print) + (avoid-slur . inside) (space-alist . ( (time-signature . (extra-space . 1.15)) (staff-bar . (extra-space . 1.1)) @@ -784,9 +814,10 @@ . ( (stencil . ,ly:tie::print) (control-points . ,ly:semi-tie::calc-control-points) - (direction . ,ly:semi-tie::calc-direction) + (direction . ,ly:tie::calc-direction) (details . ((ratio . 0.333) (height-limit . 1.0))) + (head-direction . ,LEFT) (thickness . 1.0) (meta . ((class . Item) (interfaces . (semi-tie-interface)) @@ -896,9 +927,11 @@ lyric-hyphen-interface spacing-interface)) )) )) + (LyricText . ( - (stencil . ,ly:text-interface::print) + (stencil . ,lyric-text::print) + (text . ,(grob::calc-property-by-copy 'text)) (X-offset . ,ly:self-alignment-interface::aligned-on-x-parent) (self-alignment-X . 0) (word-space . 0.6) @@ -1014,6 +1047,26 @@ font-interface text-interface)))))) + (NonMusicalPaperColumn + . ( + (allow-loose-spacing . #t) + (axes . (0)) + (before-line-breaking . ,ly:paper-column::before-line-breaking) + (X-extent . ,ly:axis-group-interface::width) + ;; (stencil . ,ly:paper-column::print) + + (non-musical . #t) + (line-break-permission . allow) + (page-break-permission . allow) + + ;; debugging stuff: print column number. + ;; (font-size . -6) (font-name . "sans") (Y-extent . #f) + + (meta . ((class . Paper_column) + (interfaces . (paper-column-interface + axis-group-interface + spaceable-grob-interface)))))) + (NoteCollision . ( (axes . (0 1)) @@ -1036,6 +1089,7 @@ (NoteHead . ( (stencil . ,ly:note-head::print) + (duration-log . ,note-head::calc-duration-log) (stem-attachment . ,ly:note-head::calc-stem-attachment) (glyph-name . ,note-head::calc-glyph-name) (Y-offset . ,ly:staff-symbol-referencer::callback) @@ -1113,6 +1167,7 @@ (PaperColumn . ( (axes . (0)) + (allow-loose-spacing . #t) (before-line-breaking . ,ly:paper-column::before-line-breaking) ;; (stencil . ,ly:paper-column::print) (X-extent . ,ly:axis-group-interface::width) @@ -1146,24 +1201,7 @@ (meta . ((class . Spanner) (interfaces . (slur-interface)))))) - (NonMusicalPaperColumn - . ( - (axes . (0)) - (before-line-breaking . ,ly:paper-column::before-line-breaking) - (X-extent . ,ly:axis-group-interface::width) - ;; (stencil . ,ly:paper-column::print) - - (non-musical . #t) - (line-break-permission . allow) - (page-break-permission . allow) - ;; debugging stuff: print column number. - ;; (font-size . -6) (font-name . "sans") (Y-extent . #f) - - (meta . ((class . Paper_column) - (interfaces . (paper-column-interface - axis-group-interface - spaceable-grob-interface)))))) (PercentRepeat . ( @@ -1239,7 +1277,6 @@ mark-interface self-alignment-interface)))))) - (RepeatSlash . ( (stencil . ,ly:percent-repeat-item-interface::beat-slash) @@ -1247,14 +1284,16 @@ (slope . 1.7) (meta . ((class . Item) (interfaces . (percent-repeat-interface)))))) + (RepeatTie . ( (stencil . ,ly:tie::print) (control-points . ,ly:semi-tie::calc-control-points) - (direction . ,ly:semi-tie::calc-direction) + (direction . ,ly:tie::calc-direction) (details . ((ratio . 0.333) (height-limit . 1.0))) (thickness . 1.0) + (head-direction . ,RIGHT) (meta . ((class . Item) (interfaces . (semi-tie-interface)) )) @@ -1264,7 +1303,9 @@ . ( (X-extent . #f) (Y-extent . #f) + (direction . ,ly:tie::calc-direction) (head-direction . ,RIGHT) + (positioning-done . ,ly:semi-tie-column::calc-positioning-done) (meta . ((class . Item) (interfaces . (semi-tie-column-interface)) @@ -1274,6 +1315,7 @@ (Rest . ( (stencil . ,ly:rest::print) + (duration-log . ,stem::calc-duration-log) (X-extent . ,ly:rest::width) (Y-extent . ,ly:rest::height) (Y-offset . ,ly:rest::y-offset-callback) @@ -1296,13 +1338,12 @@ . ( ;; don't set direction here: it breaks staccato. - ;; This value is sensitive: if too large, staccato dots will move a - ;; space a away. - (padding . 0.20) + ;; padding set in script definitions. (staff-padding . 0.25) ;; (script-priority . 0) priorities for scripts, see script.scm - (X-offset . , ly:self-alignment-interface::centered-on-x-parent) - + (X-offset . ,ly:self-alignment-interface::centered-on-x-parent) + (Y-offset . ,ly:side-position-interface::y-aligned-side) + (side-axis . ,Y) (stencil . ,ly:script-interface::print) (direction . ,ly:script-interface::calc-direction) @@ -1317,11 +1358,17 @@ (before-line-breaking . ,ly:script-column::before-line-breaking) (meta . ((class . Item) (interfaces . (script-column-interface)))))) + (ScriptRow + . ( + (before-line-breaking . ,ly:script-column::row-before-line-breaking) + (meta . ((class . Item) + (interfaces . (script-column-interface)))))) (SeparationItem . ( - (X-extent . #f) - (Y-extent . #f) + (avoid-slur . inside) + (X-extent . ,ly:axis-group-interface::width) + (Y-extent . ,ly:axis-group-interface::height) (meta . ((class . Item) (interfaces . (spacing-interface separation-item-interface)))))) @@ -1362,6 +1409,7 @@ (meta . ((class . Item) (interfaces . (text-interface self-alignment-interface + piano-pedal-script-interface font-interface)))))) (SostenutoPedalLineSpanner @@ -1455,8 +1503,10 @@ (Stem . ( (direction . ,ly:stem::calc-direction) + (duration-log . ,stem::calc-duration-log) (default-direction . ,ly:stem::calc-default-direction) (stem-end-position . ,ly:stem::calc-stem-end-position) + (neutral-direction . ,DOWN) (stem-info . ,ly:stem::calc-stem-info) (positioning-done . ,ly:stem::calc-positioning-done) @@ -1517,6 +1567,7 @@ (StringNumber . ( (stencil . ,print-circled-text-callback) + (text . ,string-number::calc-text) (padding . 0.5) (staff-padding . 0.5) (self-alignment-X . 0) @@ -1533,6 +1584,28 @@ self-alignment-interface item-interface)))))) + (StrokeFinger + . ( + (stencil . ,ly:text-interface::print) + (text . ,stroke-finger::calc-text) + (digit-names . #("p" "i" "m" "a" "x")) + (padding . 0.5) + (staff-padding . 0.5) + (self-alignment-X . 0) + (self-alignment-Y . 0) + (script-priority . 100) + (font-shape . italic) + (font-size . -4) ; don't overlap when next to heads. + (meta . ((class . Item) + (interfaces . (stroke-finger-interface + font-interface + text-script-interface + text-interface + side-position-interface + self-alignment-interface + item-interface)))))) + + (SustainPedal . ( (no-spacing-rods . #t) @@ -1547,6 +1620,7 @@ line-spanner-interface text-interface self-alignment-interface + piano-pedal-script-interface font-interface)))))) (SustainPedalLineSpanner @@ -1569,6 +1643,7 @@ (axes . (0 1)) (X-extent . ,ly:axis-group-interface::width) (Y-extent . ,ly:axis-group-interface::height) + (skyline-spacing . #t) (meta . ((class . System) (interfaces . (system-interface axis-group-interface)))))) @@ -1651,6 +1726,8 @@ . ( (no-spacing-rods . #t) (X-offset . ,ly:self-alignment-interface::x-aligned-on-self) + (Y-offset . ,ly:side-position-interface::y-aligned-side) + (side-axis . ,Y) (direction . ,DOWN) ;; sync with Fingering ? @@ -1734,6 +1811,7 @@ (stencil . ,ly:time-signature::print) (break-align-symbol . time-signature) (break-visibility . ,all-visible) + (avoid-slur . inside) (space-alist . ( (first-note . (fixed-space . 2.0)) (right-edge . (extra-space . 0.5)) @@ -1771,6 +1849,7 @@ (stencil . ,ly:accidental-interface::print) (meta . ((class . Item) (interfaces . (item-interface + trill-pitch-accidental-interface side-position-interface font-interface)))))) @@ -1843,6 +1922,7 @@ (X-offset . ,ly:self-alignment-interface::x-aligned-on-self) (meta . ((class . Item) (interfaces . (text-interface + piano-pedal-script-interface self-alignment-interface font-interface)))))) @@ -1878,6 +1958,7 @@ (Y-extent . ,ly:axis-group-interface::height) (X-extent . ,ly:axis-group-interface::width) (stacking-dir . -1) + (padding . 0.1) (meta . ((class . Spanner) (interfaces . (align-interface axis-group-interface)))))) @@ -1885,9 +1966,9 @@ . ( (axes . (1)) (Y-offset . ,ly:hara-kiri-group-spanner::force-hara-kiri-callback) - (Y-extent . ,ly:hara-kiri-group-spanner::y-extent) (X-extent . ,ly:axis-group-interface::width) + (skyline-spacing . #t) (meta . ((class . Spanner) (interfaces . (axis-group-interface hara-kiri-group-interface @@ -1980,71 +2061,59 @@ (set! all-grob-descriptions (sort all-grob-descriptions alist