From: Jan Nieuwenhuizen Date: Mon, 27 Dec 1999 20:43:14 +0000 (+0100) Subject: patch::: 1.3.17.jcn2 X-Git-Tag: release/1.3.18~1 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=2ee36a10bca886544a2969b3adbc72ac28c1acf9;p=lilypond.git patch::: 1.3.17.jcn2 1.3.17.jcn2 =========== * Bugfix: beams with less than one (visible) stem * small fixes to pa.ly --- diff --git a/CHANGES b/CHANGES index 3fbde72607..fe17e324c7 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,10 @@ +1.3.17.jcn2 +=========== + +* Bugfix: beams with less than one (visible) stem + +* small fixes to pa.ly + 1.3.17.jcn1 =========== diff --git a/TODO b/TODO index fd1e7d2e2d..3b12dcbfa3 100644 --- a/TODO +++ b/TODO @@ -16,7 +16,6 @@ Grep -i for TODO, FIXME and ugh/ugr/urg. . * script columns . * Must stop before this music ends: verse=\lyrics { -. * [ppc] crash on 'lilypond -I mutopia/J.S.Bach/Duette violino-viola' . * input/bugs/clef.sly: clef changes go missing . * input/test/grace.sly: wierd big spacing on grace notes . * TODO^2: diff --git a/VERSION b/VERSION index 3d78c0f374..931f17ee76 100644 --- a/VERSION +++ b/VERSION @@ -2,7 +2,7 @@ PACKAGE_NAME=LilyPond MAJOR_VERSION=1 MINOR_VERSION=3 PATCH_LEVEL=17 -MY_PATCH_LEVEL=jcn1 +MY_PATCH_LEVEL=jcn2 # use the above to send patches: MY_PATCH_LEVEL is always empty for a # released version. diff --git a/lily/beam.cc b/lily/beam.cc index 84104ae96a..51752dc3f7 100644 --- a/lily/beam.cc +++ b/lily/beam.cc @@ -371,7 +371,7 @@ Beam::suspect_slope_b (Real y, Real dy) const Real steep = paper_l ()->get_var ("beam_steep_slope"); Real dx = last_visible_stem ()->hpos_f () - first_visible_stem ()->hpos_f (); - Real dydx = dy/dx; + Real dydx = dy && dx ? dy/dx : 0; if (((y - first_ideal > lengthened) && (dydx > steep)) || ((y + dy - last_ideal > lengthened) && (dydx < -steep))) @@ -398,7 +398,7 @@ Beam::calc_slope_damping_f (Real dy) const { Real dx = last_visible_stem ()->hpos_f () - first_visible_stem ()->hpos_f (); - Real dydx = dy/dx; + Real dydx = dy && dx ? dy/dx : 0; dydx = 0.6 * tanh (dydx) / damping; return dydx * dx; } @@ -415,7 +415,7 @@ Beam::calc_stem_y_f (Stem* s, Real y, Real dy) const Real interbeam_f = paper_l ()->interbeam_f (beam_multiplicity); Real x0 = first_visible_stem ()->hpos_f (); Real dx = last_visible_stem ()->hpos_f () - x0; - Real stem_y = (s->hpos_f () - x0) / dx * dy + y; + Real stem_y = (dy && dx ? (s->hpos_f () - x0) / dx * dy : 0) + y; /* knee */ Direction dir = directional_element(this).get (); @@ -593,11 +593,12 @@ Beam::stem_beams (Stem *here, Stem *next, Stem *prev) const Real interbeam_f = paper_l ()->interbeam_f (multiplicity); Real thick = gh_scm2double (get_elt_property ("beam-thickness"));; - Real dy = interbeam_f; + Real bdy = interbeam_f; Real stemdx = staffline_f; Real dx = last_visible_stem ()->hpos_f () - first_visible_stem ()->hpos_f (); - Real dydx = get_real ("height")/dx; + Real dy = get_real ("height"); + Real dydx = dy && dx ? dy/dx : 0; Molecule leftbeams; Molecule rightbeams; @@ -634,7 +635,7 @@ Beam::stem_beams (Stem *here, Stem *next, Stem *prev) const for (int j = 0; j < lhalfs; j++) { Molecule b (a); - b.translate_axis (-dir * dy * (lwholebeams+j), Y_AXIS); + b.translate_axis (-dir * bdy * (lwholebeams+j), Y_AXIS); leftbeams.add_molecule (b); } } @@ -659,7 +660,7 @@ Beam::stem_beams (Stem *here, Stem *next, Stem *prev) const for (; j < nogap; j++) { Molecule b (a); - b.translate_axis (-dir * dy * j, Y_AXIS); + b.translate_axis (-dir * bdy * j, Y_AXIS); rightbeams.add_molecule (b); } // TODO: notehead widths differ for different types @@ -671,7 +672,7 @@ Beam::stem_beams (Stem *here, Stem *next, Stem *prev) const for (; j < rwholebeams; j++) { Molecule b (a); - b.translate (Offset (here->invisible_b () ? 0 : gap_f, -dir * dy * j)); + b.translate (Offset (here->invisible_b () ? 0 : gap_f, -dir * bdy * j)); rightbeams.add_molecule (b); } @@ -682,7 +683,7 @@ Beam::stem_beams (Stem *here, Stem *next, Stem *prev) const for (; j < rwholebeams + rhalfs; j++) { Molecule b (a); - b.translate_axis (- dir * dy * j, Y_AXIS); + b.translate_axis (- dir * bdy * j, Y_AXIS); rightbeams.add_molecule (b); } @@ -706,7 +707,8 @@ Beam::do_brew_molecule_p () const Real x0 = first_visible_stem ()->hpos_f (); Real dx = last_visible_stem ()->hpos_f () - x0; - Real dydx = get_real ("height")/dx; + Real dy = get_real ("height"); + Real dydx = dy && dx ? dy/dx : 0; Real y = get_real ("y-position"); for (int j=0; j first_visible_stem ()->hpos_f (); - Real dydx = beam_dy/(b->last_visible_stem ()->hpos_f () - x0); + Real dx = b->last_visible_stem ()->hpos_f () - x0; + Real dydx = beam_dy && dx ? beam_dy/dx : 0; Direction d = stem_l ()->get_direction (); Real beamy = (stem_l ()->hpos_f () - x0) * dydx + beam_y; diff --git a/mutopia/J.S.Bach/pa.ly b/mutopia/J.S.Bach/pa.ly index 1a199cea5b..94132512ba 100644 --- a/mutopia/J.S.Bach/pa.ly +++ b/mutopia/J.S.Bach/pa.ly @@ -19,14 +19,17 @@ commands = \notes { right = \notes \relative c' { \commands %if urtekst -% \clef "alto"; - \clef "violin"; + \clef "alto"; +% \clef "violin"; + +%if stable +% \property Voice."beamAutoEnd_8" = "1/4" \property Voice."beamAutoEnd_8" = #(make-moment 1 4) bes8 | es16 f g8 g f as g bes, as | \repeat "volta" 2 { - g'16 es f8 as, g d' es r bes, | - es'16 f g8 g f as g bes, as| + g'16 es f8 as, g d' es r bes | + es16 f g8 g f as g bes, as| g'16 es f8 as, g d' es r bes' | bes4 as16 g f es f es d c bes8 c16 d | es f g f as g f es g8 f r bes, | @@ -52,7 +55,7 @@ right = \notes \relative c' { es f g f as g f es g8 f r bes, | g' a4 bes8 \grace f() es16 d es8 r c | a' bes4 c8 \grace f,()es16 d es8 r es' | - d16 c bes8 bes16\prall a bes8~bes16 as g f es d c bes| + d16 c bes8 bes16\prall a bes8~bes16 a g f es d c bes| c d es8 es16\prall d es8~es16 a bes c bes a g f| bes8 f d\trill c16 bes bes es d c d8 bes| g8. a16 a8.\prallprall g32 a bes4 r8 d| @@ -73,7 +76,7 @@ right = \notes \relative c' { g'16 es f8 as, g d' es r4| r r8 bes' bes4 as16 g f es| f es d c bes8 c16 d es f g f as g f es | - g8 f r es b' d4 es8| + g8 f r es c' d4 es8| as,16\prall g as8 r c d es4 f8| \grace bes,() as16 g as8 r f g16 f es8~es16\trill d es8~| es16 des' c bes as g f es f g as8~as16\trill g as8~| @@ -87,9 +90,10 @@ clefs = \notes{ \clef "alto"; \partial 8; \skip 8; - \clef "violin"; +%testin' +% \clef "violin"; \skip 1; - \clef "alto"; +% \clef "alto"; \repeat "volta" 2 { \skip 1*19; } \alternative { { \skip 1*2; } @@ -105,11 +109,15 @@ clefs = \notes{ left = \notes \relative c { \commands - \property Staff.noVoltaBraces = ##t %if urtekst -% \clef "tenor"; - \clef "bass"; + \clef "tenor"; +% \clef "bass"; + +%if stable +% \property Staff.noVoltaBraces = 1 +% \property Voice."beamAutoEnd_8" = "1/4" \property Voice."beamAutoEnd_8" = #(make-moment 1 4) + \property Staff.noVoltaBraces = ##t r8 R1 \repeat "volta" 2 { @@ -151,6 +159,8 @@ left = \notes \relative c { pedal = \notes \relative c, { \commands +%if stable +% \property Staff.noVoltaBraces = 1 \property Staff.noVoltaBraces = ##t \clef "bass"; r8 | @@ -189,7 +199,7 @@ pedal = \notes \relative c, { g f es d es g as bes| c d es4 bes as | g es bes'8 c d bes | - es d c b c g' c bes| + es d c b c g' c bes!| as4 es f g| as8 g f e f es d c| b g g' f es4 c| @@ -225,7 +235,7 @@ pedal = \notes \relative c, { \property Score.midiInstrument = "church organ" < %if urtekst -% \context Voice=i \clefs + \context Voice=i \clefs \context Voice=ii \right > } @@ -236,11 +246,17 @@ pedal = \notes \relative c, { > \paper { + %textheight = 280.0 \mm; + % landscape: + textheight = 160.0 \mm; + linewidth = 290.0 \mm; +%{ \translator { \OrchestralScoreContext minVerticalAlign = 4.0*\staffheight; maxVerticalAlign = 4.0*\staffheight; } +%} \translator { \StaffGroupContext minVerticalAlign = 4.0*\staffheight; @@ -248,16 +264,9 @@ pedal = \notes \relative c, { } \translator { \PianoStaffContext - minVerticalAlign = 3.0*\staffheight; - maxVerticalAlign = 3.0*\staffheight; + minVerticalAlign = 2.5*\staffheight; + maxVerticalAlign = 2.5*\staffheight; } -%{ - \translator{ - \VoiceContext - % consider ending beam at every 1/2 note - "beamAutoEnd_8" = "1/4"; - } -%} } \midi { \tempo 4 = 69;