From be83f044fb3dad53417d9183a25af6ce642ef1b5 Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Fri, 5 Aug 2005 14:04:53 +0000 Subject: [PATCH] * 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 | 2 + Documentation/topdocs/NEWS.tely | 13 ++-- input/GNUmakefile | 2 +- input/proportional.ly | 108 ++++++++++++++++++++++++++++++++ lily/tuplet-bracket.cc | 3 +- 5 files changed, 120 insertions(+), 8 deletions(-) create mode 100644 input/proportional.ly diff --git a/ChangeLog b/ChangeLog index 316d4e9cf7..9a57689074 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2005-08-05 Han-Wen Nienhuys + * input/proportional.ly: new file. + * lily/tuplet-bracket.cc (after_line_breaking): don't suicide if columns is empty diff --git a/Documentation/topdocs/NEWS.tely b/Documentation/topdocs/NEWS.tely index cbf415a36b..d0462eaf2f 100644 --- a/Documentation/topdocs/NEWS.tely +++ b/Documentation/topdocs/NEWS.tely @@ -43,6 +43,7 @@ Tuplets can be made to reach the next non-tuplet note by setting the allowBeamBreak = ##t } { + \set Score.proportionalNotationDuration = #(ly:make-moment 1 32) \set tupletFullLength = ##t \times 2/3 { c8[ c c] } c4 @@ -55,7 +56,7 @@ This feature was sponsored by Trevor Baca. When @code{strict-note-spacing} is set, note are spaced without regard for clefs, bar lines and grace notes. For example, -@lilypond[fragment,verbatim,relative=2] +@lilypond[fragment,relative=2] \override Score.SpacingSpanner #'strict-note-spacing = ##t \new Staff { c8[ c \clef alto c \grace { c16[ c] } c8 c c] c32[ c32] } @end lilypond @@ -65,7 +66,7 @@ This feature was sponsored by Trevor Baca. @item Beams support the @code{break-overshoot} property, for example -@lilypond[relative=2,fragment,verbatim] +@lilypond[relative=2,fragment] \set allowBeamBreak = ##t \override Beam #'break-overshoot = #'(1.0 . 2.0) c2.. c8[ \break c] @@ -78,7 +79,7 @@ Proportional notation is supported. Notes can be spaced proportional to their time-difference, by assigning a duration. to @code{proportionalNotationDuration}. For example, -@lilypond[verbatim,relative=2,fragment,raggedright] +@lilypond[relative=2,fragment,raggedright] << \set Score.proportionalNotationDuration = #(ly:make-moment 1 16) \new Staff { c8[ c c c c c] c4 c2 r2 } @@ -94,7 +95,7 @@ symbol sizes (e.g. accidentals) if @code{uniform-stretching} of the @code{SpacingSpanner} grob is set, -@lilypond[verbatim,relative=2,fragment] +@lilypond[relative=2,fragment] << \override Score.SpacingSpanner #'uniform-stretching = ##t \new Staff { c16[ c c c c c c c c c16] } @@ -110,7 +111,7 @@ This feature was sponsored by Trevor Baca. @item Tuplet brackets get arrows when they are broken across a line. -@lilypond[fragment,raggedright,verbatim,relative=2] +@lilypond[fragment,raggedright,relative=2] \times 4/5 { c c c \bar "empty" \break c c } @@ -137,7 +138,7 @@ These glyphs have been sponsored by Trevor Baca. @item Nested tuplets are automatically positioned, -@lilypond[fragment,raggedright,verbatim,relative=2] +@lilypond[fragment,raggedright,relative=2] \set tupletNumberFormatFunction = #fraction-tuplet-formatter \times 4/6 { a4 a diff --git a/input/GNUmakefile b/input/GNUmakefile index ded7e396b2..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 new file mode 100644 index 0000000000..3ae12a81d9 --- /dev/null +++ b/input/proportional.ly @@ -0,0 +1,108 @@ +\header +{ + title = "Proportional notation" +} + + +%% 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 = #begin-of-line-visible + \override Beam #'break-overshoot = #'(-0.5 . 1.0) + + } +} + +staffKind = "RhythmicStaff" + +%staffKind = "Staff" + +\relative c'' +\new StaffGroup << + \new \staffKind << + { + \skip 2 + \skip 2 + \break \time 4/8 + + \skip 1 \break \time 4/8 + } + + { + \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[ 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 } + } + } + >> + \new \staffKind { + \times 9/5 { + r8. c16[ c c c c c + c + } + \times 4/7 { + c16 c c c ] + \times 5/4 { + c16[ c32 c32] + r4 + c32[ c c16 + } + } + c16 c16 c8] r8 r4 + \times 10/12 { + \times 7/9 { + r8.[ c32 c16 c r8 c16 c16 + } + c16 c32 c32] + r4 r16 + } + } +>> + + + + diff --git a/lily/tuplet-bracket.cc b/lily/tuplet-bracket.cc index 194044cf00..a70c46ef6d 100644 --- a/lily/tuplet-bracket.cc +++ b/lily/tuplet-bracket.cc @@ -175,9 +175,10 @@ Tuplet_bracket::print (SCM smob) { x_span[d] = robust_relative_extent (bounds[d], commonx, X_AXIS)[d]; Direction break_dir = bounds[d]->break_status_dir (); + Spanner *orig_spanner = dynamic_cast (me->original_); connect_to_other[d] = (break_dir - && (me->get_break_index() - break_dir < me->broken_intos_.size())); + && (me->get_break_index() - break_dir < orig_spanner->broken_intos_.size())); if (connect_to_other[d]) { -- 2.39.2