From: Han-Wen Nienhuys Date: Wed, 24 Mar 2004 15:42:24 +0000 (+0000) Subject: (all-grob-descriptions): remove gap from X-Git-Tag: release/2.1.35~16 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=e5bf0902bb311efd05f39ce2a11776867631c0db;p=lilypond.git (all-grob-descriptions): remove gap from tuplet-bracket --- diff --git a/Documentation/user/notation.itely b/Documentation/user/notation.itely index a01a7c3d1f..23c3e4370f 100644 --- a/Documentation/user/notation.itely +++ b/Documentation/user/notation.itely @@ -1482,9 +1482,6 @@ shortest note they contain. For a beam ending rule that only applies to beams with 32nd notes (and no shorter notes), use @code{(end 1 32 * *)}. -If a score ends while an automatic beam has not been ended and is still -accepting notes, this last beam will not be typeset at all. - @cindex automatic beam generation @cindex autobeam @cindex @code{autoBeaming} @@ -1504,6 +1501,12 @@ beaming should be switched off. This is done by setting @refbugs +If a score ends while an automatic beam has not been ended and is +still accepting notes, this last beam will not be typeset at all. The +same holds polyphonic voices, entered with @code{<< @dots{} \\ @dots{} +>>}. If a polyphonic voice ends while an automatic beam is still +accepting notes, it is not typeset. + The rules for ending a beam depend on the shortest note in a beam. So, while it is possible to have different ending rules for eight beams and sixteenth beams, a beam that contains both eight and diff --git a/input/regression/cluster-cross-staff.ly b/input/regression/cluster-cross-staff.ly new file mode 100644 index 0000000000..f21bf39331 --- /dev/null +++ b/input/regression/cluster-cross-staff.ly @@ -0,0 +1,24 @@ +\header { + + texidoc = "Clusters can be written across staves." + +} + +\version "2.1.34" + +\score { +\notes \new PianoStaff << + \context Staff = up { + s1 *2 + } + \context Staff = down << + \apply #notes-to-clusters \relative c { 4 \change Staff = up + } + + { \clef bass s1 * 2 } + >> +>> + \paper { + raggedright= ##t + } +} diff --git a/lily/cluster.cc b/lily/cluster.cc index a95467e0b0..4900b73dc2 100644 --- a/lily/cluster.cc +++ b/lily/cluster.cc @@ -141,7 +141,7 @@ Cluster::print (SCM smob) Item *left_bound = spanner->get_bound (LEFT); Item *right_bound = spanner->get_bound (RIGHT); - Grob *common = left_bound->common_refpoint (right_bound, X_AXIS); + Grob *commonx = left_bound->common_refpoint (right_bound, X_AXIS); SCM cols =me->get_property ("columns"); if (!gh_pair_p (cols)) @@ -151,14 +151,14 @@ Cluster::print (SCM smob) return SCM_EOL; } - common = common_refpoint_of_list (cols, common, X_AXIS); + + commonx = common_refpoint_of_list (cols, commonx, X_AXIS); + Grob * commony = common_refpoint_of_list (cols, me, Y_AXIS); Array bottom_points; Array top_points; - Real left_coord = left_bound->relative_coordinate (common, X_AXIS); - - Real unit = Staff_symbol_referencer::staff_space (me) *0.5; + Real left_coord = left_bound->relative_coordinate (commonx, X_AXIS); /* TODO: should we move the cluster a little to the right to be in @@ -168,17 +168,11 @@ Cluster::print (SCM smob) for (SCM s = cols; gh_pair_p (s); s = ly_cdr (s)) { Grob * col = unsmob_grob (ly_car (s)); + Interval yext = col->extent (commony, Y_AXIS); - SCM posns = col->get_property ("positions"); - - Slice s (0,0); - if (is_number_pair (posns)) - s = Slice (gh_scm2int (gh_car (posns)), - gh_scm2int (gh_cdr (posns))); - - Real x = col->relative_coordinate (common, X_AXIS) - left_coord; - bottom_points.push (Offset (x, s[DOWN] *unit)); - top_points.push (Offset (x, s[UP] * unit)); + Real x = col->relative_coordinate (commonx, X_AXIS) - left_coord; + bottom_points.push (Offset (x, yext[DOWN])); + top_points.push (Offset (x, yext[UP])); } /* @@ -194,18 +188,14 @@ Cluster::print (SCM smob) SCM cols = next->get_property ("columns"); if (gh_pair_p (cols)) { + Grob *next_commony = common_refpoint_of_list (cols, next, Y_AXIS); Grob * col = unsmob_grob (ly_car (scm_last_pair (cols))); - SCM posns = col->get_property ("positions"); - - Slice s (0,0); - if (is_number_pair (posns)) - s = Slice (gh_scm2int (gh_car (posns)), - gh_scm2int (gh_cdr (posns))); - Real x = right_bound->relative_coordinate (common,X_AXIS) - left_coord; + Interval v = col->extent (next_commony, Y_AXIS); + Real x = right_bound->relative_coordinate (commonx, X_AXIS) - left_coord; - bottom_points.insert (Offset (x, s[DOWN] * unit),0); - top_points.insert (Offset (x, s[UP] * unit),0); + bottom_points.insert (Offset (x, v[DOWN]),0); + top_points.insert (Offset (x, v[UP]),0); } } } @@ -214,6 +204,7 @@ Cluster::print (SCM smob) top_points.reverse (); Stencil out = brew_cluster_piece (me, bottom_points, top_points); + out.translate_axis (- me->relative_coordinate (commony, Y_AXIS), Y_AXIS); return out.smobbed_copy (); } @@ -227,3 +218,30 @@ ADD_INTERFACE (Cluster,"cluster-interface", "and @code{ramp}.\n" , "style padding columns"); + + + +struct Cluster_beacon +{ +public: + DECLARE_SCHEME_CALLBACK (height, (SCM, SCM)); + static bool has_interface (Grob *); +}; + +MAKE_SCHEME_CALLBACK (Cluster_beacon,height,2); +SCM +Cluster_beacon::height (SCM g, SCM ax) +{ + Grob *me = unsmob_grob (g); + + Interval v = robust_scm2interval (me->get_property ("positions"), Interval (0,0)); + return ly_interval2scm (Staff_symbol_referencer::staff_space (me) * 0.5 * v); +} + + + +ADD_INTERFACE(Cluster_beacon, + "cluster-beacon-interface", + "A place holder for the cluster spanner to determine the vertical " + "extents of a cluster spanner at this X position.", + "positions"); diff --git a/lily/completion-note-heads-engraver.cc b/lily/completion-note-heads-engraver.cc index 11e7eb29a7..bf4437e41f 100644 --- a/lily/completion-note-heads-engraver.cc +++ b/lily/completion-note-heads-engraver.cc @@ -1,5 +1,5 @@ /* - head-grav.cc -- part of GNU LilyPond + completion-note-heads-engraver.cc -- Completion_heads_engraver (c) 1997--2004 Han-Wen Nienhuys */ @@ -19,6 +19,10 @@ #include "tie.hh" #include "global-context.hh" +/* +TODO: make matching rest engraver. +*/ + /* How does this work? diff --git a/make/lilypond.redhat.spec.in b/make/lilypond.redhat.spec.in index ce7c2bf91d..bb3fc363b9 100644 --- a/make/lilypond.redhat.spec.in +++ b/make/lilypond.redhat.spec.in @@ -93,8 +93,8 @@ touch /tmp/.lilypond-install rm `find /var/lib/texmf -name 'feta*pk' -or -name 'feta*tfm' -or -name 'parmesan*pk' -or -name 'parmesan*tfm' -print` /tmp/.lilypond-install %if %{info} -/sbin/install-info %{_infodir}/lilypond.info.gz %{_infodir}/dir -/sbin/install-info %{_infodir}/music-glossary.info.gz %{_infodir}/dir +/sbin/install-info %{_infodir}/lilypond/lilypond.info.gz %{_infodir}/dir +/sbin/install-info %{_infodir}/lilypond/music-glossary.info.gz %{_infodir}/dir %endif # chkfontpath --add=%{_datadir}/lilypond/@TOPLEVEL_VERSION@/fonts/type1/ @@ -108,8 +108,8 @@ fi %if %{info} - /sbin/install-info --delete %{_infodir}/lilypond.info.gz %{_infodir}/dir - /sbin/install-info --delete %{_infodir}/music-glossary.info.gz %{_infodir}/dir + /sbin/install-info --delete %{_infodir}/lilypond/lilypond.info.gz %{_infodir}/dir + /sbin/install-info --delete %{_infodir}/lilypond/music-glossary.info.gz %{_infodir}/dir %endif # chkfontpath --remove=%{_datadir}/share/lilypond/@TOPLEVEL_VERSION@/fonts/type1n/ diff --git a/scm/define-grob-interfaces.scm b/scm/define-grob-interfaces.scm index 7bd3be3f46..2cb09558a8 100644 --- a/scm/define-grob-interfaces.scm +++ b/scm/define-grob-interfaces.scm @@ -9,15 +9,6 @@ ; should include default value? -(ly:add-interface - 'cluster-beacon-interface - - "A place holder for the cluster spanner to determine the vertical -extents of a cluster spanner at this X position. - - " - '(positions) - ) (ly:add-interface 'dynamic-interface diff --git a/scm/define-grobs.scm b/scm/define-grobs.scm index 3f096cb215..197733cccc 100644 --- a/scm/define-grobs.scm +++ b/scm/define-grobs.scm @@ -261,6 +261,7 @@ (ClusterSpannerBeacon . ( (print-function . #f) + (Y-extent-callback . ,Cluster_beacon::height) (meta . ((interfaces . (cluster-beacon-interface item-interface)))) )) diff --git a/scripts/convert-ly.py b/scripts/convert-ly.py index 2a98feb367..649edd450c 100644 --- a/scripts/convert-ly.py +++ b/scripts/convert-ly.py @@ -1917,7 +1917,7 @@ def conv (str): str = re.sub (r'\\modernCautionaries', "#(set-accidental-style 'modern-cautionary)", str) str = re.sub (r'\\modernVoiceAccidental', "#(set-accidental-style 'modern-voice)", str) str = re.sub (r'\\modernVoiceCautionaries', "#(set-accidental-style 'modern-voice-cautionary)", str) - str = re.sub (r'\\pianoAccidentals', "#(set-accidental-style 'piano)' , str)", str) + str = re.sub (r'\\pianoAccidentals', "#(set-accidental-style 'piano)", str) str = re.sub (r'\\pianoCautionaries', "#(set-accidental-style 'piano-cautionary)", str) str = re.sub (r'\\forgetAccidentals', "#(set-accidental-style 'forget)", str) str = re.sub (r'\\noResetKey', "#(set-accidental-style 'no-reset)", str)