]> git.donarmstrong.com Git - lilypond.git/commitdiff
release: 1.5.7 release/1.5.7
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Thu, 16 Aug 2001 23:42:35 +0000 (01:42 +0200)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Thu, 16 Aug 2001 23:42:35 +0000 (01:42 +0200)
=========

* Use Cygwin included Python; drop Windows Python and workarounds.

* Include make/lilypond.mandrake.spec (unchecked!) and README.mandrake.

* Comment out two non existing examples in regression test, add one
missing from 1.5.5 distribution.

* Revert silly grace-with-braces stuff in tutorial.

* Add short crescendo bug to input/bugs.

* Update and bit more verbose download instructions in INSTALL,
  fix some links on ftp.lilypond.org.

1.5.6.h

30 files changed:
CHANGES
Documentation/header.html.in
Documentation/regression-test.tely
Documentation/user/invoking.itexi
INSTALL.txt
VERSION
input/regression/grace-sync.ly
input/regression/spacing-folded-clef.ly [new file with mode: 0644]
input/regression/spacing-grace.ly [new file with mode: 0644]
input/regression/spacing-very-tight.ly
lily/grace-iterator.cc
lily/grace-music.cc
lily/include/column-x-positions.hh
lily/include/new-spacing-spanner.hh
lily/include/separating-group-spanner.hh
lily/include/simple-spacer.hh
lily/line-of-score.cc
lily/music-sequence.cc
lily/new-spacing-spanner.cc
lily/separating-group-spanner.cc
lily/separating-line-group-engraver.cc
lily/sequential-music-iterator.cc
lily/simple-spacer.cc
lily/spaceable-grob.cc
make/out/lilypond.lsm
make/out/lilypond.mandrake.spec [new file with mode: 0644]
make/out/lilypond.redhat.spec
make/out/lilypond.suse.spec
scm/grob-description.scm
scripts/update-lily.py

diff --git a/CHANGES b/CHANGES
index c31ac0c08804874586dd1d4d672c21f77313d5cd..843016ab2a1d3cac62dde3850030bbc43a6ed989 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -15,9 +15,39 @@ missing from 1.5.5 distribution.
 * Update and bit more verbose download instructions in INSTALL, 
   fix some links on ftp.lilypond.org.
 
+
+1.5.6.hwn1
+==========
+
+* Grace note bugfixes.
+
+* Move staff-adjacency detection (for the spacing engine) to
+Separating_group_spanner.
+
+* Loose column support: clef changes, key changes may be folded underneath
+notes in a different staff. See input/regression/spacing-folded-clef.ly.
+Changes were made to
+
+  - Separating_group_spanner: decide which columns are loose
+
+  - Simple_spacer, New_spacing_spanner: only look at non-loose columns.
+
+  - Line_of_score: set horizontal positions for loose columns.
 1.5.6
 =====
 
+* Loose column support: clef changes, key changes may be folded
+underneath notes in a different staff; changes made to
+
+  - Separating_group_spanner: decide which columns are loose
+
+  - Simple_spacer, New_spacing_spanner: only look at non-loose columns.
+
+  - Line_of_score: set horizontal positions for loose columns.
+
+
 1.4.6.mb1
 =========
 
index e7ff35eb8f60472ca74c32a8d9fc9724df61f74a..45f93fb319af4223e9e25091d8943d1d27a261b6 100644 (file)
@@ -70,10 +70,10 @@ which substitutes some @AT_VARIABLES@ as well.
       </td></tr>
       <tr><td><font size="-1">
        <a href="@TOP@Documentation/out-www/index.html#mailing-lists">About the lists</a><br>
-       <a href="http://mail.gnu.org/mailman/listinfo/gnu-music-discuss/">Discussion</a><br>
-        <a href="http://mail.gnu.org/mailman/listinfo/help-gnu-music/">Help</a><br>
-        <a href="http://mail.gnu.org/mailman/listinfo/bug-gnu-music/">Bugs</a><br>
-        <a href="http://mail.gnu.org/mailman/listinfo/info-gnu-music/">Announcements</a><br>
+       <a href="http://mail.gnu.org/mailman/listinfo/lilypond-user/">Using LilyPond</a><br>
+        <a href="http://mail.gnu.org/mailman/listinfo/lilypond-devel/">Developing LilyPond</a><br>
+        <a href="http://mail.gnu.org/mailman/listinfo/bug-lilypond/">Reporting bugs</a><br>
+        <a href="http://mail.gnu.org/mailman/listinfo/info-lilypond/">Announcements</a><br>
        <br>
       </font></td></tr>
     <tr><td bgcolor="#e8e8ff"><b>Sites</b></td></tr>
index 95d2347def37cbebcf05ccb29cc136d541433875..03f562a563ba719f0b39bbc7fc2e0183835b14c8 100644 (file)
@@ -92,7 +92,8 @@ Grace note do weird things with timing. Fragile.
 
 @lilypondfile[printfilename]{grace-nest4.ly}
 
-@lilypondfile[printfilename]{grace-nest.ly}
+@lilypondfile[printfilename]{grace-nest5.ly}
+@lilypondfile[printfilename]{grace-nest1.ly}
 
 @lilypondfile[printfilename]{grace-start.ly}
 
@@ -212,9 +213,9 @@ Grace note do weird things with timing. Fragile.
 
 @lilypondfile[printfilename]{spacing-loose.ly}
 
-@c not found @lilypondfile[printfilename]{spacing-accidentals.ly}
+@lilypondfile[printfilename]{spacing-accidental.ly}
 
-@c not found @lilypondfile[printfilename]{spacing-accidentals-staff.ly}
+@lilypondfile[printfilename]{spacing-accidental-staffs.ly}
 
 @lilypondfile[printfilename]{lyrics-bar.ly}
 
index 583d9219c2ad0924c94e0a86a140fb807100a1b6..08392660562399ab85c95df28de6042a526ef08b 100644 (file)
@@ -25,7 +25,7 @@ sequentially.
 
 @item -f,--format=@var{format}
 Output format for sheet music. Choices are @code{tex} (for @TeX{}
-output), @code{ps} (for PostScript), @code{scm} (for a Scheme
+output), @code{pdftex} for PDF@TeX input, @code{ps} (for PostScript), @code{scm} (for a Scheme
 dump), and @code{as} (for ASCII-art).
 
 @c TODO: TFMFONTS
index 22e59ba08c786630ccde8b0561bc391cfaa1ce5e..65765b509d36b6f6acb701bf8229caeb71096be2 100644 (file)
@@ -8,8 +8,8 @@ Table of Contents
 
 INSTALL - compiling and installing GNU LilyPond
   Downloading
-    source code
-    Binaries
+    Source code
+    Precompiled binaries
     Upgrading
   Requirements
     Compilation
@@ -49,7 +49,7 @@ version (1.2) reside on the GNU servers
 latest odd numbered version (1.3), whose webpages are on the lilypond
 site (http://www.lilypond.org/).
 
-source code
+Source code
 -----------
 
    If you want to compile LilyPond from source, download here:
@@ -62,21 +62,39 @@ source code
    * at `lilypond.org' `ftp://ftp.lilypond.org/pub/LilyPond/' by FTP and
      `http://www.lilypond.org/ftp/' by HTTP.
 
-Binaries
---------
+   Of course, if your platform supports LilyPond, such as Debian
+GNU/Linux, FreeBSD, OpenBSD or NetBSD, you're encouraged to use the
+native build from source drill.
+
+   For Red Hat Linux and SuSE Linux, `.spec' files are included in the
+tarball; see instructions below.
+
+Precompiled binaries
+--------------------
+
+   If you want to track bleeding edge development, try:
 
-   Binaries are available, but are not updated for every version
+   * Debian GNU/Linux
+     (ftp://ftp.debian.org/debian/pool/main/l/lilypond/) usually has
+     the latest binaries for the most useful stable and development
+     versions, while
+
+   * Mandrake Cooker
+     (http://rpmfind.net/linux/mandrake/cooker/contrib/RPMS/) also
+     provides fairly recent versions.
+
+   Binaries are made available for other popular platforms, but as we
+need to compile them ourselves, they are not updated for every version
 released.
+
    * Red Hat i386
      (ftp://ftp.cs.uu.nl/pub/GNU/LilyPond/binaries/RedHat/RPMS/)
 
-   * LinuxPPC (ftp://ftp.lilypond.org/pub/LilyPond/binaries/linuxppc/)
-
-   * Debian GNU/Linux
-     (ftp://ftp.debian.org/debian/pool/main/l/lilypond/)
+   * SuSE (ftp://ftp.lilypond.org/pub/LilyPond/binaries/SuSE)
 
-   * Windows Testing (http://www.lilypond.org/gnu-windows/)
+   * LinuxPPC (ftp://ftp.lilypond.org/pub/LilyPond/binaries/linuxppc/)
 
+   * Windows (http://www.lilypond.org/gnu-windows/)
 
 Upgrading
 ---------
@@ -356,7 +374,11 @@ Mandrake
 --------
 
    Some binaries are available at rpmfind.net. Refer to
-`ftp://ftp.rpmfind.net/linux/Mandrake-devel/cooker/contrib/RPMS/'.
+`http://rpmfind.net/linux/mandrake/cooker/contrib/RPMS/'.
+
+   You can also compile a RPM for Mandrake yourself.  A spec file is in
+`make/out/lilypond.mandrake.spec', see the instructions for building
+the Red Hat RPM.
 
 Debian GNU/Linux
 ----------------
@@ -366,6 +388,15 @@ running `apt-get' as root:
 
        apt-get install lilypond lilypond-doc
 
+   You can also compile the .deb for Debian yourself, do:
+
+       apt-get -b source lilypond
+
+   If you're real impatient, you may even do:
+
+       cd lilypond-x.y.z   # a previous version
+             uscan               # download and build latest directly from upstream
+
    Debian's TeX installation is a bit short on memory, you may want to
 increase it like this:
      --- /etc/texmf/texmf.cnf.dpkg     Sun Jan 28 14:12:14 2001
diff --git a/VERSION b/VERSION
index af67bd19bcb3c4e888220c9fbc878d82dc9a935c..7a3efe2e82a2cdf3a22bf3c0daee84069754bec5 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1,8 +1,8 @@
 PACKAGE_NAME=LilyPond
 MAJOR_VERSION=1
 MINOR_VERSION=5
-PATCH_LEVEL=6
-MY_PATCH_LEVEL=jcn2
+PATCH_LEVEL=7
+MY_PATCH_LEVEL=
 
 # use the above to send patches: MY_PATCH_LEVEL is always empty for a
 # released version.
index 69efcd5df6192061bb04c56ff30bbcbde60806b8..8e44e8257093a98ba1897a2ac5182e09946fd9b0 100644 (file)
@@ -6,7 +6,7 @@
         \grace  c8
   c4 c4 }
                \context Staff = SB { c2 \clef bass
- \grace { [dis8 ( d8] }
+ \grace { [dis8 ( d8] \key es\major  }
 
   ) c4 c4 }
                \context Staff = SC { c2 c4 c4 \bar "|." }
diff --git a/input/regression/spacing-folded-clef.ly b/input/regression/spacing-folded-clef.ly
new file mode 100644 (file)
index 0000000..287d634
--- /dev/null
@@ -0,0 +1,12 @@
+\header {
+texidoc = "A clef can be folded below notes in a different staff, if
+this doesn't disrupt the flow of the notes."
+}
+
+\score { \notes \relative c'' <
+\context Staff = SA  { c4 [c16 c c  c] c4 c4 }
+       \context Staff = SB { \clef bass c,2 \clef treble  c'2 }
+       >
+
+       \paper { linewidth = -1. }
+       }
diff --git a/input/regression/spacing-grace.ly b/input/regression/spacing-grace.ly
new file mode 100644 (file)
index 0000000..3b4b32b
--- /dev/null
@@ -0,0 +1,9 @@
+\header {
+  texidoc = "Grace note spacing. Should be tuned? "
+}
+       
+\score {
+ \notes \context Voice \relative c'' { \grace { [c16 d] } c4 }
+  \paper { linewidth =-1. }
+
+}
index b6fdb49970d7ed09e7a392c56fef00efe239ca25..79808154d664f5d0bea27bb9fa4faffb6f7d227e 100644 (file)
@@ -1,11 +1,15 @@
 \version "1.3.148"
 \header {
+texidoc = "
  When tightly spaced, hinterfleisch -> 0.
  Stems may touch the bar lines, opposite stems may touch eachother.
  We need a mininum of about a note-width/interline space in these
  situations, so that in tightly spaced music all vertical lines
  are about equally spaced.
-}
+
+ "
+ }
 \score {
        \notes \relative c''{ 
                r1 e4 f, e' f,
index fde8167730ed9ea7e9f4d74ee3b4ab20881d6790..8357e2c3ad2d70f92f8b8b75335c8cf1cd5dfbef 100644 (file)
@@ -25,7 +25,7 @@ void
 Grace_iterator::process (Moment m)
 {
   Moment main ;
-  main.main_part_ = music_length_.grace_part_ + m.grace_part_;
+  main.main_part_ = - start_mom_.grace_part_ + m.grace_part_;
   Music_wrapper_iterator::process (main);
 }
 
@@ -43,7 +43,7 @@ Grace_iterator::pending_moment () const
   Moment cp =Music_wrapper_iterator::pending_moment();
 
   Moment pending;
-  pending.grace_part_ =  cp.main_part_- music_length_.grace_part_ ;
+  pending.grace_part_ =  start_mom_.grace_part_ + cp.main_part_;
 
   return pending;
 }
index 27c88c6f7b66ab283946a1b23ca5ee1dad9f9c34..8fd0ff0d0b8c6cb0ab8da2346de6cec0bf2b8dd3 100644 (file)
@@ -19,17 +19,18 @@ Grace_music::compress (Moment m)
 Moment
 Grace_music::length_mom () const
 {
-  Moment l = Music_wrapper::length_mom ();
-  Moment gl;
-  gl.grace_part_ = l.main_part_ + l.grace_part_ ;
-  return gl;
+  Moment m ;
+  return m;
 }
 
 
 Moment
 Grace_music::start_mom () const
 {
-  return - length_mom ();
+  Moment l = Music_wrapper::length_mom ();
+  Moment gl;
+  gl.grace_part_ = -(l.main_part_ + l.grace_part_ );
+  return gl;
 }
 
 Grace_music::Grace_music ()
index e8688d3bcdfed2b776ca091cff411669aef48e3f..830fa867ab9d239f32b4c54999a17c21cb788d28 100644 (file)
@@ -14,6 +14,8 @@
 struct Column_x_positions
 {
   Link_array<Grob> cols_;
+  Link_array<Grob> loose_cols_;
+  
   Array<Real> config_;
   Real force_f_;
   bool satisfies_constraints_b_;
index 0af0bc5737eea1271f548c906cc72ab4503dab46..ac1ac8069601db3d82dbf9119da53c120da249c2 100644 (file)
@@ -17,7 +17,7 @@ class New_spacing_spanner
 {
 public:
   static void set_interface (Grob*);
-  static void do_measure (Grob*,Link_array<Grob> const &) ;
+  static void do_measure (Grob*,Link_array<Grob> *) ;
   static void stretch_to_regularity (Grob*, Array<Spring> *, Link_array<Grob> const &);
   static void breakable_column_spacing (Item* l, Item *r);
   DECLARE_SCHEME_CALLBACK (set_springs, (SCM ));
index 1b8baf9ea931f1fa8b8faf03e08cb65e15ced9b0..c394821df4856c69b17ecda16129fdf2f46dc873 100644 (file)
@@ -19,6 +19,7 @@ public:
   static void find_rods (Item*, SCM);
   static void set_interface (Grob*);
   static bool has_interface (Grob*);
+  static void find_musical_sequences (Grob*);
   DECLARE_SCHEME_CALLBACK (set_spacing_rods, (SCM ));
 };
 
index 2f13a107d21d609f78fc463efa299774170b95f2..8115e25587d81df6221b0d83babe6b5187602397 100644 (file)
@@ -63,7 +63,8 @@ struct Spring_description
 struct Simple_spacer
 {
   Array<Spring_description> springs_;
-
+  Link_array<Grob> spaced_cols_;
+  Link_array<Grob> loose_cols_;
   Real force_f_;
   Real indent_f_;
   Real line_len_f_;
index 9c70f62adb98d0e8ee5c2200826270b801a93927..a6cff9391f916419535ea82c8548613d17d6a838 100644 (file)
@@ -123,6 +123,66 @@ Line_of_score::output_lines ()
     }
 }
 
+/*
+  Find the loose columns in POSNS, and drape them around the columns
+  specified in BETWEEN-COLS.  */
+void
+set_loose_columns (Line_of_score* which, Column_x_positions const *posns)
+{
+  for (int i = 0; i<posns->loose_cols_.size (); i++)
+    {
+      int divide_over = 1;
+      Item *loose = dynamic_cast<Item*> (posns->loose_cols_[i]);
+      Paper_column* col = dynamic_cast<Paper_column*> (loose);
+      
+      if (col->line_l_)
+       continue;
+
+      
+      Item * left = 0;
+      Item * right = 0;
+      while (1)
+       {
+         
+         SCM between = loose->get_grob_property ("between-cols");
+         if (!gh_pair_p (between))
+           break;
+
+         if (!left)
+           {
+             left = dynamic_cast<Item*> (unsmob_grob (gh_car (between)));
+             left = left->column_l ();
+           }
+         divide_over ++;       
+         loose = dynamic_cast<Item*> (unsmob_grob (gh_cdr (between)));
+         loose = loose->column_l ();
+       }
+
+      right = loose;
+
+      Real rx = right->relative_coordinate (right->parent_l (X_AXIS), X_AXIS);
+      Real lx = left->relative_coordinate (left->parent_l (X_AXIS), X_AXIS);
+
+      int j = 1;
+      loose = col;
+      while (1)
+       {
+         SCM between = loose->get_grob_property ("between-cols");
+         if (!gh_pair_p (between))
+           break;
+
+         Paper_column *thiscol = dynamic_cast<Paper_column*> (loose);
+
+         thiscol->line_l_ = which;
+         thiscol->translate_axis (lx + j*(rx - lx)/divide_over, X_AXIS);
+
+         j ++; 
+         loose = dynamic_cast<Item*> (unsmob_grob (gh_cdr (between)));
+       }
+      
+    }
+}
+
 // const?
 void
 Line_of_score::break_into_pieces (Array<Column_x_positions> const &breaking)
@@ -142,7 +202,7 @@ Line_of_score::break_into_pieces (Array<Column_x_positions> const &breaking)
          c[j]->translate_axis (breaking[i].config_[j],X_AXIS);
          dynamic_cast<Paper_column*> (c[j])->line_l_ = line_l;
        }
-      
+      set_loose_columns (line_l, &breaking[i]);
       broken_into_l_arr_.push (line_l);
     }
 }
index a8e9e76fa52a8f7088de2594b16974fad58093c1..1df990d42b5aca513341b4a765c1c78ebded1b78 100644 (file)
@@ -86,8 +86,6 @@ Music_sequence::cumulative_length () const
   last_len.grace_part_ = Rational (0);
   cumulative += last_len;
 
-  cumulative += - first_start ();
-  
   return  cumulative;
 }
 
@@ -105,12 +103,10 @@ Music_sequence::maximum_length () const
   for (SCM s = music_list (); gh_pair_p (s);  s = gh_cdr (s))
     {
       Music * m = unsmob_music (gh_car (s));
-      Moment l = m->length_mom () + m->start_mom ();
+      Moment l = m->length_mom ();
       dur = dur >? l;
     }
 
-  dur -= minimum_start ();
-  
   return dur;
 }
 int
@@ -175,14 +171,9 @@ Music_sequence::first_start () const
     {
       Music * mus = unsmob_music (gh_car (s));
       Moment l = mus->length_mom ();
-
-      if (l.main_part_)
-       return mus->start_mom ();
-      else if (l.grace_part_)
-       {
-         m.grace_part_ = - l.grace_part_; 
-         return m;
-       }
+      Moment s = mus->start_mom ();
+      if (l.to_bool () || s.to_bool ())
+       return s;
     }
   return m;
 }
index b67c373fcb705a5fdbb0111564e9edf8c71fafaa..4ed9c7afde66510381b40af35b75844290ea9d59 100644 (file)
@@ -39,7 +39,7 @@ New_spacing_spanner::set_interface (Grob*me)
   
  */
 void
-New_spacing_spanner::do_measure (Grob*me, Link_array<Grob> const & cols) 
+New_spacing_spanner::do_measure (Grob*me, Link_array<Grob> *cols) 
 {
   Moment shortest;
   Moment mean_shortest;
@@ -50,12 +50,18 @@ New_spacing_spanner::do_measure (Grob*me, Link_array<Grob> const & cols)
   Moment base_shortest_duration = *unsmob_moment (me->get_grob_property ("maximum-duration-for-spacing"));
   shortest.set_infinite (1);
 
+  for (int i = cols->size(); i--;)
+    {
+      if (gh_pair_p (cols->elem(i)->get_grob_property ("between-cols")))
+       cols->del (i);
+    }
+  
   int n = 0;
-  for (int i =0 ; i < cols.size (); i++)  
+  for (int i =0 ; i < cols->size (); i++)  
     {
-      if (Paper_column::musical_b (cols[i]))
+      if (Paper_column::musical_b (cols->elem (i)))
        {
-         Moment *when = unsmob_moment (cols[i]->get_grob_property  ("when"));
+         Moment *when = unsmob_moment (cols->elem (i)->get_grob_property  ("when"));
 
          /*
            ignore grace notes for shortest notes.
@@ -63,7 +69,7 @@ New_spacing_spanner::do_measure (Grob*me, Link_array<Grob> const & cols)
          if (when && when->grace_part_)
            continue;
          
-         SCM  st = cols[i]->get_grob_property ("shortest-starter-duration");
+         SCM  st = cols->elem (i)->get_grob_property ("shortest-starter-duration");
          Moment this_shortest = *unsmob_moment (st);
          shortest = shortest <? this_shortest;
          if (!mean_shortest.main_part_.infty_b ())
@@ -77,37 +83,14 @@ New_spacing_spanner::do_measure (Grob*me, Link_array<Grob> const & cols)
   Array<Spring> springs;
 
   Item * first_col = 0;
-  for (int i= 0; i < cols.size () - 1; i++)
+  for (int i= 0; i < cols->size () - 1; i++)
     {
-      Item * l = dynamic_cast<Item*> (cols[i]);
+      Item * l = dynamic_cast<Item*> (cols->elem (i));
 
       if (!first_col && Paper_column::musical_b (l))
        first_col = l;
 
-      SCM between = cols[i]->get_grob_property ("between-cols"); 
-      if (gh_pair_p (between)
-         && i > 0
-         && i < cols.size ()-1
-         && (gh_cdr (between) != cols[i+1]->self_scm ()
-          || gh_car (between) != cols[i-1]->self_scm ()) 
-         )
-       continue ;
-      
-      int j = i+1;
-      for (; j < cols.size () - 1; j++)
-       {
-         if  (Paper_column::musical_b (cols[j]))
-           break;
-
-         SCM between = cols[j]->get_grob_property ("between-cols");
-         if (!gh_pair_p (between))
-           continue;
-
-         if (gh_car (between) == cols[i]->self_scm () )
-           break ;
-       }
-
-      Item * r =  dynamic_cast<Item*> (cols[j]);
+      Item * r =  dynamic_cast<Item*> (cols->elem (i+1));
       Paper_column * lc = dynamic_cast<Paper_column*> (l);
       Paper_column *rc = dynamic_cast<Paper_column*> (r);
 
@@ -370,7 +353,7 @@ New_spacing_spanner::get_duration_space (Grob*me, Moment d, Moment shortest)
 
 Real
 New_spacing_spanner::note_spacing (Grob*me, Grob *lc, Grob *rc,
-                              Moment shortest) 
+                                  Moment shortest) 
 {
   Moment shortest_playing_len = 0;
   SCM s = lc->get_grob_property ("shortest-playing-duration");
@@ -391,15 +374,32 @@ New_spacing_spanner::note_spacing (Grob*me, Grob *lc, Grob *rc,
       shortest = 1;
     }
   Moment delta_t = Paper_column::when_mom (rc) - Paper_column::when_mom (lc);
-  Real dist = get_duration_space (me, shortest_playing_len, shortest);
+  Real dist = 0.0;
 
+  if (delta_t.main_part_)
+    {
+      dist = get_duration_space (me, shortest_playing_len, shortest);
+      dist *= (double) (delta_t.main_part_ / shortest_playing_len.main_part_);
+    }
+  else if (delta_t.grace_part_)
+    {
+      dist = get_duration_space (me, shortest, shortest);
 
+      Real grace_fact = 1.0;
+      SCM gf = me->get_grob_property ("grace-space-factor");
+      if (gh_number_p (gf))
+       grace_fact = gh_scm2double (gf);
+
+      dist *= grace_fact; 
+    }
+
+#if 0
   /*
-    ugh: 0.1 is an arbitrary distance.
+    TODO: figure out how to space grace notes.
    */
-  dist *= (double) (delta_t.main_part_ / shortest_playing_len.main_part_)
-    + 0.1 * (double) (delta_t.grace_part_ / shortest_playing_len.main_part_);
 
+  dist *= 
+    +  grace_fact * (double) (delta_t.grace_part_ / shortest_playing_len.main_part_);
 
 
   Moment *lm = unsmob_moment (lc->get_grob_property ("when"));
@@ -412,7 +412,7 @@ New_spacing_spanner::note_spacing (Grob*me, Grob *lc, Grob *rc,
       else if (!rm->grace_part_ && lm->grace_part_)
        dist *= 0.7;
     }
-
+#endif
   
   return dist;
 }
@@ -483,7 +483,7 @@ New_spacing_spanner::set_springs (SCM smob)
       if (Item::breakable_b (sc))
         {
          Link_array<Grob> measure (all.slice (j, i+1));          
-          do_measure (me, measure);
+          do_measure (me, &measure);
          j = i;
         }
     }
index d102e35bdb4c36945d71eb7424d673c5ceab69a9..9a1c85d51b07622c68c0ac75dc02d127809282dd 100644 (file)
@@ -96,6 +96,7 @@ Separating_group_spanner::set_spacing_rods (SCM smob)
        find_rods (rb, gh_cdr (s));
     }
 
+  find_musical_sequences (me);
 #if 0
   /*
     TODO; restore this.
@@ -126,6 +127,84 @@ Separating_group_spanner::add_spacing_unit (Grob* me ,Item*i)
 }
 
 
+void
+Separating_group_spanner::find_musical_sequences (Grob *me)
+{
+  Item *last = 0;
+  Item *llast = 0;
+  for (SCM s = me->get_grob_property ("elements");
+       gh_pair_p (s); s = gh_cdr (s))
+    {
+      Item *it = dynamic_cast<Item*> (unsmob_grob (gh_car (s)));
+      if (last)
+       {       
+         Item *lcol = last->column_l ();
+         Item *col = it->column_l ();
+
+         int lrank = Paper_column::rank_i (lcol);
+         int rank = Paper_column ::rank_i (col);
+
+         bool mus = Paper_column::musical_b (col);
+         bool lmus = Paper_column::musical_b (lcol);
+
+         if ((lrank - rank == 2) && lmus && mus)
+           {
+             SCM seq = col->get_grob_property ("spacing-sequence");
+             col->set_grob_property ("spacing-sequence",
+                                     gh_cons (gh_cons (it->self_scm (), last->self_scm ()), seq));
+           }
+
+         if (llast && !Paper_column::breakable_b (last))
+           {
+             Item *llcol = llast->column_l ();
+             int llrank = Paper_column::rank_i (llcol);
+             bool llmus= Paper_column::musical_b (llcol);
+             if (llrank - lrank == 1
+                 && lrank - rank == 1
+                 && llmus && !lmus && mus)
+               {
+                 SCM seq = col->get_grob_property ("spacing-sequence");
+                 col->set_grob_property ("spacing-sequence",
+                                         gh_cons (gh_cons (it->self_scm (), last->self_scm ()), seq));
+               }
+             else if (!lmus)
+               {
+                 SCM between = lcol->get_grob_property ("between-cols");
+
+                 if (!gh_pair_p (between))
+                   {
+                     between = gh_cons (it->self_scm (), llast->self_scm ());
+                     lcol ->set_grob_property ("between-cols", between);
+                   }
+
+                 Item * left
+                   = dynamic_cast<Item*> (unsmob_grob (gh_car (between)));
+                 if(Paper_column::rank_i (left->column_l ()) < rank)
+                   gh_set_car_x (between, col->self_scm());
+                 
+                 Item * right
+                   = dynamic_cast<Item*> (unsmob_grob (gh_cdr (between)));
+                 if (Paper_column::rank_i (right->column_l ()) > llrank )
+                   gh_set_cdr_x (between, llcol->self_scm ());
+               }
+           }
+       }
+
+      llast = last;
+      last = it;
+    }
+}
+
+#if 0
+void
+Separating_group_spanner::set_loose_rods ()
+{
+  // loose columns should  also generate minimum distances.
+  // TODO
+}
+#endif
+
+
 void
 Separating_group_spanner::set_interface (Grob*)
 {
index 0de0777d9d31a2eb43e9b92ebb0e75a93220b758..6c3811b8e2323d4a15aa4246277c13474f0cebc0 100644 (file)
@@ -20,12 +20,6 @@ protected:
   Item * break_malt_p_;
   Item * musical_malt_p_;
 
-  /*
-    malt_p_ : we used to have a Single_malt_grouping_item
-    
-   */
-  Item * last_step_musical_malt_p_;
-  
   Spanner * sep_span_p_;
   
   virtual void acknowledge_grob (Grob_info);
@@ -39,7 +33,6 @@ public:
 
 Separating_line_group_engraver::Separating_line_group_engraver ()
 {
-  last_step_musical_malt_p_ = 0;
   sep_span_p_ = 0;
   break_malt_p_ = 0;
   musical_malt_p_ =0;
@@ -102,26 +95,12 @@ Separating_line_group_engraver::stop_translation_timestep ()
     }
 
   if (musical_malt_p_)
-      {
+    {
       Separating_group_spanner::add_spacing_unit (sep_span_p_, musical_malt_p_);
-
-      if (last_step_musical_malt_p_)
-       {
-         Paper_column *col = 
-           last_step_musical_malt_p_->column_l();
-         SCM newtup = gh_cons (last_step_musical_malt_p_->self_scm (),
-                               musical_malt_p_->self_scm ());
-         col->set_grob_property ("spacing-sequence",
-                                 gh_cons (newtup,
-                                          col->get_grob_property ("spacing-sequence")));
-       }
-      
       typeset_grob (musical_malt_p_);
-      }
-  last_step_musical_malt_p_ = musical_malt_p_;
-  musical_malt_p_ =0;
-
+    }
 
+  musical_malt_p_ =0;
 }
 
 
index 5d8ce337de7cbd604b3c928fa350c2e826aa022a..f37320caf078f2bb08157ec126e80100ecaef471 100644 (file)
@@ -97,8 +97,8 @@ get_grace_fixups (SCM cursor)
   for (; gh_pair_p (cursor); cursor = gh_cdr (cursor))
     {
       Music * mus = unsmob_music (gh_car (cursor));
-      Moment l =mus->length_mom ();
       Moment s = mus->start_mom ();
+      Moment l =mus->length_mom () - s;
 
       if (s.grace_part_)
        {
@@ -154,7 +154,7 @@ Sequential_music_iterator::construct_children ()
 void
 Sequential_music_iterator::next_element ()
 {
-  Moment len =iter_p_->music_length_mom ();
+  Moment len =iter_p_->music_length_mom () - iter_p_->music_start_mom ();
   assert (!grace_fixups_  || grace_fixups_->start_ >= here_mom_);
   
   if (len.main_part_ && grace_fixups_ &&
@@ -245,8 +245,10 @@ Sequential_music_iterator::get_music (Moment until)const
       
       Moment m = 0;
       for (SCM i = nm; gh_pair_p (i); i = gh_cdr (i))
-       m = m >? unsmob_music (gh_car (i))->length_mom ();
-
+       {
+         Music *mus=unsmob_music (gh_car (i));
+         m = m >? (mus->length_mom () - mus->start_mom ());
+       }
       if (m > Moment (0))
        break ;
       else
@@ -256,6 +258,8 @@ Sequential_music_iterator::get_music (Moment until)const
   
   return s;
 }
+
+
 /*
   Skip events till UNTIL. We don't do any other side effects such as
   descending to child iterator contexts, because they might depend on
@@ -291,9 +295,7 @@ Sequential_music_iterator::process (Moment until)
          /*
            do the stuff/note/rest preceding a grace.
           */
-         iter_p_->process (iter_p_->music_length_mom ()+ 
-                           iter_p_->music_start_mom ());
-
+         iter_p_->process (iter_p_->music_length_mom ());
        }
       else
        iter_p_->process (until - here_mom_ + iter_p_->music_start_mom ());
index 0340596ad3b0168e01be82028e209f3a79143165..6671a6edb675d7bbcd19ac6d1fe7ee242d76b779 100644 (file)
@@ -167,11 +167,19 @@ Simple_spacer::my_solve_natural_len ()
 void
 Simple_spacer::add_columns (Link_array<Grob> cols)
 {
+  for (int i =  cols.size (); i--;)
+    if (gh_pair_p (cols[i]->get_grob_property ("between-cols")))
+      {
+       loose_cols_.push (cols[i]);
+       cols.del (i);
+      }
+  
+  spaced_cols_ = cols;
   for (int i=0; i < cols.size () - 1; i++)
     {
-      SCM spring_params = SCM_UNDEFINED;
+      SCM spring_params = SCM_EOL;
       for (SCM s = cols[i]->get_grob_property ("ideal-distances");
-          spring_params == SCM_UNDEFINED && gh_pair_p (s);
+          !gh_pair_p (spring_params) && gh_pair_p (s);
           s = gh_cdr (s))
        {
          Grob *other = unsmob_grob (gh_caar (s));
@@ -182,7 +190,7 @@ Simple_spacer::add_columns (Link_array<Grob> cols)
        }
 
       Spring_description desc;
-      if (spring_params != SCM_UNDEFINED)
+      if (gh_pair_p (spring_params))
        {
          desc.ideal_f_ = gh_scm2double (gh_car (spring_params));
          desc.hooke_f_ = gh_scm2double (gh_cdr (spring_params));
@@ -199,6 +207,9 @@ Simple_spacer::add_columns (Link_array<Grob> cols)
       if (!desc.sane_b ())
        {
          programming_error ("Insane spring found. Setting to unit spring.");
+
+         cout << "columns " << Paper_column::rank_i (cols[i])
+              << " " << Paper_column::rank_i (cols[i+1]) << endl;
          desc.hooke_f_ = 1.0;
          desc.ideal_f_ = 1.0;
        }
@@ -240,7 +251,9 @@ Simple_spacer::solve (Column_x_positions *positions) const
     {
       positions->config_.push (positions->config_.top () + springs_[i].length (force_f_));
     }
-
+  positions->cols_ = spaced_cols_;
+  positions->loose_cols_ = loose_cols_;
+  
   positions->satisfies_constraints_b_ = (line_len_f_ < 0) || active_b ();
 }
 
index 8aa3209f28e3c269ee3a3cf17c3431208b6308e5..26bf4e8066b9165b7c54c81f05605dd298bd0141 100644 (file)
@@ -43,6 +43,8 @@ void
 Spaceable_grob::add_spring (Grob*me, Grob * p, Real d, Real strength)
 {
   SCM mins = me->get_grob_property ("ideal-distances");
+  
+  
   SCM newdist= gh_double2scm (d);
   for (SCM s = mins; gh_pair_p (s); s = gh_cdr (s))
     {
@@ -60,7 +62,6 @@ Spaceable_grob::add_spring (Grob*me, Grob * p, Real d, Real strength)
 }
 
 
-
 void
 Spaceable_grob::remove_interface (Grob*me)
 {
index 2fbafa4e25d1a88b3b490120fe71e91f1a77f943..e04509eff27dbdb138c19e5a6a70664638d54405 100644 (file)
@@ -1,15 +1,15 @@
 Begin3
 Title: LilyPond
-Version: 1.5.6
-Entered-date: 14AUG01
+Version: 1.5.7
+Entered-date: 17AUG01
 Description: @BLURB@
 Keywords: music notation typesetting midi fonts engraving
 Author: hanwen@cs.uu.nl (Han-Wen Nienhuys)
        janneke@gnu.org (Jan Nieuwenhuizen)
 Maintained-by: hanwen@stack.nl (Han-Wen Nienhuys)
 Primary-site: sunsite.unc.edu /pub/Linux/apps/sound/convert
-       1000k lilypond-1.5.6.tar.gz 
+       1000k lilypond-1.5.7.tar.gz 
 Original-site: ftp.cs.uu.nl /pub/GNU/LilyPond/development/
-       1000k lilypond-1.5.6.tar.gz 
+       1000k lilypond-1.5.7.tar.gz 
 Copying-policy: GPL
 End
diff --git a/make/out/lilypond.mandrake.spec b/make/out/lilypond.mandrake.spec
new file mode 100644 (file)
index 0000000..471b69a
--- /dev/null
@@ -0,0 +1,169 @@
+%define name lilypond
+%define version 1.5.7
+%define release 1mdk
+
+Name: %{name}
+Summary: A program for printing sheet music.
+Version: %{version}
+Release: %{release}
+Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-%{version}.tar.gz
+## Patch0: lilypond-GNUmakefile.in.patch.bz2
+License: GPL
+Group: Publishing
+URL: http://www.lilypond.org/
+BuildRoot: %{_tmppath}/%{name}-buildroot
+BuildRequires: guile guile-devel
+Requires: tetex
+
+%description
+LilyPond is a music typesetter.  It produces beautiful sheet music using a
+high level description file as input.  Lilypond is part of the GNU project.
+LilyPond is split into two packages.  The package "lilypond" provides the
+core package, containing the utilities for converting the music source
+(.ly) files into printable output.  The package "lilypond-extras" provides
+the full documentation, example .ly files for various features and the
+Mutopia project files (musical equivalent of the Gutenberg project - see
+http://www.mutopiaproject.org for details).
+If you are new to lilypond, you will almost certainly want to install the
+"lilypond-extras" package in addition to the "lilypond" package.
+You may also wish to investigate the "denemo" package, which provides a
+graphical front end to lilypond.
+
+See the file README.first for more information.
+
+
+%package extras
+Summary: LilyPond documentation, examples and Mutopia files.
+Group: Publishing
+Requires: lilypond
+
+%description extras
+The documentation of LilyPond, both in HTML and PostScript, along with
+example input files and the files from the Mutopia project.
+
+%prep
+%setup -a 1
+## % patch0 -b .orig
+
+%build
+# DO NOT use % { configure } , it hardcodes all paths, runs libtool,
+# so we can't do make prefix=/tmp/ install.
+# -- not sure what this comment means; it's a relic from the PPC spec file -- mbrown@fensystems.co.uk
+./configure --disable-checking --disable-debugging --enable-printing --prefix=%{_prefix} --disable-optimise --enable-shared
+make
+make local-web
+
+%install
+
+# Create installation root folders
+rm -rf $RPM_BUILD_ROOT
+RPM_DOC_ROOT=$RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
+rm -rf $RPM_DOC_ROOT
+mkdir -p $RPM_DOC_ROOT
+
+make prefix="$RPM_BUILD_ROOT%{_prefix}" install
+%{find_lang} %{name}
+
+# Move info and man files into correct locations
+mv $RPM_BUILD_ROOT/usr/info $RPM_BUILD_ROOT%{_infodir}
+mv $RPM_BUILD_ROOT/usr/man $RPM_BUILD_ROOT%{_mandir}
+
+# Move TeX font files into system TeX tree locations
+mkdir -p $RPM_BUILD_ROOT%{_datadir}/texmf/fonts/{afm,source,tfm}
+mv $RPM_BUILD_ROOT%{_datadir}/lilypond/afm $RPM_BUILD_ROOT%{_datadir}/texmf/fonts/afm/lilypond
+mv $RPM_BUILD_ROOT%{_datadir}/lilypond/mf $RPM_BUILD_ROOT%{_datadir}/texmf/fonts/source/lilypond
+mv $RPM_BUILD_ROOT%{_datadir}/lilypond/tfm $RPM_BUILD_ROOT%{_datadir}/texmf/fonts/tfm/lilypond
+mkdir -p $RPM_BUILD_ROOT%{_datadir}/texmf/tex
+mv $RPM_BUILD_ROOT%{_datadir}/lilypond/tex $RPM_BUILD_ROOT%{_datadir}/texmf/tex/lilypond
+
+# Copy emacs mode files into %{_datadir}/lilypond/emacs
+mkdir -p $RPM_BUILD_ROOT%{_datadir}/lilypond/emacs
+cp *.el $RPM_BUILD_ROOT%{_datadir}/lilypond/emacs/
+
+# Create documentation tree in %{_docdir}
+mkdir -p $RPM_DOC_ROOT/HTML
+tar -C $RPM_DOC_ROOT/HTML -xzf out/web.tar.gz
+ln -s HTML/input $RPM_DOC_ROOT/Examples
+ln -s HTML/input/test $RPM_DOC_ROOT/Tricks
+ln -s HTML/mutopia $RPM_DOC_ROOT/Mutopia
+mkdir -p $RPM_DOC_ROOT/Printable
+ln -s ../HTML/Documentation/user/out-www/lilypond.ps.gz $RPM_DOC_ROOT/Printable/Manual.ps.gz
+ln -s ../HTML/Documentation/user/out-www/glossary.ps.gz $RPM_DOC_ROOT/Printable/Glossary.ps.gz
+cp AUTHORS.txt CHANGES COPYING DEDICATION FAQ.txt NEWS README.txt VERSION README.mandrake $RPM_DOC_ROOT/README.first
+
+%post
+touch /tmp/.lilypond-install
+rm `find /var/lib/texmf -name 'feta*pk -print' -or -name 'feta*tfm -print'` /tmp/.lilypond-install
+/usr/bin/mktexlsr
+%_install_info lilypond.info
+%_install_info lilypond-internals.info
+
+%preun
+%_remove_install_info lilypond.info
+%_remove_install_info lilypond-internals.info
+
+%postun
+/usr/bin/mktexlsr
+
+
+%files -f %{name}.lang
+%defattr(-,root,root,0755)
+%{_bindir}/*
+%{_datadir}/lilypond/
+%{_datadir}/texmf/fonts/afm/lilypond
+%{_datadir}/texmf/fonts/source/lilypond
+%{_datadir}/texmf/fonts/tfm/lilypond
+%{_datadir}/texmf/tex/lilypond
+
+%doc %{_infodir}/*
+%doc %{_mandir}/man1/*
+%doc %{_docdir}/%{name}-%{version}/AUTHORS.txt
+%doc %{_docdir}/%{name}-%{version}/CHANGES
+%doc %{_docdir}/%{name}-%{version}/COPYING
+%doc %{_docdir}/%{name}-%{version}/DEDICATION
+%doc %{_docdir}/%{name}-%{version}/FAQ.txt
+%doc %{_docdir}/%{name}-%{version}/NEWS
+%doc %{_docdir}/%{name}-%{version}/README.txt
+%doc %{_docdir}/%{name}-%{version}/VERSION
+%doc %{_docdir}/%{name}-%{version}/README.first
+
+%files extras
+%defattr(-,root,root,0755)
+%doc %{_docdir}/%{name}-%{version}/HTML
+%doc %{_docdir}/%{name}-%{version}/Mutopia
+%doc %{_docdir}/%{name}-%{version}/Printable
+%doc %{_docdir}/%{name}-%{version}/Tricks
+%doc %{_docdir}/%{name}-%{version}/Examples
+
+
+%changelog
+* Fri Jun 01 2001 Lenny Cartier <lenny@mandrakesoft.com> 1.4.2-1mdk
+- updated by Michael Brown <mbrown@linux-mandrake.com> :
+       - Upgraded to 1.4.2
+       - Changed URL
+       - Removed /etc/profile.d scripts: all TeX bits are now located properly
+       - Rearranged documentation
+       - Tidied spec file
+       - Updated README.first
+
+* Mon Feb 26 2001 Lenny Cartier <lenny@mandrakesoft.com> 1.3.129-1mdk
+- added in contribs by Michael Brown <mbrown@fensystems.co.uk> :
+       - Removed info files completely (couldn't get info reader to read them)
+       - TODO: Get this to work at some point (in the meantime, use documentation in lilypond-extras)
+
+* Sat Feb 17 2001 Michael Brown <mbrown@fensystems.co.uk>
+- Moved TeX font folders into the system TeX tree (this ensures that the /var/lib/texmf font cache is used instead of current folder)
+- Added mktexlsr to post-install and post-uninstall scripts
+- Patched scripts in /etc/profile.d to reflect changes to font locations
+- Added QuickStart guide and Points to note sections to README.first (well worth reading)
+- Fixed install-info and uninstall-info sections to use Mandrake's RPM macros :-)
+
+* Tue Feb 13 2001 Michael Brown <mbrown@fensystems.co.uk>
+- First Mandrake package
+- spec file heavily adapted from PowerPC contribs.
+- Note HTML documentation may contain duff links and may be incomplete.  Lots of warnings appear when building HTML docs.
+- PostScript documentation is duplicated (how do you get an rpm package to contain a symlink?)
+- Created README.first file
index 946c7b90a51a1a3b825f005c8b191e24ec638fb7..c45927288b012abb87b0cac5f3436ce21b86d0f3 100644 (file)
@@ -1,13 +1,13 @@
 %define info yes
 
 Name: lilypond
-Version: 1.5.6
+Version: 1.5.7
 Release: 1
 License: GPL
 Group: Applications/Publishing
-Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.5.6.tar.gz
+Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.5.7.tar.gz
 Summary: Create and print music notation 
-URL: http://www.cs.uu.nl/~hanwen/lilypond
+URL: http://www.lilypond.org/
 BuildRoot: /tmp/lilypond-install
 # add lots of Buildreq: flex, bison, tetex, tetex-devel, tetex-latex, texinfo
 # better prereqs: tetex-latex, python, (mpost?) etc.
index 4ff11cf3edc3db61e9ea9b480e94228dcda094d7..c18155471689ecb00a45202a6fdcb80a09209350 100644 (file)
 
 Distribution: SuSE Linux 7.0 (i386)
 Name: lilypond
-Version: 1.5.6
+Version: 1.5.7
 Release: 2
 Copyright:    GPL
 Group: Applications/Publishing
-Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.5.6.tar.gz
+Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.5.7.tar.gz
 # music notation software for.. ?
 Summary: A program for printing sheet music.
 URL: http://www.lilypond.org/
index 0a76e6263c7a4511f823999dfbf0782cbc3f2880..c24f36972381fc566585ecc88ab09e6d33b21165 100644 (file)
        (SpacingSpanner . (
                (spacing-procedure . ,Spacing_spanner::set_springs)
                (stem-spacing-correction . 0.5)
-
+               (grace-space-factor . 0.8)
 
                ;; TODO: change naming -- unintuitive
                (arithmetic-basicspace . 2.0)
index b1fdd3420f5c353920f560fc754a49b82e38c222..1d16dbdbf32c4f6fc20e12e76bf802c3beba8af0 100644 (file)
@@ -5,7 +5,8 @@
 # source file of the GNU LilyPond music typesetter
 #
 # download and rebuild latest lilypond or from specified url
-# 
+#
+
 
 '''
 TODO: