]> git.donarmstrong.com Git - lilypond.git/commitdiff
Merge branch 'master' of ssh+git://hanwen@git.sv.gnu.org/srv/git/lilypond
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Fri, 16 Feb 2007 12:09:14 +0000 (13:09 +0100)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Fri, 16 Feb 2007 12:09:14 +0000 (13:09 +0100)
20 files changed:
GNUmakefile.in
VERSION
input/regression/song-associated-voice.ly [new file with mode: 0644]
input/regression/song-basic-nonenglish.ly [new file with mode: 0644]
input/regression/song-basic.ly [new file with mode: 0644]
input/regression/song-breathe.ly [new file with mode: 0644]
input/regression/song-melisma.ly [new file with mode: 0644]
input/regression/song-reordering.ly [new file with mode: 0644]
input/regression/song-reordering2.ly [new file with mode: 0644]
input/regression/song-repetition.ly [new file with mode: 0644]
input/regression/song-skip-noword.ly [new file with mode: 0644]
input/regression/song-skip.ly [new file with mode: 0644]
input/regression/song-slurs.ly [new file with mode: 0644]
input/regression/song-splitpart.ly [new file with mode: 0644]
input/regression/song-stanzas.ly [new file with mode: 0644]
input/regression/song-tempo.ly [new file with mode: 0644]
input/regression/spanner-break-beyond-parent.ly [new file with mode: 0644]
lily/spanner.cc
scm/song.scm
scripts/etf2ly.py

index b1cc4ff6ba221ec1b1a4fd1e95495d5df14f4991..13e0f75b71b1d242eed3cb6fad83b7da06ee462d 100644 (file)
@@ -228,10 +228,12 @@ test:
        @find input ly -name '*.ly' -print |grep -v 'out.*/' | xargs grep '\\version' -L | grep -v "standard input" |sed 's/^/**** Missing version: /g' 
 
 
-test-baseline: test
+test-baseline: 
        @if  test -d .git ; then \
                $(if $(shell git diff), echo "commit before base lining" && false,true) ; \
        fi
+       $(MAKE) 
+       $(MAKE) test
        rm -rf input/regression/out-test-baseline
        mv input/regression/out-test input/regression/out-test-baseline
 
diff --git a/VERSION b/VERSION
index 3d33554f791ee212524b51950346e381e5a90511..8bac88967c5bfe2304bff5bfa9aa482aa76003ea 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1,6 +1,6 @@
 PACKAGE_NAME=LilyPond
 MAJOR_VERSION=2
 MINOR_VERSION=11
-PATCH_LEVEL=18
+PATCH_LEVEL=19
 MY_PATCH_LEVEL=
 
diff --git a/input/regression/song-associated-voice.ly b/input/regression/song-associated-voice.ly
new file mode 100644 (file)
index 0000000..d6c43b8
--- /dev/null
@@ -0,0 +1,18 @@
+\version "2.11.16"
+
+\include "festival.ly"
+
+\festival #"song-associated-voice.xml" { \tempo 4 = 100 }
+\relative c'
+{
+<< \context Voice = melody {
+     \time 3/4
+     c2 e4 g2.
+  }
+  \new Lyrics \lyricmode {
+    \set associatedVoice = #"melody"
+    play2 the4 game2.
+  } >>
+}
+#(ly:progress "song-associated-voice")
+#(ly:progress "~a" (ly:gulp-file "song-associated-voice.xml"))
diff --git a/input/regression/song-basic-nonenglish.ly b/input/regression/song-basic-nonenglish.ly
new file mode 100644 (file)
index 0000000..f1c0716
--- /dev/null
@@ -0,0 +1,11 @@
+\version "2.11.16"
+
+\include "festival.ly"
+
+\festivalsyl #"song-basic-nonenglish.xml" { \tempo 4 = 100 }
+{
+\relative { c e g r }
+\addlyrics { ov -- čá -- ci }
+}
+#(ly:progress "song-basic-nonenglish")
+#(ly:progress "~a" (ly:gulp-file "song-basic-nonenglish.xml"))
diff --git a/input/regression/song-basic.ly b/input/regression/song-basic.ly
new file mode 100644 (file)
index 0000000..fb43c9d
--- /dev/null
@@ -0,0 +1,12 @@
+\version "2.11.16"
+
+\include "festival.ly"
+
+\festival #"song-basic.xml" { \tempo 4 = 100 }
+{
+\time 3/4
+\relative { c2 r2 e4 g2. }
+\addlyrics { play the game }
+}
+#(ly:progress "song-basic")
+#(ly:progress "~a" (ly:gulp-file "song-basic.xml"))
diff --git a/input/regression/song-breathe.ly b/input/regression/song-breathe.ly
new file mode 100644 (file)
index 0000000..2556ab2
--- /dev/null
@@ -0,0 +1,12 @@
+\version "2.11.16"
+
+\include "festival.ly"
+
+\festival #"song-breathe.xml" { \tempo 4 = 100 }
+{
+\time 3/4
+\relative { c2 e \breathe g }
+\addlyrics { play the game }
+}
+#(ly:progress "song-breathe")
+#(ly:progress "~a" (ly:gulp-file "song-breathe.xml"))
diff --git a/input/regression/song-melisma.ly b/input/regression/song-melisma.ly
new file mode 100644 (file)
index 0000000..c136f2d
--- /dev/null
@@ -0,0 +1,23 @@
+\version "2.11.16"
+
+\include "festival.ly"
+
+\festival #"song-melisma.xml" { \tempo 4 = 100 }
+\relative c''
+{
+<<
+  \context Voice = "lala" {
+    \time 3/4
+    f4 g8
+    \melisma
+    f e f
+    \melismaEnd
+    e2
+  }
+  \lyricsto "lala" \new Lyrics {
+    la di __ daah
+  }
+>>
+}
+#(ly:progress "song-melisma")
+#(ly:progress "~a" (ly:gulp-file "song-melisma.xml"))
diff --git a/input/regression/song-reordering.ly b/input/regression/song-reordering.ly
new file mode 100644 (file)
index 0000000..37c9425
--- /dev/null
@@ -0,0 +1,37 @@
+\version "2.11.16"
+
+\include "festival.ly"
+
+\festival #"song-reordering.xml" { \tempo 4 = 100 }
+<<
+  \relative \context Voice = "lahlah" {
+    \set Staff.autoBeaming = ##f
+    c4
+    <<
+      \context Voice = alternative {
+        \voiceOne
+        \times 2/3 {
+          \override NoteColumn #'force-hshift = #-3
+          f8 f g
+        }
+      }
+      {
+        \voiceTwo
+        f8.[ g16]
+        \oneVoice
+      } >>
+    a8( b) c
+  }
+  \new Lyrics \lyricsto "lahlah" {
+    Ju -- ras -- sic Park
+  }
+  \new Lyrics \lyricsto "lahlah" {
+    \set associatedVoice = alternative % applies to "ran"
+    Ty --
+    ran --
+    no --
+    \set associatedVoice = lahlah % applies to "rus"
+    sau -- rus Rex
+  } >>
+#(ly:progress "song-reordering")
+#(ly:progress "~a" (ly:gulp-file "song-reordering.xml"))
diff --git a/input/regression/song-reordering2.ly b/input/regression/song-reordering2.ly
new file mode 100644 (file)
index 0000000..6a19b60
--- /dev/null
@@ -0,0 +1,38 @@
+\version "2.11.16"
+
+\include "festival.ly"
+
+\festival #"song-reordering2.xml" { \tempo 4 = 100 }
+<<
+  \relative \context Voice = "lahlah" {
+    \set Staff.autoBeaming = ##f
+    c4
+    <<
+      {
+        \voiceTwo
+        f8.[ g16]
+        \oneVoice
+      }
+      \context Voice = alternative {
+        \voiceOne
+        \times 2/3 {
+          \override NoteColumn #'force-hshift = #-3
+          f8 f g
+        }
+      }
+    >>
+    a8( b) c
+  }
+  \new Lyrics \lyricsto "lahlah" {
+    Ju -- ras -- sic Park
+  }
+  \new Lyrics \lyricsto "lahlah" {
+    \set associatedVoice = alternative % applies to "ran"
+    Ty --
+    ran --
+    no --
+    \set associatedVoice = lahlah % applies to "rus"
+    sau -- rus Rex
+  } >>
+#(ly:progress "song-reordering2")
+#(ly:progress "~a" (ly:gulp-file "song-reordering2.xml"))
diff --git a/input/regression/song-repetition.ly b/input/regression/song-repetition.ly
new file mode 100644 (file)
index 0000000..6f56910
--- /dev/null
@@ -0,0 +1,22 @@
+\version "2.11.16"
+
+\include "festival.ly"
+
+\score{
+\festival #"song-repetition.xml" { \tempo 4 = 100 }
+<<
+  \context Voice = melody \relative c' {
+    c2 e4 r4 | g2 e | c1 |
+    \context Voice = verse \repeat volta 2 {c4 d e f | g1 | }
+    a2 b | c1}
+  \lyricsto melody  \context Lyrics = mainlyrics \lyricmode {
+    do mi sol mi do
+    la si do }
+  \lyricsto verse \context Lyrics = mainlyrics \lyricmode {
+   do re mi fa sol }
+  \lyricsto verse \context Lyrics = repeatlyrics \lyricmode {
+   dodo rere mimi fafa solsol }
+>>
+}
+#(ly:progress "song-repetition")
+#(ly:progress "~a" (ly:gulp-file "song-repetition.xml"))
diff --git a/input/regression/song-skip-noword.ly b/input/regression/song-skip-noword.ly
new file mode 100644 (file)
index 0000000..9c5d954
--- /dev/null
@@ -0,0 +1,13 @@
+\version "2.11.16"
+
+\include "festival.ly"
+#(set! *skip-word* #f)
+
+\festival #"song-skip-noword.xml" { \tempo 4 = 100 }
+\relative { c c g' }
+\addlyrics {
+  twin -- \skip 4
+  kle
+}
+#(ly:progress "song-skip-noword")
+#(ly:progress "~a" (ly:gulp-file "song-skip-noword.xml"))
diff --git a/input/regression/song-skip.ly b/input/regression/song-skip.ly
new file mode 100644 (file)
index 0000000..e53a2fb
--- /dev/null
@@ -0,0 +1,12 @@
+\version "2.11.16"
+
+\include "festival.ly"
+
+\festival #"song-skip.xml" { \tempo 4 = 100 }
+\relative { c c g' }
+\addlyrics {
+  twin -- \skip 4
+  kle
+}
+#(ly:progress "song-skip")
+#(ly:progress "~a" (ly:gulp-file "song-skip.xml"))
diff --git a/input/regression/song-slurs.ly b/input/regression/song-slurs.ly
new file mode 100644 (file)
index 0000000..2e7fbdd
--- /dev/null
@@ -0,0 +1,25 @@
+\version "2.11.16"
+
+\include "festival.ly"
+
+\festival #"song-slurs.xml" { \tempo 4 = 100 }
+<<
+  \relative \context Voice = "lahlah" {
+    \set Staff.autoBeaming = ##f
+    c4
+    \slurDotted
+    f8.[( g16])
+    a4
+  }
+  \new Lyrics \lyricsto "lahlah" {
+    more slow -- ly
+  }
+  \new Lyrics \lyricsto "lahlah" {
+    \set ignoreMelismata = ##t % applies to "fas"
+    go fas -- ter
+    \unset ignoreMelismata
+    still
+  }
+>>
+#(ly:progress "song-slurs\n")
+#(ly:progress "~a" (ly:gulp-file "song-slurs.xml"))
diff --git a/input/regression/song-splitpart.ly b/input/regression/song-splitpart.ly
new file mode 100644 (file)
index 0000000..c311e9b
--- /dev/null
@@ -0,0 +1,22 @@
+\version "2.11.16"
+
+\include "festival.ly"
+
+\score{
+\festival #"song-splitpart.xml" { \tempo 4 = 100 }
+<<
+  \context Voice = "melody" {
+    \relative c' {
+      c4
+      <<
+        { \voiceOne c8 e }
+        \context Voice = splitpart { \voiceTwo c4 }
+      >>
+      \oneVoice c4 c | c
+    }
+  }
+  \new Lyrics \lyricsto "melody" { we shall not o- ver- come }
+  \new Lyrics \lyricsto "splitpart" { will }
+>> }
+#(ly:progress "song-splitpart")
+#(ly:progress "~a" (ly:gulp-file "song-splitpart.xml"))
diff --git a/input/regression/song-stanzas.ly b/input/regression/song-stanzas.ly
new file mode 100644 (file)
index 0000000..7388e95
--- /dev/null
@@ -0,0 +1,14 @@
+\version "2.11.16"
+
+\include "festival.ly"
+
+\festival #"song-stanzas.xml" { \tempo 4 = 100 }
+{
+\time 3/4
+\relative { c2 e4 g2. }
+\addlyrics { play the game }
+\addlyrics { speel het spel }
+\addlyrics { joue le jeu }
+}
+#(ly:progress "song-stanzas")
+#(ly:progress "~a" (ly:gulp-file "song-stanzas.xml"))
diff --git a/input/regression/song-tempo.ly b/input/regression/song-tempo.ly
new file mode 100644 (file)
index 0000000..9a22d54
--- /dev/null
@@ -0,0 +1,12 @@
+\version "2.11.16"
+
+\include "festival.ly"
+
+\festival #"song-tempo.xml" { \tempo 4=90 }
+{
+\time 3/4
+\relative { c4 e g \tempo 4=60 c, e g }
+\addlyrics { do re mi do re mi }
+}
+#(ly:progress "song-tempo")
+#(ly:progress "~a" (ly:gulp-file "song-tempo.xml"))
diff --git a/input/regression/spanner-break-beyond-parent.ly b/input/regression/spanner-break-beyond-parent.ly
new file mode 100644 (file)
index 0000000..ea8a783
--- /dev/null
@@ -0,0 +1,15 @@
+\header { texidoc = "Spanners parts that extend beyond their parents
+  are killed in case of line breaks."
+
+  }
+
+
+\version "2.11.16"
+
+\paper { ragged-bottom = ##t }
+
+\new Staff {
+  c1 \break c1
+} 
+\addlyrics {  welt __ }
+
index f507be680a77e29097fc57eed6179366b9a4dc51..77ee01074e5e1517f1bb8d056ad644a3f7888c9a 100644 (file)
@@ -32,22 +32,6 @@ Spanner::do_break_processing ()
   if (!left || !right)
     return;
 
-  /*
-    Check if our parent in X-direction spans equally wide
-    or wider than we do.
-  */
-  for (int a = X_AXIS; a < NO_AXES; a++)
-    {
-      if (Spanner *parent = dynamic_cast<Spanner *> (get_parent ((Axis)a)))
-       {
-         if (!parent->spanned_rank_interval ().superset (this->spanned_rank_interval ()))
-           {
-             programming_error (to_string ("Spanner `%s' is not fully contained in parent spanner `%s'.",
-                                           name ().c_str (),
-                                           parent->name ().c_str ()));
-           }
-       }
-    }
 
   if (get_system () || is_broken ())
     return;
@@ -84,6 +68,21 @@ Spanner::do_break_processing ()
       break_points.insert (break_points.begin () + 0, left);
       break_points.push_back (right);
 
+      Slice parent_rank_slice;
+      parent_rank_slice.set_full ();
+      
+      /*
+       Check if our parent in X-direction spans equally wide
+       or wider than we do.
+      */
+      for (int a = X_AXIS; a < NO_AXES; a++)
+       {
+         if (Spanner *parent = dynamic_cast<Spanner *> (get_parent ((Axis)a)))
+           {
+             parent_rank_slice.intersect (parent->spanned_rank_interval ());
+           }
+       }
+  
       for (vsize i = 1; i < break_points.size (); i++)
        {
          Drul_array<Item *> bounds;
@@ -103,6 +102,17 @@ Spanner::do_break_processing ()
              continue;
            }
 
+         bool ok = parent_rank_slice.contains (bounds[LEFT]->get_column ()->get_rank ());
+         ok = ok && parent_rank_slice.contains (bounds[RIGHT]->get_column ()->get_rank ());
+         
+         if (!ok)
+           {
+             programming_error (to_string ("Spanner `%s' is not fully contained in parent spanner. Ignoring orphaned part",
+                                           name ().c_str ()));
+             continue;
+           }
+           
+         
          Spanner *span = dynamic_cast<Spanner *> (clone ());
          span->set_bound (LEFT, bounds[LEFT]);
          span->set_bound (RIGHT, bounds[RIGHT]);
index 313480a85a04e42715eb417c08af51f8ead1ce77..8edacdf13c24d8b03d4888d5058ff0c9a3dfcc38 100644 (file)
@@ -65,7 +65,8 @@
   (let ((port (open-output-file filename)))
     (write-header port tempo)
     (write-lyrics port music)
-    (write-footer port))
+    (write-footer port)
+    (close-port port))
   #f)
 
 
index f87778d9d4fc61c93fca965328ee60cdf3b5fd45..dd431d699a22d0991b83fd893cec73a99e5d3f9f 100644 (file)
@@ -1226,8 +1226,6 @@ for f in files:
     sys.stderr.write ('Writing `%s\'' % out_filename)
     ly = e.dump()
 
-    
-    
     fo = open (out_filename, 'w')
     fo.write ('%% lily was here -- automatically converted by etf2ly from %s\n' % f)
     fo.write(ly)