]> git.donarmstrong.com Git - lilypond.git/commitdiff
* lily/rest.cc (polyphonic_offset_callback): new function. Do
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Fri, 13 Feb 2004 12:33:20 +0000 (12:33 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Fri, 13 Feb 2004 12:33:20 +0000 (12:33 +0000)
vertical positioning for polyphony, without RestCollision object.

* lily/note-column.cc (add_head): prevent rests & note heads on
one stem.

* lily/rest-collision.cc (do_shift): ignore rests with beams.
(do_shift): rewrite only-rests case: use common refpoints: the
routine will have sensible results when other rest-translations
have taken place.

* lily/simple-spacer.cc (solve): cleanup: remove code for linelen
< 0 case.

* input/GNUmakefile (SUBDIRS): remove ascii-art

29 files changed:
ChangeLog
Documentation/topdocs/NEWS.texi
input/mutopia/F.Schubert/morgenlied.ly
input/mutopia/F.Schubert/standchen.ly
input/mutopia/J.S.Bach/baerenreiter-sarabande.ly
input/mutopia/J.S.Bach/bwv940.ly
input/mutopia/J.S.Bach/wtk1-fugue2.ly
input/mutopia/R.Schumann/romanze-op28-2.ly
input/mutopia/W.A.Mozart/mozart-hrn3-allegro.ly
input/mutopia/W.A.Mozart/mozart-hrn3-romanze.ly
input/mutopia/W.A.Mozart/mozart-hrn3-rondo.ly
input/regression/rest-collision-beam.ly
input/regression/rest-collision-default.ly [deleted file]
input/regression/rest-polyphonic.ly
lily/column-x-positions.cc
lily/gourlay-breaking.cc
lily/include/column-x-positions.hh
lily/include/note-column.hh
lily/include/rest.hh
lily/include/simple-spacer.hh
lily/note-column.cc
lily/rest-collision-engraver.cc
lily/rest-collision.cc
lily/rest.cc
lily/simple-spacer.cc
scm/define-grobs.scm
scm/music-functions.scm
scripts/abc2ly.py
scripts/etf2ly.py

index d7469abbd8d475bf9c32c6de2479c980a1d40c77..83766b2b40469ddce8175aea809f686017b7391b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,19 @@
 2004-02-13  Han-Wen Nienhuys   <hanwen@xs4all.nl>
 
+       * lily/rest.cc (polyphonic_offset_callback): new function. Do
+       vertical positioning for polyphony, without RestCollision object.
+
+       * lily/note-column.cc (add_head): prevent rests & note heads on
+       one stem.
+
+       * lily/rest-collision.cc (do_shift): ignore rests with beams.
+       (do_shift): rewrite only-rests case: use common refpoints: the
+       routine will have sensible results when other rest-translations
+       have taken place.
+
+       * lily/simple-spacer.cc (solve): cleanup: remove code for linelen
+       < 0 case. 
+
        * input/GNUmakefile (SUBDIRS): remove ascii-art
 
 2004-02-13  Jan Nieuwenhuizen  <janneke@gnu.org>
index 7edf2db43fc5fa3846ad105507b589b387c6efa6..2e433361500ab31f29a2c57ffb3ff7a362950c83 100644 (file)
@@ -22,6 +22,8 @@ Version 2.1.13
 the following table lists the differences:
 
 @example
+      (old)                           (new)
+
 \property A.B = #C                \set A.B = #C
 \property A.B \unset              \unset A.B
 \property A.B \set #C = #D        \override A.B #C = #D 
index 07d58201b22969b82da72b157ecf783f829faae2..416e7c3c65ee332426a3cba141ab3c2617706053 100644 (file)
@@ -73,21 +73,12 @@ melody = \notes   \relative c'' \repeat volta 2 \context Voice = singer {
 }
 
 
-<<<<<<< morgenlied.ly
-ignoreMelisma =        \set ignoreMelismata =  ##t
-ignoreMelismaOff = \unset ignoreMelismata 
-=======
 ignoreMelisma =        \set ignoreMelismata = ##t
 ignoreMelismaOff = \unset ignoreMelismata 
->>>>>>> 1.20
 
 
 firstVerse = \lyrics {
-<<<<<<< morgenlied.ly
-    \set stanza =  "1."
-=======
     \set stanza = "1."
->>>>>>> 1.20
     
     Sü -- ßes Licht! Aus
     \ignoreMelisma
@@ -102,11 +93,7 @@ firstVerse = \lyrics {
     }
 
 secondVerse = \lyrics {
-<<<<<<< morgenlied.ly
-    \set stanza =  "2."
-=======
     \set stanza = "2."
->>>>>>> 1.20
     Ach, der Lie -- be sanf
     -- tes We -- hen schwellt mir |
     das be -- weg -- te __ Herz, sanft, wie ein ge -- lieb -- ter Schmerz. __ Dürft ich | 
@@ -119,11 +106,7 @@ pianoRH = \notes \relative c''' \repeat volta 2 {
     g16(_\p fis a g fis g f e d c b a ) | 
     <g e>8( <es fis a> <d f b> <c e c'>) r8 r | 
     r8 c'( e,) f r a |
-<<<<<<< morgenlied.ly
-    \once \override DynamicLineSpanner  #'padding =#3
-=======
     \once \override DynamicLineSpanner   #'padding =#3
->>>>>>> 1.20
     r8_\> << { s8 s8-\! }  << { fis( g)
                            } \\ { c,4 } >> >> r8 <e c g> <e c g> |
     <d c a>4. r8 \clef bass  <d b f> <d b f> |
@@ -153,11 +136,7 @@ pianoLH = \notes \relative c'' \repeat volta 2 {
     fis r4 <g b>8( |
     <f c'>4.)
 
-<<<<<<< morgenlied.ly
     \once \override Slur  #'height-limit = #1.0
-=======
-    \once \override Slur   #'height-limit = #1.0
->>>>>>> 1.20
 
     <g c>4.( | <a c>4.) <g b,> |
     c,4 r8 g4 r8 |
@@ -176,11 +155,7 @@ pianoLH = \notes \relative c'' \repeat volta 2 {
         \lyricsto "singer" \new Lyrics \firstVerse
         \lyricsto "singer" \new Lyrics \secondVerse
      \new PianoStaff << 
-<<<<<<< morgenlied.ly
-        \set PianoStaff.instrument =  \markup {
-=======
         \set PianoStaff.instrument = \markup {
->>>>>>> 1.20
             \bold
             \bigger\bigger\bigger\bigger \huge "2.  " }
         \new Staff \pianoRH
index 600e8fe192a27ec3c3cbe88cc785c57809027fbd..48dc67195eff9fbafcb72df7a0b4f1ab02bcd92d 100644 (file)
@@ -66,21 +66,13 @@ vocalVerse = \notes\relative c''{
        g8. b16 es4. d8 |
        c8. g16 es4. c8 |
        \grace {
-<<<<<<< standchen.ly
-  \override Stem  #'stroke-style = #"grace"
-=======
   \override Stem   #'stroke-style = #"grace"
->>>>>>> 1.31
     as'32[( bes ] 
   \revert Stem #'stroke-style }
  \times 2/3 {  as8[)(  g)] as } c4. as8 |
        g2. |
        \grace {
-<<<<<<< standchen.ly
-  \override Stem  #'stroke-style = #"grace"
-=======
   \override Stem   #'stroke-style = #"grace"
->>>>>>> 1.31
     f32[( g ] 
   \revert Stem #'stroke-style }
  \times 2/3 {  f8[)(  e)] f } as4. f8 |
@@ -89,11 +81,7 @@ vocalVerse = \notes\relative c''{
        g8. b16 es4. d8 |
        c8. g16 e4. c8 |
        \grace {
-<<<<<<< standchen.ly
-  \override Stem  #'stroke-style = #"grace"
-=======
   \override Stem   #'stroke-style = #"grace"
->>>>>>> 1.31
     a'32[( b ] 
   \revert Stem #'stroke-style }
  \times 2/3 {  a!8[)(  gis)] a } c4. a8 |
@@ -113,11 +101,7 @@ vocalThrough = \notes\relative c{
        R2. |
        R2. |
        \grace {
-<<<<<<< standchen.ly
-  \override Stem  #'stroke-style = #"grace"
-=======
   \override Stem   #'stroke-style = #"grace"
->>>>>>> 1.31
     a32[( b ] 
   \revert Stem #'stroke-style }
  \times 2/3 {  a!8[)(  gis)] a } c4. a8 |
@@ -209,17 +193,9 @@ trebleVerseOne = \notes\relative c{
        r8\pp <es as c> <as c es> <es as c> <as c es> <es as c> |
        %20
        r8 <es g bes> <g bes es> <es g bes> <g bes es> <es g bes> |
-<<<<<<< standchen.ly
-       \override Slur  #'attachment = #'(stem . stem)
-=======
        \override Slur   #'attachment = #'(stem . stem)
->>>>>>> 1.31
        \grace {
-<<<<<<< standchen.ly
-  \override Stem  #'stroke-style = #"grace"
-=======
   \override Stem   #'stroke-style = #"grace"
->>>>>>> 1.31
     as'32[( bes ] 
   \revert Stem #'stroke-style }
 
@@ -280,11 +256,7 @@ trebleThrough = \notes \relative c'{
        <a a'>4.-> <f f'>8)
        <e e'>2. |
        <es! es'! >2. |
-<<<<<<< standchen.ly
-       \override TextScript  #'font-shape = #'italic
-=======
        \override TextScript   #'font-shape = #'italic
->>>>>>> 1.31
        <d d'>2._"decresc."
        \revert TextScript #'font-shape
 
@@ -298,11 +270,7 @@ trebleThrough = \notes \relative c'{
        <f g>4. <b, g'>8(-. <d g>-. <f g>)-. |
        %80
 
-<<<<<<< standchen.ly
-       \override TextScript  #'font-shape = #'italic
-=======
        \override TextScript   #'font-shape = #'italic
->>>>>>> 1.31
        <e g>2._"dim."
        \revert TextScript #'font-shape
 
@@ -435,20 +403,11 @@ vocals = \context Voice = leise \notes {
        R1 * 3/4 * 6
 }
 
-<<<<<<< standchen.ly
-trebleStaff =  \context Staff = treble<< 
-        \set Staff.midiInstrument =  "acoustic grand"
-=======
 trebleStaff = \context Staff = treble<< 
         \set Staff.midiInstrument = "acoustic grand"
->>>>>>> 1.31
        \global
        {\clef treble
-<<<<<<< standchen.ly
        \override autoBeamSettings  #'(begin * * * *) = #(ly:make-moment 0 1)
-=======
-       \override autoBeamSettings   #'(begin * * * *) = #(ly:make-moment 0 1)
->>>>>>> 1.31
        \trebleIntro 
        \trebleVerseOne 
        \trebleEentje
@@ -456,13 +415,8 @@ trebleStaff = \context Staff = treble<<
        \trebleThrough }
 >>
 
-<<<<<<< standchen.ly
-bassStaff =  \context Staff = bass<<
-        \set Staff.midiInstrument =  "acoustic grand"
-=======
 bassStaff = \context Staff = bass<<
         \set Staff.midiInstrument = "acoustic grand"
->>>>>>> 1.31
        \global
        \clef bass
        {\bassIntro 
@@ -476,11 +430,7 @@ bassStaff = \context Staff = bass<<
 \score{
     <<
        \new Staff <<
-<<<<<<< standchen.ly
-           \set Staff.midiInstrument =  "synth voice"
-=======
            \set Staff.midiInstrument = "synth voice"
->>>>>>> 1.31
            %% insert \transpose if necessary, depending on voice range.
            \global
            \vocals
index c9f299d83e4f6695ff3826fd3426df05a0e58ddc..273ea88be5b8a1a15ace5625d703c8b432a00cfc 100644 (file)
@@ -121,14 +121,9 @@ sarabandeA =  \context Voice \notes \relative c {
   d'[ cis] |
   %%  d4 d,,2 |
   d4
-<<<<<<< baerenreiter-sarabande.ly
-  \override NoteHead  #'after-line-breaking-callback
-  = #(lambda (smob) (assert-system-count smob 6))
-=======
   \override NoteHead
     #'after-line-breaking-callback
  = #(lambda (smob) (assert-system-count smob 6))
->>>>>>> 1.30
   d,,2 |
 }
 
index eb4b751d3c8592be0bdb130b0f43b90dec9d0845..fd26dc6e3f1df83c980f4e156f9adbff58903dfe 100644 (file)
@@ -116,11 +116,7 @@ four = \notes\relative c{
        a gis ~ gis16 gis fis e 
        \skip 4*1
        \change Staff=lower \stemDown
-<<<<<<< bwv940.ly
-       \override NoteColumn  #'horizontal-shift = #0
-=======
        \override NoteColumn   #'horizontal-shift = #0
->>>>>>> 1.7
        \stemUp\tieUp
        b2 a |
        g a4. gis16 a |
index 8f3c772f864ffd028acbfd7409a84b73cc82541f..db7a991564305791cd0dea28bf27ea05620cb05d 100644 (file)
@@ -192,11 +192,7 @@ bassdux = \context Voice=three \notes \relative c' {
 \score {
  
     \notes \context PianoStaff << 
-<<<<<<< wtk1-fugue2.ly
         \override Score.TimeSignature  #'style = #'C
-=======
-        \override Score.TimeSignature   #'style = #'C
->>>>>>> 1.15
        \context Staff = treble <<
            \key c \minor
            \dux
index 2205f15edefdc0319271f2c5e679f899fd12beb6..7a5250149e157cf267231283aa192eabd3e4dae1 100644 (file)
@@ -33,17 +33,9 @@ global = \notes { \key fis \major \time 6/8
 righta = \notes \transpose c cis' {
  % \stemUp \slurUp \tieUp
  \stemUp
-<<<<<<< romanze-op28-2.ly
- \override Slur  #'attachment = #'(stem . stem)
-=======
  \override Slur   #'attachment = #'(stem . stem)
->>>>>>> 1.32
  \repeat volta 2 {
-<<<<<<< romanze-op28-2.ly
-  \override TextScript  #'extra-offset = #'(-8.0 . 2.5)
-=======
   \override TextScript   #'extra-offset = #'(-8.0 . 2.5)
->>>>>>> 1.32
   \m  a,16[^\p( \u c^\markup {
       \large "Einfach ("
       \note #"8" #1
@@ -115,13 +107,8 @@ rightb = \notes \transpose c cis' {
  c_3 g,_2 es, g, h,_4 g, d, g, c g,8 f,16 |
  c g, es, g, es c_3 as, c^2 d^3 c h, c |
  e des b,\< des g e_3 ces_4 d_2 f^3 d cis d |
-<<<<<<< romanze-op28-2.ly
- \override PhrasingSlur  #'extra-offset =  #'(0 . 3)
- \override PhrasingSlur  #'beautiful = #42
-=======
  \override PhrasingSlur   #'extra-offset = #'(0 . 3)
  \override PhrasingSlur   #'beautiful = #42
->>>>>>> 1.32
  g\( fes des fes b g_3 es_1\! ges_2 a^3 ges f_1 ges_2 |
  r ges_2 b des_1 ges b,_2 des ges,^1 b, \d des,^1 \stemDown \transpose c' c { b,[_1 as,] |
  g,8  b,16[ g, e, cis,]  d,\)_4 \< f, h, d_3 f_2  r16\! }
@@ -136,22 +123,14 @@ rightb = \notes \transpose c cis' {
   f,8.. f32^1 g8^2  a4.) |
   a4^1( c8^1_\accent~[c b)] g16^1([ b^2] |
    c4)^1 es8^1~es d^1 f^1~ |
-<<<<<<< romanze-op28-2.ly
   \override PianoStaff.Arpeggio  #'direction = #1
-=======
-  \override PianoStaff.Arpeggio   #'direction = #1
->>>>>>> 1.32
   f f8.. f32^1( as4.)^\fermata\arpeggio ~ |
   \revert PianoStaff.Arpeggio #'direction
   \stemUp \tieUp as r4 r8 |
  }
   s2. s
  \u s4. \grace {
-<<<<<<< romanze-op28-2.ly
-  \override Stem  #'stroke-style = #"grace"
-=======
   \override Stem   #'stroke-style = #"grace"
->>>>>>> 1.32
   f8(
   \revert Stem #'stroke-style }
   f4) e8 |
@@ -193,11 +172,7 @@ lefta = \notes \transpose c cis {
    c4) r8 f4-4( as8-5~ | as g-4  b)-5 as4-5( ces'8-4~ |
   ces' b des'-4  c'4)-5( <es'-4 es''>8 |
   \stemDown \tieDown  des'4.)_5~des'~ |
-<<<<<<< romanze-op28-2.ly
-  \override NoteColumn  #'horizontal-shift = #-1 des' s
-=======
   \override NoteColumn   #'horizontal-shift = #-1 des' s
->>>>>>> 1.32
  }
  >>
  \change Staff=down \stemUp \slurUp \tieUp \phrasingSlurUp
@@ -211,11 +186,7 @@ lefta = \notes \transpose c cis {
  s2.*2
  s8 r16 h\( c' d' es' as g8\arpeggio  fis(
  ges)\) f16-2( a-1 c'-3  f')-1 \grace {
-<<<<<<< romanze-op28-2.ly
-  \override Stem  #'stroke-style = #"grace"
-=======
   \override Stem   #'stroke-style = #"grace"
->>>>>>> 1.32
   \stemDown \slurUp  b,[( f] \stemUp 
   \revert Stem #'stroke-style }
   e')-1( d' c' b-1 a-2\prall g 
@@ -268,15 +239,6 @@ leftb = \notes \transpose c cis {
 \score { \notes
   \context PianoStaff <<
     \pianoCautionaries
-<<<<<<< romanze-op28-2.ly
-    \override PianoStaff.NoteCollision  #'merge-differently-dotted = ##t
-    \set PianoStaff.connectArpeggios =  ##t
-    \override PianoStaff.Arpeggio  #'print-function = \arpeggioBracket
-
-    \override PianoStaff.InstrumentName  #'font-size = #6
-    \override PianoStaff.InstrumentName  #'font-shape   = #'italic
-    \override PianoStaff.InstrumentName  #'font-magnification   = #3
-=======
     \override PianoStaff.NoteCollision   #'merge-differently-dotted = ##t
     \set PianoStaff.connectArpeggios = ##t
     \override PianoStaff.Arpeggio   #'print-function = \arpeggioBracket
@@ -284,41 +246,23 @@ leftb = \notes \transpose c cis {
     \override PianoStaff.InstrumentName   #'font-size = #6
     \override PianoStaff.InstrumentName   #'font-shape = #'italic
     \override PianoStaff.InstrumentName   #'font-magnification = #3
->>>>>>> 1.32
     
     \set PianoStaff.instrument = "2. "
     \context Staff = up {
-<<<<<<< romanze-op28-2.ly
-      \override Staff.DynamicLineSpanner  #'direction = #-1
-=======
       \override Staff.DynamicLineSpanner   #'direction = #-1
->>>>>>> 1.32
       \clef G <<\global \context Voice=upv \righta >>
     }
     \context Staff = mid {
-<<<<<<< romanze-op28-2.ly
-    \override Staff.InstrumentName  #'font-size = #0
-    \override Staff.InstrumentName  #'font-shape   = #'upright
-    \override Staff.InstrumentName  #'font-magnification   = #1
-    \override Staff.InstrumentName  #'extra-offset = #'(0 . 6)
-   % \set Staff.instrument = "\\begin{turn}{-90}{Rechte Hand}\\end{turn}"
-    \set Staff.instrument =  \markup { \column < Rechte Hand >  }
-=======
     \override Staff.InstrumentName   #'font-size = #0
     \override Staff.InstrumentName   #'font-shape = #'upright
     \override Staff.InstrumentName   #'font-magnification = #1
     \override Staff.InstrumentName   #'extra-offset = #'(0 . 6)
    % \set Staff.instrument = "\\begin{turn}{-90}{Rechte Hand}\\end{turn}"
     \set Staff.instrument = \markup { \column < Rechte Hand >  }
->>>>>>> 1.32
       \clef F <<\global \context Voice=midv \rightb>>
     }
       \context Staff = down {
-<<<<<<< romanze-op28-2.ly
-        \override Staff.DynamicLineSpanner  #'direction = #1
-=======
         \override Staff.DynamicLineSpanner   #'direction = #1
->>>>>>> 1.32
         \clef F
        << \global \context Voice=lva \lefta \context Voice=lvb \leftb >>
     }
index 16bf8ebfc0ce4e1921f924938c2983d95f8dcaf5..d8799725a3a2dd5c0feed0d2e7698c240eee3eb5 100644 (file)
@@ -68,11 +68,7 @@ allegro =
 
        << a1(\trill
          { s2 \grace {
-<<<<<<< mozart-hrn3-allegro.ly
-  \override Stem  #'stroke-style = #"grace"
-=======
   \override Stem   #'stroke-style = #"grace"
->>>>>>> 1.16
     g16[ a] 
   \revert Stem #'stroke-style }
  } >>
@@ -115,11 +111,7 @@ allegro =
        a, ( d g,  c)
        d d 
            \grace {
-<<<<<<< mozart-hrn3-allegro.ly
-  \override Stem  #'stroke-style = #"grace"
-=======
   \override Stem   #'stroke-style = #"grace"
->>>>>>> 1.16
    e8( 
   \revert Stem #'stroke-style }
 
@@ -133,20 +125,12 @@ allegro =
         c[( b)] b4 r2
        c2 (bes  a)  a8[(b c  cis)]
        d2( ~  d8[ e16 d] \grace {
-<<<<<<< mozart-hrn3-allegro.ly
-  \override Stem  #'stroke-style = #"grace"
-=======
   \override Stem   #'stroke-style = #"grace"
->>>>>>> 1.16
    \longgrace d16( \endlonggrace 
   \revert Stem #'stroke-style }
  c8[) b16  c)]
        \grace {
-<<<<<<< mozart-hrn3-allegro.ly
-  \override Stem  #'stroke-style = #"grace"
-=======
   \override Stem   #'stroke-style = #"grace"
->>>>>>> 1.16
    \longgrace c16 \endlonggrace 
   \revert Stem #'stroke-style }
  b8[( a16  g)] g4 r2 |
@@ -169,22 +153,14 @@ allegro =
        
        f4. ( d8)  f8[ ( d) f d]
         c[ (e]  g2) \grace {
-<<<<<<< mozart-hrn3-allegro.ly
-  \override Stem  #'stroke-style = #"grace"
-=======
   \override Stem   #'stroke-style = #"grace"
->>>>>>> 1.16
    \longgrace f16(  \endlonggrace 
   \revert Stem #'stroke-style }
   e8[)( d16  c)]
 
        << d1\trill (
          { s2 \grace {
-<<<<<<< mozart-hrn3-allegro.ly
-  \override Stem  #'stroke-style = #"grace"
-=======
   \override Stem   #'stroke-style = #"grace"
->>>>>>> 1.16
     c16[ d] 
   \revert Stem #'stroke-style }
  } >>
@@ -202,11 +178,7 @@ allegro =
 
        << d1(\trill
          { s2 \grace {
-<<<<<<< mozart-hrn3-allegro.ly
-  \override Stem  #'stroke-style = #"grace"
-=======
   \override Stem   #'stroke-style = #"grace"
->>>>>>> 1.16
     c16[ d] 
   \revert Stem #'stroke-style }
  }  >>
index 0ddbe7a8fe0047ff0622bb7a10ba463da9bdea52..d0f1c6448876160c8efecbc5de4987aad00ab1b6 100644 (file)
@@ -45,11 +45,7 @@ romanze = \notes \relative c' {
         c[ ( e) g g]  g[( f e  d)]
        c4(
        \grace {
-<<<<<<< mozart-hrn3-romanze.ly
-  \override Stem  #'stroke-style = #"grace"
-=======
   \override Stem   #'stroke-style = #"grace"
->>>>>>> 1.15
    \longgrace e16 \endlonggrace 
   \revert Stem #'stroke-style }
 
@@ -57,11 +53,7 @@ romanze = \notes \relative c' {
        \mark "C"
 
        %% this is a trick to get the sfp-s to align. 
-<<<<<<< mozart-hrn3-romanze.ly
-       \override Hairpin  #'transparent = ##t
-=======
        \override Hairpin   #'transparent = ##t
->>>>>>> 1.15
        des1\sfp \> 
        g,1\sfp\!  \> 
        c\sfp \!   \> 
index b9447a4d2f02645c4a48f3788ea8ec4b6b028371..e6db7e0634f22a501e04d19ed1d30c664226b2e8 100644 (file)
@@ -48,21 +48,13 @@ rondo = \notes      \relative c'
        R2.*7
        \mark  "A"
        c4.\p \grace {
-<<<<<<< mozart-hrn3-rondo.ly
-  \override Stem  #'stroke-style = #"grace"
-=======
   \override Stem   #'stroke-style = #"grace"
->>>>>>> 1.15
    e16( 
   \revert Stem #'stroke-style }
   d8[) c d]
        c4 r8 r4 r8
        e4. \grace {
-<<<<<<< mozart-hrn3-rondo.ly
-  \override Stem  #'stroke-style = #"grace"
-=======
   \override Stem   #'stroke-style = #"grace"
->>>>>>> 1.15
    g16( 
   \revert Stem #'stroke-style }
   f8[) e f]
@@ -180,11 +172,7 @@ rondo = \notes     \relative c'
        
        << d2.(\trill
          { s2  \grace {
-<<<<<<< mozart-hrn3-rondo.ly
-  \override Stem  #'stroke-style = #"grace"
-=======
   \override Stem   #'stroke-style = #"grace"
->>>>>>> 1.15
      c16[ d] 
   \revert Stem #'stroke-style }
  } >>
index 2a1fcf6e777e844787657df30e2cdc455756f5e4..d2eb5696bb118164214a4e189b53cb58c8c8a6d9 100644 (file)
@@ -1,25 +1,37 @@
-
 \header {
-    
     texidoc = "Rests under beams are only moved if necessary."
-
 }
 
 \version "2.1.22"
 
+fig =  \notes \relative c' {
+    <a c e>8[ r <c e a> r <e a c> r <a c e>]  r |
+}
+
+                        
 \score {
-    \new Staff
-    \notes {
-       \stemUp
-       \transpose c c' {
-           c''8[ r8 c''8 c''8]
-           c8[ r8 c8 c8]
-           c8[ r8 r8 c'''8]    
-           \stemDown
-           c8[ r8 c8 c8]
-           c''8[ r8 c''8 c''8]
-           c'8[ r8 r8 c'''8]
-       }
-    }
-    \paper { raggedright = ##t }
+  \notes \relative c' \new Staff {
+     \fig 
+      \transpose c c,  \fig
+      \new Voice { \stemUp \transpose c f  \fig }
+      <<
+         \\
+         \transpose f c \fig
+      >>
+      
+      <<
+         { \transpose c c' \fig }
+         \\
+         {} 
+      >>
+      
+      << \transpose c c' \fig \\
+         \transpose f c \fig
+      >>
+  }
+
+  \paper {
+      raggedright = ##t
+  }
 }
+
diff --git a/input/regression/rest-collision-default.ly b/input/regression/rest-collision-default.ly
deleted file mode 100644 (file)
index d0aa5c4..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-\version "2.1.22"
-
-\header
-{
-texidoc = "Rests in collisions sit opposite of the note if no direction is
-  specified for the voice containing the rest."
-}
-
-
-    \paper { raggedright= ##t }
-
-\score{\notes\relative c''
-       \context Staff <<
-\time 2/4
-\new Voice {
-    r4 }
-\new Voice {\voiceTwo
-b8  }>>}
-
index 55ebe73f8b5098de85a378e692ff06c32c5046fa..ae19a08bd838f9db232066b8d5b0c4879b49d2eb 100644 (file)
@@ -14,5 +14,5 @@ staff-spaces. "
      << { r8 g''4 g8 r g4 g8 } \\
             { d,4    r   d   r   } >>
   }
-
+  \paper { raggedright = ##t }
 }
index 42e8a00498988441e69c839264e752573a39c747..c9a0c06e10867b97246e7cac35aa9c4fe322bc8f 100644 (file)
@@ -12,7 +12,7 @@
 
 Column_x_positions::Column_x_positions ()
 {
-  satisfies_constraints_b_ = false;
+  satisfies_constraints_ = true;
   force_ = 0;
 }
 
index 8f7b0ec9f896776a7474519568ffa2e04b6c2353..2a4f0f14ac8489d24d60a8bb950fc75262b61005 100644 (file)
@@ -140,7 +140,7 @@ Gourlay_breaking::do_solve () const
            we couldn't satisfy the constraints, this won't get better
            if we add more columns, so we get on with the next one
          */
-         if (!cp.satisfies_constraints_b_)
+         if (!cp.satisfies_constraints_)
            break ; 
        }
 
@@ -197,7 +197,7 @@ Gourlay_breaking::do_solve () const
       Column_x_positions cp (optimal_paths[final_breaks[i]].line_config_);
       
       lines.push (cp);
-      if(!cp.satisfies_constraints_b_)
+      if(!cp.satisfies_constraints_)
        warning ("Could not find line breaking that satisfies constraints.");
     }
   return lines;
@@ -247,7 +247,7 @@ Gourlay_breaking::combine_demerits (Column_x_positions const &prev,
   Real demerit = abs (this_one.force_) +  abs (prev.force_ - this_one.force_)
     + break_penalties;
   
-  if (!this_one.satisfies_constraints_b_)
+  if (!this_one.satisfies_constraints_)
      {
        /*
         If it doesn't satisfy constraints, we make this one
index e5ae4f92bd67589d3dbf98a45f14806b062cc40d..6fd40ad5faf6edacdd3236f708bfbe04c698fb22 100644 (file)
@@ -18,7 +18,7 @@ struct Column_x_positions
   
   Array<Real> config_;
   Real force_;
-  bool satisfies_constraints_b_;
+  bool satisfies_constraints_;
 
   Column_x_positions ();
 };
index b9d7d467705fd4fd74f9ab0c44313b0cedda91e8..1760eb3474eab8065bd857c042b605c02f97f6e6 100644 (file)
@@ -22,19 +22,13 @@ class Note_column
 {
 public:
   static int shift_compare (Grob *const &, Grob*const&);
-  
-  /** The relative position of the "voice" containing this
-    chord. Normally this would be the same as the stem direction,
-
-    JUNKME.
-    */
-
-  static Grob * accidentals (Grob*me);
   static Direction dir (Grob*me);
+  static Grob * accidentals (Grob*me);
   static Slice head_positions_interval (Grob* me);
   static Direction static_dir (Grob*);
   static void translate_rests (Grob*me,int dy);
-  static Grob * first_head (Grob*me);
+  static Grob *first_head (Grob*me);
+  static Grob *get_rest (Grob*me);
   static void set_stem (Grob*me,Grob*);
   static void set_dotcol (Grob*me,Grob*);
   static void add_head (Grob*me,Grob*);
index 88e9a74eed713caff0a2a0b78b35216f5fb8e8c4..b6f256af8654dc212c55d9444e87c44f8c5c7dc2 100644 (file)
@@ -20,6 +20,7 @@ public:
   static String glyph_name (Grob*, int, String); 
   static SCM brew_internal_stencil (SCM);
   DECLARE_SCHEME_CALLBACK (extent_callback, (SCM,SCM));
+  DECLARE_SCHEME_CALLBACK (polyphonic_offset_callback, (SCM,SCM));
   DECLARE_SCHEME_CALLBACK (print, (SCM ));
 };
 #endif // REST_HH
index 4395912c2fb81c0e97cf3e5f10aed172a8d7a3ef..6c2a16f5d823d027233cfc9cbff276528d80ecb1 100644 (file)
@@ -18,7 +18,7 @@ struct Spring_description
 {
   Real ideal_;
   Real hooke_;
-  bool active_b_;
+  bool is_active_;
 
   Real block_force_;
 
@@ -50,10 +50,10 @@ struct Simple_spacer
   Real range_stiffness (int, int) const;
   void add_rod (int l, int r, Real dist);
   Real range_ideal_len (int l, int r)const;
-  Real active_blocking_force ()const;
+  Real is_activelocking_force ()const;
   Real configuration_length ()const;
   void set_active_states ();
-  bool active_b () const;
+  bool is_active () const;
 };
 
 #endif /* SIMPLE_SPACER_HH */
index d92a3b19a46c6b18dca27337a090db796d2875d6..1d711642a3904dd02705e3893accdae81cfef020 100644 (file)
 #include "note-head.hh"
 #include "accidental-placement.hh"
 
+/*
+  TODO: figure out if we can prune this class. This is just an
+  annoying layer between (rest)collision & (note-head + stem)
+ */
+
 bool
 Note_column::has_rests (Grob*me) 
 {
@@ -82,31 +87,48 @@ Note_column::set_stem (Grob*me,Grob * stem)
   Axis_group_interface::add_element (me, stem);
 }
 
+
+Grob*
+Note_column::get_rest (Grob*me)
+{
+  return unsmob_grob (me->get_grob_property ("rest"));
+}
+  
 void
 Note_column::add_head (Grob*me,Grob *h)
 {
+  bool both = false;
   if (Rest::has_interface (h))
     {
-      me->set_grob_property ("rest", h->self_scm ());
+      if (gh_pair_p (me->get_grob_property ("note-heads")))
+       both = true;
+      else
+       me->set_grob_property ("rest", h->self_scm ());
     }
   else if (Note_head::has_interface (h))
     {
+      if (unsmob_grob (me->get_grob_property ("rest")))
+       both = true;
       Pointer_group_interface::add_grob (me, ly_symbol2scm ("note-heads"),h);
     }
-  Axis_group_interface::add_element (me, h);
+
+  if (both)
+    me->warning ("Can't have rests and note heads together on a stem.");
+  else
+    Axis_group_interface::add_element (me, h);
 }
 
 /**
-  translate the rest symbols vertically by amount DY_I, but only if
+  translate the rest symbols vertically by amount DY, but only if
   they have no staff-position set.
 */
 void
-Note_column::translate_rests (Grob*me,int dy_i)
+Note_column::translate_rests (Grob*me, int dy)
 {
   Grob * r = unsmob_grob (me->get_grob_property ("rest"));
   if (r && !gh_number_p (r->get_grob_property ("staff-position")))
     {
-      r->translate_axis (dy_i * Staff_symbol_referencer::staff_space (r)/2.0, Y_AXIS);
+      r->translate_axis (dy * Staff_symbol_referencer::staff_space (r)/2.0, Y_AXIS);
     }
 }
 
index af3d0ecc8903c03a8a1d5e05e7c009abe2981e5f..893a781501311fceb53f3ccc938ee01fc50c6cc2 100644 (file)
@@ -7,9 +7,8 @@
 */
 
 #include "warn.hh"
-#include "rest-collision.hh"
 #include "engraver.hh"
-#include "note-collision.hh"
+#include "rest-collision.hh"
 #include "note-column.hh"
 
 class Rest_collision_engraver : public Engraver
@@ -25,8 +24,6 @@ public:
   TRANSLATOR_DECLARATIONS(Rest_collision_engraver);  
 };
 
-
-
 Rest_collision_engraver::Rest_collision_engraver ()
 {
   rest_collision_ =0;
@@ -38,7 +35,9 @@ Rest_collision_engraver::process_acknowledged_grobs ()
 {
   if (rest_collision_
       || note_columns_.is_empty ()
-      || !rest_count_)
+      || !rest_count_ 
+      || (note_columns_.size () == rest_count_
+         && rest_count_  < 2))
     return;
 
   rest_collision_ = make_item ("RestCollision");
index e80e0d9cd751c57a7d59aa00d8b7a24191b8d436..a0f7e744913840dc110440a3fc7fb3f762361c01 100644 (file)
@@ -18,6 +18,7 @@
 #include "group-interface.hh"
 #include "staff-symbol-referencer.hh"
 #include "duration.hh"
+#include "directional-element-interface.hh"
 
 MAKE_SCHEME_CALLBACK (Rest_collision,force_shift_callback,2);
 SCM
@@ -39,6 +40,8 @@ Rest_collision::force_shift_callback (SCM element_smob, SCM axis)
   return gh_double2scm (0.0);
 }
 
+
+
 void
 Rest_collision::add_column (Grob*me,Grob *p)
 {
@@ -49,7 +52,7 @@ Rest_collision::add_column (Grob*me,Grob *p)
     only add callback for the rests, since we don't move anything
     else.
 
- (not?)
   (not?)
   */
   p->add_offset_callback (Rest_collision::force_shift_callback_proc, Y_AXIS);
   p->set_grob_property ("rest-collision", me->self_scm ());
@@ -77,7 +80,6 @@ head_characteristic (Grob * col)
   TODO: look at horizontal-shift to determine ordering between rests
   for more than two voices.
 
-  TODO: look at previous note to determine vertical position?
   
  */
 SCM
@@ -92,7 +94,16 @@ Rest_collision::do_shift (Grob *me)
     {
       Grob * e = unsmob_grob (ly_car (s));
       if (unsmob_grob (e->get_grob_property ("rest")))
-       rests.push (e);
+       {
+         /*
+           Ignore rests under beam.
+          */
+         Grob* st = unsmob_grob (e->get_grob_property ("stem"));
+         if (st && unsmob_grob (st->get_grob_property ("beam")))
+           continue;
+         
+         rests.push (e);
+       }
       else
        notes.push (e);
     }
@@ -103,126 +114,105 @@ Rest_collision::do_shift (Grob *me)
 
      [todo]
      * decide not to print rest if too crowded?
-
-     * ignore rests under beams.
    */
 
-  // no rests to collide
-  if (!rests.size ())
+  /*
+    no partners to collide with
+   */
+  if (rests.size () + notes.size () < 2)
     return SCM_UNSPECIFIED;
 
-  // no partners to collide with
-  if (rests.size () + notes.size () < 2)
-    {
-      if (rests.size () == 1
-         && Note_column::dir (rests[0]))
-       {
-         Note_column::translate_rests (rests[0],
-                                       4 * Note_column::dir (rests[0]));
-       }
-    }
-  // meisjes met meisjes
+
+  Real staff_space = Staff_symbol_referencer::staff_space (me);
+  /*
+    only rests
+  */
   if (!notes.size ()) 
     {
-      SCM characteristic = head_characteristic (rests[0]);
-      int i = 1;
-      for (; i < rests.size (); i++)
-       {
-         if (!gh_equal_p (head_characteristic (rests[i]), characteristic))
-           break;
-       }
 
       /*
-       If all durations are the same, we'll check if there are more
-       rests than maximum-rest-count.
-       Otherwise (different durations), we'll try to display them all
- (urg: all 3 of them, currently).
+       This is incomplete: in case of an uneven number of rests, the
+       center one should be centered on the staff.
        */
-      int display_count;
-      SCM s = me->get_grob_property ("maximum-rest-count");
-      if (i == rests.size ()
-         && gh_number_p (s) && gh_scm2int (s) < rests.size ())
+      Drul_array< Link_array <Grob > > ordered_rests;
+      for (int i= 0; i < rests.size (); i++)
        {
-         display_count = gh_scm2int (s);
-         for (; i > display_count; i--)
+         Grob * r = Note_column::get_rest (rests[i]);
+         
+         Direction d = get_grob_direction (r);
+         if (d)
            {
-             Grob* r = unsmob_grob (rests[i-1]->get_grob_property ("rest"));
-             if (r)
-               {
-                 Grob * d = unsmob_grob (r->get_grob_property ("dot"));
-                 if (d)
-                   d->suicide();
-                 r->suicide ();
-               }
-             rests[i-1]->suicide ();
+             ordered_rests[d].push (rests[i]);
            }
+         else
+           rests[d]->warning (_("rest direction not set.  Cannot resolve collision."));
        }
-      else
-       display_count = rests.size ();
+
+      Direction d =  LEFT;
+      do {
+       ordered_rests[d].sort (Note_column::shift_compare);
+      } while (flip (&d) != LEFT);
       
-      /*
-       Ugh. Should have minimum dist.
+      if (ordered_rests[UP].size () + ordered_rests[DOWN].size () < 2)
+       return SCM_UNSPECIFIED;
 
-       Ugh. What do we do if we have three different rests?
-       
-       */
-      int dy = display_count > 2 ? 6 : 4; // FIXME Should get dims from table.
-      if (display_count > 1)
-       {
-         Direction d0 = Note_column::dir (rests[0]);
-         Direction d1 = Note_column::dir (rests[1]);     
+      Grob *common = common_refpoint_of_array (ordered_rests[DOWN], me, Y_AXIS);
+      common =  common_refpoint_of_array (ordered_rests[UP], common, Y_AXIS);
 
-         if (!d0 && !d1)
-           {
-             d0= UP;
-             d1 = DOWN;
-           }
-         else if (!d0)
-           d0 = - d1;
-         else if (!d1)
-           d1 = -d0;
-               
-         Note_column::translate_rests (rests[0],d0 *dy);       
-         Note_column::translate_rests (rests[1], d1 *dy);
+      Real diff = 
+       (ordered_rests[DOWN].top ()->extent (common, Y_AXIS)[UP]
+        - ordered_rests[UP].top ()->extent (common, Y_AXIS)[DOWN]) /staff_space;
+
+      if (diff > 0)
+       {
+         int amount_down = (int) ceil (diff / 2); 
+         diff -= amount_down;
+         Note_column::translate_rests (ordered_rests[DOWN].top (),
+                                       -2 * amount_down);
+         if (diff > 0)
+           Note_column::translate_rests (ordered_rests[UP].top (),
+                                         2 * int (ceil (diff)));
        }
+
+      do {
+       for (int i = ordered_rests[d].size () -1; i-- > 0;)
+         {
+           Real last_y = ordered_rests[d][i+1]->extent (common, Y_AXIS)[d];
+           Real y = ordered_rests[d][i]->extent (common, Y_AXIS)[-d];
+
+           Real diff = d * ((last_y - y) /staff_space);
+           if (diff > 0)
+             Note_column::translate_rests (ordered_rests[d][i],d * (int) ceil (diff) * 2);
+         }
+      } while (flip (&d) != LEFT);
     }
-  // meisjes met jongetjes
   else 
     {
+      /*
+       Rests and notes.
+       */
       if (rests.size () > 1)
        {
          warning (_ ("too many colliding rests"));
        }
       Grob * rcol = rests[0];
+      Grob *common = common_refpoint_of_array (notes, rcol, Y_AXIS);
+      
       Direction dir = Note_column::dir (rests[0]);
-
-      if (!dir)
-       {
-         dir = - Note_column::dir (notes[0]);
-       }
-      Grob * r = unsmob_grob (rcol->get_grob_property ("rest"));
-      Interval restdim = r->extent (r, Y_AXIS);        // ??
-
+      
+      Interval restdim = rcol->extent (common, Y_AXIS);
       if (restdim.is_empty ())
        return SCM_UNSPECIFIED;
       
-
       Real staff_space = Staff_symbol_referencer::staff_space (rcol);
-
       Real minimum_dist = robust_scm2double (me->get_grob_property ("minimum-distance"), 1.0) * staff_space;
 
-
-      Grob *common = common_refpoint_of_array (notes, rcol, Y_AXIS);
-
       Interval notedim;
       for (int i = 0; i < notes.size (); i++) 
        {
          notedim.unite (notes[i]->extent (common, Y_AXIS));
        }
 
-      Interval inter (notedim);
-      inter.intersect (restdim);
-
       Real dist =
        minimum_dist +  dir * (notedim[dir] - restdim[-dir]) >? 0;
 
@@ -239,7 +229,7 @@ Rest_collision::do_shift (Grob *me)
       // move by whole spaces inside the staff.
       if (discrete_dist < stafflines+1)
        discrete_dist = int (ceil (discrete_dist / 2.0)* 2.0);
-      
+
       Note_column::translate_rests (rcol,dir * discrete_dist);
     }
   return SCM_UNSPECIFIED;
index 0d01e41155905843a35a73d5bbca751716700de1..ffc32784b59b2034c1b25227c87daed2a3222abe 100644 (file)
@@ -13,6 +13,7 @@
 #include "dots.hh"
 #include "paper-score.hh"
 #include "staff-symbol-referencer.hh"
+#include "directional-element-interface.hh"
 
 // -> offset callback
 MAKE_SCHEME_CALLBACK (Rest,after_line_breaking,1);
@@ -159,7 +160,17 @@ Rest::extent_callback (SCM smob, SCM ax)
   return ly_interval2scm (unsmob_stencil (m)->extent (a));
 }
 
-
+MAKE_SCHEME_CALLBACK (Rest,polyphonic_offset_callback,2);
+SCM
+Rest::polyphonic_offset_callback (SCM smob, SCM)
+{
+  Grob* me = unsmob_grob (smob);
+  Direction d = get_grob_direction (me);
+  Real off = 2* d ;
+  if(off)
+    off *= Staff_symbol_referencer::staff_space (me);
+  return gh_double2scm (off);
+}
 
 ADD_INTERFACE (Rest,"rest-interface",
   "a rest",
index 91aa56a2b644a70b56760c2f5677c16d005e038c..ff044d676ef7aa04a263681ca2a4757e33fdb5d9 100644 (file)
@@ -122,7 +122,7 @@ Simple_spacer::range_stiffness (int l, int r) const
   Real den =0.0;
   for (int i=l; i < r; i++)
     {
-      if (springs_[i].active_b_)
+      if (springs_[i].is_active_)
        den += 1 / springs_[i].hooke_;
     }
 
@@ -130,11 +130,11 @@ Simple_spacer::range_stiffness (int l, int r) const
 }
 
 Real
-Simple_spacer::active_blocking_force () const
+Simple_spacer::is_activelocking_force () const
 {
   Real bf = - infinity_f; 
   for (int i=0; i < springs_.size (); i++)
-    if (springs_[i].active_b_)
+    if (springs_[i].is_active_)
       {
        bf = bf >? springs_[i].block_force_;
       }
@@ -152,10 +152,10 @@ Simple_spacer::set_active_states ()
 {
   /* float comparison is safe, since force is only copied.  */
   for (int i=0 ; i <springs_.size (); i++)
-    if (springs_[i].active_b_
+    if (springs_[i].is_active_
        && springs_[i].block_force_ >= force_)
       {
-       springs_[i].active_b_ = false;
+       springs_[i].is_active_ = false;
        active_count_ --; 
       }
 }   
@@ -171,7 +171,7 @@ Simple_spacer::configuration_length () const
 }
 
 bool
-Simple_spacer::active_b () const
+Simple_spacer::is_active () const
 {
   return active_count_; 
 }
@@ -179,9 +179,9 @@ Simple_spacer::active_b () const
 void
 Simple_spacer::my_solve_linelen ()
 {
-  while (active_b ())
+  while (is_active ())
     {
-      force_ = active_blocking_force ();
+      force_ = is_activelocking_force ();
       Real conf = configuration_length ();
 
       if (conf < line_len_)
@@ -198,9 +198,9 @@ Simple_spacer::my_solve_linelen ()
 void
 Simple_spacer::my_solve_natural_len ()
 {
-  while (active_b ())
+  while (is_active ())
     {
-      force_ = active_blocking_force () >? 0.0;
+      force_ = is_activelocking_force () >? 0.0;
 
       if (force_ < 1e-8) // ugh.,
        break;
@@ -264,7 +264,7 @@ Simple_spacer::add_columns (Link_array<Grob> const &icols)
 
       if (isinf (desc.hooke_))
        {
-         desc.active_b_ = false;
+         desc.is_active_ = false;
          springs_.push (desc);
        }
       else
@@ -295,8 +295,6 @@ Simple_spacer::add_columns (Link_array<Grob> const &icols)
            }
        }
     }
-
-
 }
 
 /*
@@ -317,21 +315,17 @@ Simple_spacer::add_columns (Link_array<Grob> const &icols)
 void
 Simple_spacer::solve (Column_x_positions *positions, bool ragged) 
 {
-  /*
-    TODO: should support natural length on only the last line.
-   */
-  ragged = ragged || (line_len_ < 0) ;
   if (ragged)
     my_solve_natural_len ();
   else
     my_solve_linelen ();
 
   positions->force_ = force_;
+  
   /*
     We used to have a penalty for compression, no matter what, but that
     fucked up wtk1-fugue2 (taking 3 full pages.)
   */
-  
   positions->config_.push (indent_);
   for (int i=0; i <springs_.size (); i++)
     {
@@ -346,16 +340,26 @@ Simple_spacer::solve (Column_x_positions *positions, bool ragged)
     For raggedright, we must have a measure of music density: this is
     to prevent lots of short lines (which all have force = 0).
     */
-  if (ragged && line_len_ > 0)
+  if (ragged)
     {
       Real len = positions->config_.top ();
-      positions->force_ = (line_len_ - len) *  active_springs_stiffness ();
+      if (line_len_ - len  >= 0)
+       positions->force_ = ((line_len_ - len) *  active_springs_stiffness ());
+      else
+       {
+         positions->force_ = 0.0;
+         /*
+           Don't go past end-of-line in ragged right.
+          */
+         positions->satisfies_constraints_ = false;
+       }
     }
 
 
   positions->cols_ = spaced_cols_;
   positions->loose_cols_ = loose_cols_;
-  positions->satisfies_constraints_b_ = (line_len_ < 0) || active_b ();
+  positions->satisfies_constraints_ =
+    positions->satisfies_constraints_ && is_active ();
 
   /*
     Check if breaking constraints are met.
@@ -375,11 +379,8 @@ Simple_spacer::solve (Column_x_positions *positions, bool ragged)
       
     }
 
-  positions->satisfies_constraints_b_ =
-    positions->satisfies_constraints_b_ && break_satisfy;
-
-  if (ragged && force_ < 0)
-    positions->satisfies_constraints_b_ = false;
+  positions->satisfies_constraints_ =
+    positions->satisfies_constraints_ && break_satisfy;
 }
 
 /****************************************************************/
@@ -388,7 +389,7 @@ Spring_description::Spring_description ()
 {
   ideal_ =0.0;
   hooke_ =0.0;
-  active_b_ = true;
+  is_active_ = true;
   block_force_ = 0.0;
 }
 
@@ -402,7 +403,7 @@ Spring_description::sane_b () const
 Real
 Spring_description::length (Real f) const
 {
-  if (!active_b_)
+  if (!is_active_)
     f = block_force_;
   return ideal_ + f / hooke_ ;
 }
index 22c9c253fdf2a410abe67bc9876eb96fcfd0c6e8..9c141f4d1bf1dc526d6d954f5cbf4040a34b23e5 100644 (file)
        (X-extent-callback . ,Rest::extent_callback)
        (Y-extent-callback . ,Rest::extent_callback)            
        (print-function . ,Rest::print)
-       (Y-offset-callbacks . (,Staff_symbol_referencer::callback)) 
+       (Y-offset-callbacks . (,Staff_symbol_referencer::callback
+                              ,Rest::polyphonic_offset_callback
+                              ))
        (minimum-distance . 0.25)
        (meta . (
                 (interfaces . (font-interface
index aa7f5e9343556db1c721eb7db1f31f4caf05345d..29194e3326b4745a73b41641282b59553a2c04e8 100644 (file)
@@ -215,7 +215,7 @@ i.e.  this is not an override"
    ))
 
 (define direction-polyphonic-grobs
-   '(Tie Slur Script TextScript Stem Dots DotColumn))
+   '(Tie Rest Slur Script TextScript Stem Dots DotColumn))
 
 (define-public (make-voice-props-set n)
   (make-sequential-music
index bde1e8cfe553a89982ab2ad3cc1af47ed1ceca09..df73f4079355c43941af61566d32808dcc35f30c 100644 (file)
@@ -151,10 +151,10 @@ def select_voice (name, rol):
                                      check_clef(value)
                              elif keyword == "name":
                                      value = re.sub ('\\\\','\\\\\\\\', value)
-                                     voices_append ("\\property Staff.instrument = %s\n" % value )
+                                     voices_append ("\\set Staff.instrument = %s\n" % value )
                                      __main__.part_names = 1
                              elif keyword == "sname" or keyword == "snm":
-                                     voices_append ("\\property Staff.instr = %s\n" % value )
+                                     voices_append ("\\set Staff.instr = %s\n" % value )
 
              else:
                      break
@@ -183,7 +183,7 @@ def dump_default_bar (outf):
        """
        Nowadays abc2ly outputs explicits barlines (?)
        """
-       outf.write ("\n\\property Score.defaultBarType=\"empty\"\n")
+       outf.write ("\n\\set Score.defaultBarType=\"empty\"\n")
 
 
 def dump_slyrics (outf):
@@ -605,12 +605,12 @@ def try_parse_header_line (ln, state):
                        if a == 'C':
                                if not state.common_time:
                                        state.common_time = 1
-                                       voices_append ("\\property Staff.TimeSignature \\override #\'style = #'C\n")
+                                       voices_append ("\\override Staff.TimeSignature #\'style = #'C\n")
                                a = '4/4'
                        if a == 'C|':
                                if not state.common_time:
                                        state.common_time = 1
-                                       voices_append ("\\property Staff.TimeSignature \\override #\'style = #'C\n")
+                                       voices_append ("\\override Staff.TimeSignature #\'style = #'C\n")
                                a = '2/2'
                        if not length_specified:
                                set_default_len_from_time_sig (a)
index 34a1c9e01860e2aba8d835a20512973af5d97052..307f16c449a4726f82ca6bc714b1e58e537e058b 100644 (file)
@@ -559,7 +559,7 @@ class Staff:
 
                                        str = string.join (map (lambda x: '(volta %s)' % x, strs))
                                        
-                                       e = e + ' \\property Score.repeatCommands =  #\'(%s) ' % str
+                                       e = e + ' \\set Score.repeatCommands =  #\'(%s) ' % str
 
                                if g.force_break:
                                        e = e + ' \\break '