diff options
author | Phil Holmes <mail@philholmes.net> | 2016-03-16 12:46:31 +0000 |
---|---|---|
committer | Phil Holmes <mail@philholmes.net> | 2016-03-16 13:35:31 +0000 |
commit | 46821fda434ae17eccc778bd1a0276e785fffdf6 (patch) | |
tree | b818b62f0bf2796c1a8d6fac83b653e163eca19b | |
parent | 87eb2f9fe1be3a532675fe4b7322bbba5a60ba5c (diff) |
LSR import
10 files changed, 30 insertions, 105 deletions
diff --git a/Documentation/snippets/center-text-below-hairpin-dynamics.ly b/Documentation/snippets/center-text-below-hairpin-dynamics.ly index 1791b38b79..40810e6a19 100644 --- a/Documentation/snippets/center-text-below-hairpin-dynamics.ly +++ b/Documentation/snippets/center-text-below-hairpin-dynamics.ly @@ -41,10 +41,8 @@ hairpinWithCenteredText = (ly:grob-layout grob) 'staff-space)) (staff-line-thickness (ly:output-def-lookup (ly:grob-layout grob) 'line-thickness)) - (grob-name (lambda (x) (assq-ref - (ly:grob-property x 'meta) 'name))) (par-x (ly:grob-parent grob X)) - (dyn-text (eq? (grob-name par-x) 'DynamicText )) + (dyn-text (grob::has-interface par-x 'dynamic-text-interface)) (dyn-text-stencil-x-length (if dyn-text (interval-length diff --git a/Documentation/snippets/centering-markup-on-note-heads-automatically.ly b/Documentation/snippets/centering-markup-on-note-heads-automatically.ly deleted file mode 100644 index 6b48240774..0000000000 --- a/Documentation/snippets/centering-markup-on-note-heads-automatically.ly +++ /dev/null @@ -1,67 +0,0 @@ -%% DO NOT EDIT this file manually; it is automatically -%% generated from LSR http://lsr.di.unimi.it -%% Make any changes in LSR itself, or in Documentation/snippets/new/ , -%% and then run scripts/auxiliar/makelsr.py -%% -%% This file is in the public domain. -\version "2.18.0" - -\header { - lsrtags = "contexts-and-engravers, text, tweaks-and-overrides" - - texidoc = " -For technical reasons, text scripts attached to note heads cannot -easily be centered on a note head's width, unlike articulations. - -Instead of using trial-and-error offset tweaks, this snippet uses a -Scheme engraver to reset the horizontal parent of each markup to a -@code{NoteColumn}. This also allows text to follow note heads which -have been shifted via @code{force-hshift}. - - - -" - doctitle = "Centering markup on note heads automatically" -} % begin verbatim - -#(define (Text_align_engraver ctx) - (let ((scripts '()) - (note-column #f)) - (make-engraver - (acknowledgers - ((note-column-interface trans grob source) - ;; cache NoteColumn in this Voice context - (set! note-column grob)) - ((text-script-interface trans grob source) - ;; whenever a TextScript is acknowledged, - ;; add it to `scripts' list - (set! scripts (cons grob scripts)))) - ((stop-translation-timestep trans) - ;; if any TextScript grobs exist, - ;; set NoteColumn as X-parent - (for-each (lambda (script) - (set! (ly:grob-parent script X) note-column)) - scripts) - ;; clear scripts ready for next timestep - (set! scripts '()))))) - -\layout { - \context { - \Voice - \consists #Text_align_engraver - \override TextScript.X-offset = - #ly:self-alignment-interface::aligned-on-x-parent - \override TextScript.self-alignment-X = #CENTER - } -} - -\new Staff << - \relative c'' { - \override NoteColumn.force-hshift = #3 - c1-\markup { \arrow-head #Y #DOWN ##t } - } - \\ - \relative c' { - a4 a-\markup { \huge ^ } a a - } ->> diff --git a/Documentation/snippets/contexts-and-engravers.snippet-list b/Documentation/snippets/contexts-and-engravers.snippet-list index 66b3139c7a..3b3c016eb3 100644 --- a/Documentation/snippets/contexts-and-engravers.snippet-list +++ b/Documentation/snippets/contexts-and-engravers.snippet-list @@ -3,7 +3,6 @@ adding-an-extra-staff-at-a-line-break.ly adding-an-extra-staff.ly automatically-changing-the-stem-direction-of-the-middle-note-based-on-the-melody.ly centered-measure-numbers.ly -centering-markup-on-note-heads-automatically.ly changing-midi-output-to-one-channel-per-voice.ly changing-time-signatures-inside-a-polymetric-section-using--scaledurations.ly chant-or-psalms-notation.ly diff --git a/Documentation/snippets/displaying-complex-chords.ly b/Documentation/snippets/displaying-complex-chords.ly index a433eb96d0..b90be17083 100644 --- a/Documentation/snippets/displaying-complex-chords.ly +++ b/Documentation/snippets/displaying-complex-chords.ly @@ -30,6 +30,7 @@ fixB = { \once \override Accidental.extra-offset = #'(4 . -.1) } + \relative c' { << { \fixA <b d!>8 } \\ { \voiceThree \fixB dis } >> s } diff --git a/Documentation/snippets/displaying-grob-ancestry.ly b/Documentation/snippets/displaying-grob-ancestry.ly index 7a75bb1a33..47077461d9 100644 --- a/Documentation/snippets/displaying-grob-ancestry.ly +++ b/Documentation/snippets/displaying-grob-ancestry.ly @@ -11,19 +11,23 @@ texidoc = " When working with grob callbacks, it can be helpful to understand a -grob's @qq{ancestry}. Most grobs have @qq{parents} which influence the +grob’s ancestry. Most grobs have parents which influence the positioning of the grob. X- and Y-parents influence the horizontal and vertical positions for the grob, respectively. Additionally, each parent may have parents of its own. -Unfortunately, there are several aspects of a grob's ancestry that can +Unfortunately, there are several aspects of a grob’s ancestry that can lead to confusion: -* The types of parents a grob has may depend on context. * For some -grobs, the X- and Y-parents are the same. * A particular @qq{ancestor} -may be related to a grob in multiple ways. * The concept of -@qq{generations} is misleading. + +* The types of parents a grob has may depend on context. + +* For some grobs, the X- and Y-parents are the same. + +* A particular “ancestor” may be related to a grob in multiple ways. + +* The concept of “generations” is misleading. For example, the @code{System} grob can be both parent (on the Y-side) @@ -31,35 +35,27 @@ and grandparent (twice on the X-side) to a @code{VerticalAlignment} grob. -This macro prints (to the console) a textual representation of a grob's +This macro prints (to the console) a textual representation of a grob’s ancestry. +When called this way: -When called this way - - -@{ - \\once \\override NoteHead #'before-line-breaking = #display-ancestry - c @} - +@code{@{ \\once \\override NoteHead.before-line-breaking = +#display-ancestry c @}} The following output is generated: ------------------------------------- - -NoteHead X,Y: NoteColumn - X: PaperColumn - X,Y: System - Y: VerticalAxisGroup - X: NonMusicalPaperColumn - X,Y: System - Y: VerticalAlignment - X: NonMusicalPaperColumn - X,Y: System - Y: System - - +@code{NoteHead X,Y: NoteColumn + X: PaperColumn + X,Y: System + Y: VerticalAxisGroup + X: NonMusicalPaperColumn + X,Y: System + Y: VerticalAlignment + X: NonMusicalPaperColumn + X,Y: System + Y: System} " doctitle = "Displaying grob ancestry" diff --git a/Documentation/snippets/pitches-headword.ly b/Documentation/snippets/pitches-headword.ly index b2f27eddc9..16859e9431 100644 --- a/Documentation/snippets/pitches-headword.ly +++ b/Documentation/snippets/pitches-headword.ly @@ -75,7 +75,7 @@ Piches headword <bs' fs'>2 e'2 | - <b'! a'>2 -\tweak #'style #'none \cresc + <b'! a'>2 -\tweak style #'none \cresc b'4 <e'' cs''>4 | diff --git a/Documentation/snippets/score-for-diatonic-accordion.ly b/Documentation/snippets/score-for-diatonic-accordion.ly index 9419a6893e..fddf7c230b 100644 --- a/Documentation/snippets/score-for-diatonic-accordion.ly +++ b/Documentation/snippets/score-for-diatonic-accordion.ly @@ -81,7 +81,7 @@ staffTabLine = \new Staff \with { \key c \major \relative c'' { - % disable the following line to see the noteheads while writing the song + % disable the following line to see the the noteheads while writing the song \NoNoteHead \override NoteHead.no-ledgers = ##t diff --git a/Documentation/snippets/text.snippet-list b/Documentation/snippets/text.snippet-list index 380f092674..e87e87ed25 100644 --- a/Documentation/snippets/text.snippet-list +++ b/Documentation/snippets/text.snippet-list @@ -6,7 +6,6 @@ aligning-objects-created-with-the--mark-command.ly aligning-syllables-with-melisma.ly blanking-staff-lines-using-the--whiteout-command.ly center-text-below-hairpin-dynamics.ly -centering-markup-on-note-heads-automatically.ly changing-ottava-text.ly changing-the-default-text-font-family.ly combining-dynamics-with-markup-texts.ly diff --git a/Documentation/snippets/tweaks-and-overrides.snippet-list b/Documentation/snippets/tweaks-and-overrides.snippet-list index 71a02386c7..ed848f2c0a 100644 --- a/Documentation/snippets/tweaks-and-overrides.snippet-list +++ b/Documentation/snippets/tweaks-and-overrides.snippet-list @@ -10,7 +10,6 @@ analysis-brackets-above-the-staff.ly asymmetric-slurs.ly avoiding-collisions-with-chord-fingerings.ly caesura-railtracks-with-fermata.ly -centering-markup-on-note-heads-automatically.ly changing-a-single-notes-size-in-a-chord.ly changing-beam-thickness-and-spacing.ly changing-form-of-multi-measure-rests.ly diff --git a/Documentation/snippets/using-tags-to-produce-mensural-and-modern-music-from-the-same-source.ly b/Documentation/snippets/using-tags-to-produce-mensural-and-modern-music-from-the-same-source.ly index 199db158e1..086b1b6d98 100644 --- a/Documentation/snippets/using-tags-to-produce-mensural-and-modern-music-from-the-same-source.ly +++ b/Documentation/snippets/using-tags-to-produce-mensural-and-modern-music-from-the-same-source.ly @@ -34,8 +34,8 @@ menrest = #(define-music-function (note) MensStyle = { \autoBeamOff - \override NoteHead #'style = #'petrucci - \override Score.BarNumber #'transparent = ##t + \override NoteHead.style = #'petrucci + \override Score.BarNumber.transparent = ##t \override Stem.neutral-direction = #up } |