From: hanwen Date: Thu, 10 Mar 2005 14:56:48 +0000 (+0000) Subject: *** empty log message *** X-Git-Tag: release/2.5.23~375 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=f05a287ba49d7523640265bde88acead188fb821;p=lilypond.git *** empty log message *** --- diff --git a/input/regression/new-slur.ly b/input/regression/new-slur.ly deleted file mode 100644 index 67193f4a0c..0000000000 --- a/input/regression/new-slur.ly +++ /dev/null @@ -1,78 +0,0 @@ - -\header { - - texidoc = "Slur formatting is based on scoring. A large number of - slurs are generated. Each esthetic aspect gets demerits, the best - configuration (with least demerits) wins. This must be tested in - one big file, since changing one score parameter for one situation - may affect several other situations. - - Tunable parameters are in @file{scm/slur.scm}. -" - -} - -\version "2.4.0" -\layout { - raggedright = ##t -% #(define debug-slur-scoring #t) -} - -%% help lilypond-book -%% \score - -\relative { - - \grace e=''16( d8.[) c16] - d=''8.[ \grace f16( e16)] - s2 - << {c=''8.([ es16] bes4~bes )} - \\ - {r8 r r } - >> - \new Voice { \voiceOne b='8[ c16( d]) } - g='8[( a b b! ] c4 bes) - bes='8( f' des bes) as4( bes) - r8 d( f e d c b a) - cis=''4( d) f'=''16( e) d( c) - s4 - - c'=''2(~c8 d16 c b8 a) - - 4 ( f ) f - ^( f ) f - _( f ) - _( g ) - _( \stemDown g \stemNeutral ) - c,='^( c'' c) - c,,^( c'') - c,,^( c') - | b='2( a4) s4 - | b='4.( c8) s2 - | << c=''1_( - { s2 \grace { b16[ c] } } >> - \break - b4) - e=''4.( c8) s4 - | << { b='8[( c]) } \\ - { b='8[( c]) }>> - - - s2.| - e4( dis4) - e4( dis4) - g='16( b d fis) - \clef bass a=8[ e16(f] g[ a b d,)] s4 | \break - e=8[( f] g[ a b d,)] s4 | - - \clef treble - \new Voice { - \slurDown - c=''4(^"slurs forced down" d, c') s4 - f=''2( d4 f | g c a f | d c f2 | f1) | - } - -% \override Slur #'excentricity = #-2 - c=''8 ( d[ b f d] a'[ c]) -} - diff --git a/input/regression/slur-scoring.ly b/input/regression/slur-scoring.ly new file mode 100644 index 0000000000..67193f4a0c --- /dev/null +++ b/input/regression/slur-scoring.ly @@ -0,0 +1,78 @@ + +\header { + + texidoc = "Slur formatting is based on scoring. A large number of + slurs are generated. Each esthetic aspect gets demerits, the best + configuration (with least demerits) wins. This must be tested in + one big file, since changing one score parameter for one situation + may affect several other situations. + + Tunable parameters are in @file{scm/slur.scm}. +" + +} + +\version "2.4.0" +\layout { + raggedright = ##t +% #(define debug-slur-scoring #t) +} + +%% help lilypond-book +%% \score + +\relative { + + \grace e=''16( d8.[) c16] + d=''8.[ \grace f16( e16)] + s2 + << {c=''8.([ es16] bes4~bes )} + \\ + {r8 r r } + >> + \new Voice { \voiceOne b='8[ c16( d]) } + g='8[( a b b! ] c4 bes) + bes='8( f' des bes) as4( bes) + r8 d( f e d c b a) + cis=''4( d) f'=''16( e) d( c) + s4 + + c'=''2(~c8 d16 c b8 a) + + 4 ( f ) f + ^( f ) f + _( f ) + _( g ) + _( \stemDown g \stemNeutral ) + c,='^( c'' c) + c,,^( c'') + c,,^( c') + | b='2( a4) s4 + | b='4.( c8) s2 + | << c=''1_( + { s2 \grace { b16[ c] } } >> + \break + b4) + e=''4.( c8) s4 + | << { b='8[( c]) } \\ + { b='8[( c]) }>> + + + s2.| + e4( dis4) + e4( dis4) + g='16( b d fis) + \clef bass a=8[ e16(f] g[ a b d,)] s4 | \break + e=8[( f] g[ a b d,)] s4 | + + \clef treble + \new Voice { + \slurDown + c=''4(^"slurs forced down" d, c') s4 + f=''2( d4 f | g c a f | d c f2 | f1) | + } + +% \override Slur #'excentricity = #-2 + c=''8 ( d[ b f d] a'[ c]) +} + diff --git a/lily/accidental.cc b/lily/accidental.cc index 9aab78202a..6522a843cd 100644 --- a/lily/accidental.cc +++ b/lily/accidental.cc @@ -68,7 +68,7 @@ Accidental_interface::accurate_boxes (Grob *a, Grob **common) && !parens && scm_ilength (accs) == 1) { - switch (scm_to_int (scm_car (accs)) + switch (scm_to_int (scm_car (accs))) { case FLAT: { @@ -114,21 +114,23 @@ Accidental_interface::accurate_boxes (Grob *a, Grob **common) TODO: add support for, double flat. */ } + } + + if (!boxes.size ()) + boxes.push (b); - if (!boxes.size ()) - boxes.push (b); + Offset o (a->relative_coordinate (common[X_AXIS], X_AXIS), + a->relative_coordinate (common[Y_AXIS], Y_AXIS)); + for (int i = boxes.size (); i--;) + { + boxes[i].translate (o); + } - Offset o (a->relative_coordinate (common[X_AXIS], X_AXIS), - a->relative_coordinate (common[Y_AXIS], Y_AXIS)); - for (int i = boxes.size (); i--;) - { - boxes[i].translate (o); - } + return boxes; +} - return boxes; - } - /* +/* * Some styles do not provide all flavours of accidentals, e.g. there * is currently no sharp accidental in vaticana style. In these cases * this function falls back to one of the other styles. @@ -252,10 +254,10 @@ Accidental_interface::accurate_boxes (Grob *a, Grob **common) return mol.smobbed_copy (); } - /* - TODO: should move inside-slur into item? +/* + TODO: should move inside-slur into item? - */ - ADD_INTERFACE (Accidental_interface, "accidental-interface", - "a single accidental", - "inside-slur cautionary cautionary-style style tie accidentals"); +*/ +ADD_INTERFACE (Accidental_interface, "accidental-interface", + "a single accidental", + "inside-slur cautionary cautionary-style style tie accidentals"); diff --git a/lily/spaceable-grob.cc b/lily/spaceable-grob.cc index 17d15ba94b..c8f8950b91 100644 --- a/lily/spaceable-grob.cc +++ b/lily/spaceable-grob.cc @@ -27,7 +27,10 @@ void Spaceable_grob::add_rod (Grob *me, Grob *p, Real d) { // printf ("rod %lf\n", d); - + if (isinf(d) || d < 0) + { + programming_error ("Weird rod"); + } SCM mins = get_minimum_distances (me); SCM newdist = scm_make_real (d);