From 630fbf3393d88e644e26b1ff70e0514de5fdee56 Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Fri, 5 Aug 2005 20:16:55 +0000 Subject: [PATCH] * input/proportional.ly (staffKind): bugfix. (staffKind): updates by Trevor Baca. * scm/define-grobs.scm (all-grob-descriptions): remove arrows as default layout. * lily/tuplet-bracket.cc (print): check whether edge-text is a pair. * Documentation/topdocs/NEWS.tely (Top): add Nicolas as contributor. * input/proportional.ly: new file. * lily/tuplet-bracket.cc (after_line_breaking): don't suicide if columns is empty * lily/tuplet-bracket.cc (print): on the left, the overshoot is relative to the right edge of the prefatory matter. --- ChangeLog | 9 ++ Documentation/topdocs/NEWS.tely | 7 +- VERSION | 2 +- input/GNUmakefile | 2 +- input/proportional.ly | 222 +++++++++++++++----------------- lily/tuplet-bracket.cc | 21 +-- scm/define-grobs.scm | 2 - 7 files changed, 133 insertions(+), 132 deletions(-) diff --git a/ChangeLog b/ChangeLog index 98e0fdfd35..5b3850a16e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,14 @@ 2005-08-05 Han-Wen Nienhuys + * input/proportional.ly (staffKind): bugfix. + (staffKind): updates by Trevor Baca. + + * scm/define-grobs.scm (all-grob-descriptions): remove arrows as + default layout. + + * lily/tuplet-bracket.cc (print): check whether edge-text is a + pair. + * lily/beam.cc (rest_collision_callback): call position_beam() if necessary. diff --git a/Documentation/topdocs/NEWS.tely b/Documentation/topdocs/NEWS.tely index ddf086ba70..cd34afd026 100644 --- a/Documentation/topdocs/NEWS.tely +++ b/Documentation/topdocs/NEWS.tely @@ -108,9 +108,14 @@ Symbol sizes (e.g. accidentals) are disregarded for spacing if if This feature was sponsored by Trevor Baca. @item -Tuplet brackets get arrows when they are broken across a line. +Endings of broken tuplet brackets can be tuned. For example, you can +add arrows to the brackets, @lilypond[fragment,raggedright,relative=2] +\override TupletBracket + #'edge-text = #(cons + (markup #:arrow-head X LEFT #f) + (markup #:arrow-head X RIGHT #f)) \times 4/5 { c c c \bar "empty" \break c c } diff --git a/VERSION b/VERSION index 13c3642ed1..b3748db4b0 100644 --- a/VERSION +++ b/VERSION @@ -1,6 +1,6 @@ PACKAGE_NAME=LilyPond MAJOR_VERSION=2 MINOR_VERSION=7 -PATCH_LEVEL=4 +PATCH_LEVEL=5 MY_PATCH_LEVEL= diff --git a/input/GNUmakefile b/input/GNUmakefile index a05252c698..3de1c77c97 100644 --- a/input/GNUmakefile +++ b/input/GNUmakefile @@ -2,7 +2,7 @@ depth = .. SUBDIRS = test regression tutorial no-notation mutopia -examples = typography-demo les-nereides puer-fragment wilhelmus sakura-sakura +examples = typography-demo les-nereides puer-fragment wilhelmus sakura-sakura proportional #xiao-haizi-guai-guai LOCALSTEPMAKE_TEMPLATES=ly mutopia diff --git a/input/proportional.ly b/input/proportional.ly index 2415f25a1b..ab2a20cc0e 100644 --- a/input/proportional.ly +++ b/input/proportional.ly @@ -1,36 +1,37 @@ +\version "2.7.4" + \header { title = "Proportional notation" + copyright = "© 2005 Trevor Bača" } -\version "2.7.4" - -%% RhythmicStaff broken with 32nd rests ? - \layout { - indent = #0.0 - \context { - \Voice - \remove "Forbid_line_break_engraver" - tupletNumberFormatFunction = #fraction-tuplet-formatter - tupletFullLength = ##t - allowBeamBreak = ##t - } - \context { - \Score - \override SpacingSpanner #'uniform-stretching = ##t - \override SpacingSpanner #'strict-note-spacing = ##t - proportionalNotationDuration = #(ly:make-moment 1 64) - \override TimeSignature #'break-visibility = #end-of-line-invisible - \override Beam #'break-overshoot = #'(-0.5 . 1.0) - } - \context { - - % we want over print if necessary. - \RhythmicStaff - \remove "Separating_line_group_engraver" - } + indent = #0.0 + \context { + \Voice + \remove "Forbid_line_break_engraver" + tupletNumberFormatFunction = #fraction-tuplet-formatter + tupletFullLength = ##t + allowBeamBreak = ##t + } + \context { + \Score + \override TupletBracket #'edge-text = #(cons + (markup #:arrow-head X LEFT #f) + (markup #:arrow-head X RIGHT #f)) + \override SpacingSpanner #'uniform-stretching = ##t + \override SpacingSpanner #'strict-note-spacing = ##t + proportionalNotationDuration = #(ly:make-moment 1 64) + \override TimeSignature #'break-visibility = #end-of-line-invisible + \override Beam #'break-overshoot = #'(-0.5 . 1.0) + } + \context { + % we want over print if necessary. + \RhythmicStaff + \remove "Separating_line_group_engraver" + } } staffKind = "RhythmicStaff" @@ -39,102 +40,87 @@ staffKind = "RhythmicStaff" \relative c'' \new StaffGroup << - \new \staffKind \new Voice << - { - \skip 2 - \skip 2 - \break \time 4/8 - - \skip 1 \break \time 4/8 - \skip 2 \time 1/8 - } - - { - \time 4/8 + \new \staffKind << + { + \skip 2 + \skip 2 + \break \time 4/8 + \skip 1 \break \time 4/8 + \skip 1 \break \time 4/8 + } - \times 7/9 { - \times 4/6 { - r8 r32[ c c c c c c c] r4 - r32[ c32 c16 } - \times 5/4 { - c16 c c] r32[ c32 c16 c] r8 } - } - \times 10/12 { - \times 7/6 { - r32[ c16. c32 c16.] r4 - r16[ c16 c16. c32 - } - \times 5/8 { - c16 c16 c16. c32] r8 c8[ c8] r4. + { + \time 4/8 + + \times 7/9 { + \times 4/6 { + r8 c32[ c c c c c c c] r4 + c32[ c32 c16 } + \times 5/4 { + c16 c c] c32[ c32 c16 c] r8 } } - } - %{ - \times 10/12 { - \times 7/6 { - r32[ c32. c16 c16.] r4 - r16[ c16 c16. c32 - } - \times 5/8 { - c16 c c16. c32] r8 c8[ c] r4 - } - } - %} - \times 4/7 { - r8 - r16[ c16 - \times 5/4 { - c16 r16 c8 c c - } - } - - \times 3/4 { - c8] - r16[ c - \times 2/3 { - c16 r16] - r4 } +\times 10/12 { + \times 7/6 { + c32[ c32 c8 c16] r4 + c16[ c16 c16. c32 } - } - >> - \new \staffKind \new Voice - << - { - \times 9/5 { - r8. c16[ c c - \grace { - \stemDown - c32[ c32] - \stemNeutral - } - c16 c c - c + \times 5/8 { + c16 c16 c16. c32] r8 c8[ c8] r4. } - \times 4/7 { - c16 c c c ] - \times 5/4 { - c16[ c32 c32] - r4 - c32[ c c16 - } - } - \times 10/12 { - \times 7/10 { - c16 c16 c8] r8 r4 - r8.[ c32 c16 c r8 c16 c16 - } - c16 c32 c32] - r4. - r16.[ - c32 - } - c16 r16] +} - } - { \skip 2 * 6 } % filler space. - >> ->> + \times 4/7 { + r8 + c16[ c16 + \times 5/4 { + c16 r16 c8 c c + } + } + + \times 3/4 { + c8] + c16[ c + \times 2/3 { + c16 c16] + r4 } + } + } + >> + \new \staffKind + << + { + \times 9/5 { + r8. c16[ c c + \grace { + \stemDown + c32[ c32] + \stemNeutral + } + c16 c c + c + } + \times 4/7 { + c16 c c c ] + \times 5/4 { + c16[ c32 c32] + r4 + c32[ c c16 + } + } + \times 10/12 { + \times 7/10 { + c16 c16 c8] r4 c4 + c16[ c8 c16 c16 r8 c16 + } + c16 c32 c32] + r4. + c16.[ + c32 + } + c16 c16] - - - + } + { \skip 2 * 6 } % filler space. + >> +>> diff --git a/lily/tuplet-bracket.cc b/lily/tuplet-bracket.cc index 41044b1c22..28d9c3158e 100644 --- a/lily/tuplet-bracket.cc +++ b/lily/tuplet-bracket.cc @@ -261,19 +261,22 @@ Tuplet_bracket::print (SCM smob) height[d] = 0.0; flare[d] = 0.0; shorten[d] = 0.0; - - SCM properties = Font_interface::text_font_alist_chain (me); + SCM edge_text = me->get_property ("edge-text"); - SCM text = index_get_cell (edge_text, d); - if (Text_interface::is_markup (text)) + if (scm_is_pair (edge_text)) { - SCM t = Text_interface::interpret_markup (pap->self_scm (), properties, - text); + SCM properties = Font_interface::text_font_alist_chain (me); + SCM text = index_get_cell (edge_text, d); + if (Text_interface::is_markup (text)) + { + SCM t = Text_interface::interpret_markup (pap->self_scm (), properties, + text); - Stencil *edge_text = unsmob_stencil (t); - edge_text->translate_axis (x_span[d] - x_span[LEFT], X_AXIS); - edge_stencils[d] = *edge_text; + Stencil *edge_text = unsmob_stencil (t); + edge_text->translate_axis (x_span[d] - x_span[LEFT], X_AXIS); + edge_stencils[d] = *edge_text; + } } } } diff --git a/scm/define-grobs.scm b/scm/define-grobs.scm index 8ab7c2c0f2..5878e70354 100644 --- a/scm/define-grobs.scm +++ b/scm/define-grobs.scm @@ -1485,8 +1485,6 @@ (thickness . 1.6) (edge-height . (0.7 . 0.7)) (shorten-pair . (-0.2 . -0.2)) - (edge-text . ,(cons (markup #:arrow-head 0 -1 #f) - (markup #:arrow-head 0 1 #f))) (before-line-breaking-callback . ,Tuplet_bracket::before_line_breaking) (after-line-breaking-callback . ,Tuplet_bracket::after_line_breaking) (print-function . ,Tuplet_bracket::print) -- 2.39.2