]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-1.5.46
authorfred <fred>
Wed, 27 Mar 2002 02:47:32 +0000 (02:47 +0000)
committerfred <fred>
Wed, 27 Mar 2002 02:47:32 +0000 (02:47 +0000)
19 files changed:
input/regression/figured-bass.ly
input/regression/grace-volta-repeat.ly [new file with mode: 0644]
input/test/beam-dir-function.ly
lily/bar-check-iterator.cc
lily/global-translator.cc
lily/include/line-spanner.hh
lily/include/repeated-music.hh
lily/line-spanner.cc
lily/music.cc
lily/repeated-music.cc
lily/spacing-spanner.cc
lily/text-spanner.cc
ly/grace-init.ly
scm/c++.scm
scm/molecule.scm
scm/music-functions.scm
scm/music-property-description.scm
scripts/lilypond-book.py
stepmake/stepmake/toplevel-targets.make

index 47893be4fc47cef01f9a03d5f35c1197cb140836..8ac5ed2fbfe5426a1273cc1d86de2484a9a91478 100644 (file)
@@ -12,7 +12,7 @@ numbers, like @code{<4 6+>}.
  \context FiguredBass {
    \figures {
        <_! 3+ 5- _ 7! 9 >4
-       < 4 6 >
+       < [4 6] >
    }
  }
 
diff --git a/input/regression/grace-volta-repeat.ly b/input/regression/grace-volta-repeat.ly
new file mode 100644 (file)
index 0000000..8143a3a
--- /dev/null
@@ -0,0 +1,20 @@
+
+\header {
+
+    texidoc = "Repeated music can start with grace notes.  Bar checks
+    preceding the grace notes do not cause synchronization effects.  "
+
+}
+
+\score{
+   \notes\relative c'''{\key a \minor \time 2/4
+     \repeat "volta" 2 {
+     \grace { [a16( c] }  c,4 c4  |
+     \grace { [e'16( gis] } c,4 c4 |
+     
+     }
+   }
+   \paper { linewidth = -1. }
+ }
+
+
index faed716f6e46e7e690d951cf385828b14a9a609c..10e994647a4e6001a4bc69edd98e862b9265dd2a 100644 (file)
@@ -2,6 +2,7 @@
 
 \header{
 texidoc="
+
 There are several ways to calculate the direction of a beam
 
 @table @samp
@@ -23,8 +24,7 @@ We should see:
 
 \score {
   \notes \relative c'' {
-    % the default
-    %\property Voice.Beam \set #'dir-function = #beam-dir-majority
+    \property Voice.Beam \set #'dir-function = #beam-dir-majority
     [d8 a]
     \property Voice.Beam \set #'dir-function = #beam-dir-mean
     [d a] 
index bc01898832db6b1ff8012639596640b6f39799b7..b916066f6a7e894d35edaf47b0c0bc9c4588e369 100644 (file)
@@ -56,15 +56,13 @@ Bar_check_iterator::process (Moment m)
       if (where->main_part_)
        {
          music_l ()->origin ()->warning (_f ("barcheck failed at: %s", 
-                                           where->str ()));
-       }
-      
-      if (!to_boolean (sync))
-       {
-         tr = tr->where_defined (ly_symbol2scm("measurePosition"));
-         Moment zero;
-         tr->set_property ("measurePosition", zero.smobbed_copy ());
+                                             where->str ()));
+         if (!to_boolean (sync))
+           {
+             tr = tr->where_defined (ly_symbol2scm("measurePosition"));
+             Moment zero;
+             tr->set_property ("measurePosition", zero.smobbed_copy ());
+           }
        }
     }
-}
-    
+}    
index 45a8f1050cbe33e7b9127f7a2e89e601722a6fda..a7fb3e0c3c0f5f946e1e8f19a3ddb9bf600c7e17 100644 (file)
@@ -98,7 +98,7 @@ Global_translator::run_iterator_on_me (Music_iterator * iter)
 
       w = sneaky_insert_extra_moment (w);
 
-            //cout << "Proccing " << w << endl;
+      //      cout << "Proccing " << w << endl;
 
       
       if (first)
index 997a75dab637389a69de2dbd41de3a4dd2fd66c5..42523311e1cec982a5fbc16f592b398214c15ca8 100644 (file)
@@ -16,8 +16,8 @@ class Line_spanner
 {
 public:
   DECLARE_SCHEME_CALLBACK (brew_molecule, (SCM));
-  static SCM line_atom (Grob* me, Real dx, Real dy);
-  static Molecule line_molecule (Grob* me, Real dx, Real dy);
+  
+  static Molecule line_molecule (Grob* me, Real thick, Real dx, Real dy);
 
 private:
   static Offset get_broken_offset (Grob *me, Direction dir);
index 7c1df168ef05677087987852639dcdacd7ae5f6f..833609261c0eb56081b55ca21763ed7ee3975a30 100644 (file)
@@ -63,6 +63,8 @@ public:
   DECLARE_SCHEME_CALLBACK (unfolded_music_length, (SCM));
   DECLARE_SCHEME_CALLBACK (volta_music_length, (SCM));
   DECLARE_SCHEME_CALLBACK (folded_music_length, (SCM));    
+  DECLARE_SCHEME_CALLBACK (minimum_start, (SCM));
+  DECLARE_SCHEME_CALLBACK (first_start, (SCM));    
   
   /// Transpose, with the interval central C to #p#
   virtual void transpose (Pitch p);
index ba22052d9657db381dc8337684a62efc407509e4..9f8a47b83045d8e7dcf7a6fbcaca7b78c0155155 100644 (file)
 
 #include <math.h>
 
-SCM
-Line_spanner::line_atom (Grob* me, Real dx, Real dy)
+
+/*
+  slightishly clumsy interface?
+
+  Make  a Scheme expression for a line going from (0,0) to (dx,dy). 
+ */
+
+static SCM
+line_atom (Grob* me, Real thick, Real dx, Real dy)
 {
   SCM type = me->get_grob_property ("type");
   Real staff_space = Staff_symbol_referencer::staff_space (me);
-  Real thick = me->paper_l ()->get_var ("stafflinethickness");  
-
-  SCM s = me->get_grob_property ("line-thickness");
-  if (gh_number_p (s))
-    thick *= gh_scm2double (s);
   
       // maybe these should be in line-thickness?
   Real length = staff_space;
-  s = me->get_grob_property ("dash-length");
+  SCM s = me->get_grob_property ("dash-length");
   if (gh_number_p (s))
     length = gh_scm2double (s) * staff_space;
 
@@ -60,7 +62,7 @@ Line_spanner::line_atom (Grob* me, Real dx, Real dy)
 }
 
 Molecule
-Line_spanner::line_molecule (Grob* me, Real dx, Real dy)
+Line_spanner::line_molecule (Grob* me, Real thick, Real dx, Real dy)
 {
   Molecule mol;
   SCM type = me->get_grob_property ("type");
@@ -70,8 +72,9 @@ Line_spanner::line_molecule (Grob* me, Real dx, Real dy)
          || type == ly_symbol2scm ("dotted-line")
          || (type == ly_symbol2scm ("trill") && dy != 0)))
     {
-      Box b (Interval (0, dx), Interval (0, dy));
-      mol = Molecule (b, line_atom (me, dx, dy));
+      Box b (Interval (-0.5* thick +  (0 <? dx) ,0.5* thick+ (0 >? dx)),
+            Interval (- 0.5* thick + (0<? dy), 0.5*thick + (0 >? dy)));
+      mol = Molecule (b, line_atom (me, thick, dx, dy));
     }
   else if (gh_symbol_p (type)
           && type == ly_symbol2scm ("trill"))
@@ -240,8 +243,15 @@ Line_spanner::brew_molecule (SCM smob)
                                                          Y_AXIS)); 
       
       }
+
+  Real thick = me->paper_l ()->get_var ("stafflinethickness");  
+
+  SCM s = me->get_grob_property ("line-thickness");
+  if (gh_number_p (s))
+    thick *= gh_scm2double (s);
+
   
-  Molecule line = line_molecule (me, dxy[X_AXIS], dxy[Y_AXIS]);
+  Molecule line = line_molecule (me, thick, dxy[X_AXIS], dxy[Y_AXIS]);
   line.translate_axis (bound[LEFT]->extent (bound[LEFT],
                                            X_AXIS).length ()/2, X_AXIS); 
   line.translate (ofxy - my_off + his_off);
index d812fca1d5816e6a6d98c9fec42d0feca539eff1..5d7e57754bcc4cd4f22a4026bbab6abec290b739 100644 (file)
@@ -93,6 +93,13 @@ Music::length_mom () const
 Moment
 Music::start_mom () const
 {
+  SCM l = get_mus_property ("start-moment-function");
+  if (gh_procedure_p (l))
+    {
+      SCM res = gh_call1 (l, self_scm ());
+      return *unsmob_moment (res);
+    }
+
   Moment m ;
   return m;
 }
index 8488259923a031763324c3d588a44a0355a02d19..3ae277f8f5d051b392b350f0bef583e1b7642b52 100644 (file)
@@ -11,6 +11,7 @@
 #include "music-list.hh"
 #include "pitch.hh"
 #include "debug.hh"
+#include "music-sequence.hh"
 
 Music *
 Repeated_music::body ()const
@@ -167,3 +168,33 @@ Repeated_music::Repeated_music ()
 {
  set_mus_property ("type", ly_symbol2scm ("repeated-music"));
 }
+
+
+MAKE_SCHEME_CALLBACK (Repeated_music,minimum_start, 1);
+MAKE_SCHEME_CALLBACK (Repeated_music,first_start, 1);
+
+SCM
+Repeated_music::minimum_start (SCM m)
+{
+  Music * me = unsmob_music (m);
+  Music * body = unsmob_music (me->get_mus_property ("element"));
+
+  if (body)
+    return body->start_mom ().smobbed_copy();
+  else
+    {
+      return Music_sequence::minimum_start (me->get_mus_property ("elements")).smobbed_copy();
+    }
+}
+
+SCM
+Repeated_music::first_start (SCM m)
+{
+  Music * me = unsmob_music (m);
+  Music * body = unsmob_music (me->get_mus_property ("element"));
+
+  Moment rv =  (body) ? body->start_mom () :
+    Music_sequence::first_start (me->get_mus_property ("elements"));
+
+  return rv.smobbed_copy ();
+}
index de49d2c35bafa49b2b2c6be11f6d76265ef5b2f5..f3c69d9976c47da7287bc2c2c4ef1f8e61892b88 100644 (file)
@@ -430,6 +430,12 @@ Spacing_spanner::find_shortest (Link_array<Grob> const &cols)
   return d;
 }
 
+/*
+  Generate spacing for a single measure. We used to have code that did
+  per-measure spacing. Now we have piecewise spacing. We should fix
+  this to support "spacing-regions": some regions have different notes
+  (different time sigs) than others, and should be spaced differently.
+ */
 void
 Spacing_spanner::do_measure (Rational shortest, Grob*me, Link_array<Grob> *cols) 
 {
@@ -475,6 +481,10 @@ Spacing_spanner::do_measure (Rational shortest, Grob*me, Link_array<Grob> *cols)
     }    
 }
 
+
+/*
+  Generate the space between two musical columns LC and RC, given spacing parameters INCR and SHRTEST.
+ */
 void
 Spacing_spanner::musical_column_spacing (Grob *me, Item * lc, Item *rc, Real increment, Rational shortest)
 {
index 554bc1d1f45e22fe960b41022e4be138ed8ceb50..6457d433c30aa346a8240bfed2d6d95f0f990b8f 100644 (file)
@@ -1,10 +1,10 @@
 /*
 
-  text-spanner.cc -- implement Text_spanner
+text-spanner.cc -- implement Text_spanner
 
-  source file of the GNU LilyPond music typesetter
+source file of the GNU LilyPond music typesetter
 
-  (c) 2000--2002 Jan Nieuwenhuizen <janneke@gnu.org>
+(c) 2000--2002 Jan Nieuwenhuizen <janneke@gnu.org>
 */
 
 #include "molecule.hh"
 
 /*
   TODO:
-    - vertical start / vertical end (fixme-name) |
-    - contination types (vert. star, vert. end)  |-> eat volta-spanner
-    - more styles
-    - more texts/positions
- */
+  - vertical start / vertical end (fixme-name) |
+  - contination types (vert. star, vert. end)  |-> eat volta-spanner
+  - more styles
+  - more texts/positions
+*/
 
 MAKE_SCHEME_CALLBACK (Text_spanner, brew_molecule, 1);
 
+/*
+  TODO: this function is too long, too hairy.
+
+  TODO: document this. What the heck is happening here?
+*/
 SCM
 Text_spanner::brew_molecule (SCM smob) 
 {
@@ -64,7 +69,7 @@ Text_spanner::brew_molecule (SCM smob)
          if (!e.empty_b ())
            r = e[-d] + padding;
          /* Text spanners such as ottava, should span from outer limits of
-          noteheads, iso (de)cresc. spanners that span the inner space */
+            noteheads, iso (de)cresc. spanners that span the inner space */
          if (me->get_grob_property ("outer") != SCM_EOL)
            // r *= -1; // huh?
            {
@@ -83,6 +88,7 @@ Text_spanner::brew_molecule (SCM smob)
   width += gh_scm2double (me->get_grob_property ("width-correct"));
   /* /Ugh */
 
+  // who is ecs? --hwn
 
   SCM properties = Font_interface::font_alist_chain (me);
 
@@ -127,9 +133,15 @@ Text_spanner::brew_molecule (SCM smob)
     }
 
   /* ugh */
-  Real thick = me->paper_l ()->get_var ("stafflinethickness");  
   
-  Molecule line = Line_spanner::line_molecule (me, width, 0);
+  Real thick = me->paper_l ()->get_var ("stafflinethickness");  
+  SCM st = me->get_grob_property ("thickness");
+  if (gh_number_p (st))
+    {
+      thick *=  gh_scm2double (st);
+
+    }
+  Molecule line = Line_spanner::line_molecule (me, thick, width, 0);
   
   Drul_array<Molecule> edge_line;
   s = me->get_grob_property ("edge-height");
@@ -146,12 +158,7 @@ Text_spanner::brew_molecule (SCM smob)
          Real dy = gh_scm2double (index_cell (s, d)) * - dir;
          if (dy)
            {
-             SCM list = Line_spanner::line_atom (me, dx, dy);
-             Box b (Interval (-thick, 0),
-                    dy > 0
-                    ? Interval (0, dy)
-                    : Interval (dy, 0));
-             edge_line[d] = Molecule (b, list);
+             edge_line[d] = Line_spanner::line_molecule (me, thick, dx, dy);
            }
        }
       while (flip (&d) != LEFT);
@@ -164,9 +171,10 @@ Text_spanner::brew_molecule (SCM smob)
   if (!edge_line[LEFT].empty_b ())
     m.add_at_edge (X_AXIS, RIGHT, edge_line[LEFT], 0);
   if (!line.empty_b ())
-    m.add_at_edge (X_AXIS, RIGHT, line, 0);
+    m.add_at_edge (X_AXIS, RIGHT, line,
+                  edge_line[LEFT].empty_b () ? 0 : - thick/2);
   if (!edge_line[RIGHT].empty_b ())
-    m.add_at_edge (X_AXIS, RIGHT, edge_line[RIGHT], 0);
+    m.add_at_edge (X_AXIS, RIGHT, edge_line[RIGHT], -thick/2);
   if (!edge[RIGHT].empty_b ())
     m.add_at_edge (X_AXIS, RIGHT, edge[RIGHT], 0);
   m.translate_axis (broken_left + extra_off[LEFT] + shorten[LEFT], X_AXIS);
@@ -184,20 +192,25 @@ Text_spanner::brew_molecule (SCM smob)
 */
 
 void 
-Text_spanner::setup_pedal_bracket(Spanner *s)
+Text_spanner::setup_pedal_bracket(Spanner *me)
 {
 
-  Real thick = s->paper_l ()->get_var ("stafflinethickness");  
+  Real thick = me->paper_l ()->get_var ("stafflinethickness");  
+  SCM st = me->get_grob_property ("thickness");
+  if (gh_number_p (st))
+    {
+      thick *=  gh_scm2double (st);
+    }  
 
   Drul_array<bool> w, broken;
   Drul_array<Real> height, width, shorten, r;
 
-  SCM pa = s->get_grob_property ("if-text-padding");
-  SCM ew = s->get_grob_property ("edge-width");
-  SCM eh = s->get_grob_property ("edge-height");
-  SCM sp = s->get_grob_property ("shorten-pair");
-  SCM wl = s->get_grob_property ("left-widen");
-  SCM wr = s->get_grob_property ("right-widen");
+  SCM pa = me->get_grob_property ("if-text-padding");
+  SCM ew = me->get_grob_property ("edge-width");
+  SCM eh = me->get_grob_property ("edge-height");
+  SCM sp = me->get_grob_property ("shorten-pair");
+  SCM wl = me->get_grob_property ("left-widen");
+  SCM wr = me->get_grob_property ("right-widen");
 
   // Pedal has an angled left edge \__  or an angled right edge __/ 
   w[LEFT] = w[RIGHT] = false;
@@ -214,7 +227,7 @@ Text_spanner::setup_pedal_bracket(Spanner *s)
     padding = gh_scm2double (pa);
 
   do {
-    Item *b = s->get_bound (d);
+    Item *b = me->get_bound (d);
 
     e = b->extent (b, X_AXIS);
     if (!e.empty_b ())
@@ -236,10 +249,10 @@ Text_spanner::setup_pedal_bracket(Spanner *s)
   Real extra_short = 0;
   // For 'Mixed' style pedals, i.e.  a bracket preceded by text:  Ped._____|
   // need to shorten by the extent of the text grob
-  if ( to_boolean (s->get_grob_property ("text-start")) )
+  if ( to_boolean (me->get_grob_property ("text-start")) )
     {
       height[LEFT] = 0;
-      Grob * textbit = s->get_parent(Y_AXIS);
+      Grob * textbit = me->get_parent(Y_AXIS);
       extra_short = padding;
       if (textbit->has_interface(ly_symbol2scm("piano-pedal-interface")))
        // for pretty Ped. scripts. 
@@ -252,8 +265,8 @@ Text_spanner::setup_pedal_bracket(Spanner *s)
        {
          SCM text  =  textbit->get_grob_property("text"); 
          if (gh_string_p (text)) {
-           SCM properties = Font_interface::font_alist_chain (s);
-           Molecule mol = Text_item::text2molecule (s, text, properties);
+           SCM properties = Font_interface::font_alist_chain (me);
+           Molecule mol = Text_item::text2molecule (me, text, properties);
            extra_short += mol.extent(X_AXIS).length() / 2;
          }
        }
@@ -264,17 +277,17 @@ Text_spanner::setup_pedal_bracket(Spanner *s)
   shorten[LEFT] += abs(width[LEFT]) * 2   +  extra_short ;
   
   if (broken[LEFT]) {
-    shorten[LEFT] -= s->get_broken_left_end_align () ;
+    shorten[LEFT] -= me->get_broken_left_end_align () ;
     shorten[RIGHT] -= r[RIGHT];
   }
   else 
     // Shorten bracket on the right so it ends just before the spanned note.
     shorten[RIGHT]  +=  thick  -  (r[LEFT]  +  r[RIGHT]);
 
-  s->set_grob_property ("edge-height", gh_cons ( gh_double2scm ( height[LEFT] ) , 
-                                                gh_double2scm ( height[RIGHT]) ) );
-  s->set_grob_property ("edge-width",  gh_cons ( gh_double2scm ( width[LEFT]  ), 
-                                                gh_double2scm ( width[RIGHT] ) ));
-  s->set_grob_property ("shorten-pair", gh_cons ( gh_double2scm ( shorten[LEFT] ), 
-                                            gh_double2scm ( shorten[RIGHT] ) ));
+  me->set_grob_property ("edge-height", gh_cons ( gh_double2scm ( height[LEFT] ) , 
+                                                 gh_double2scm ( height[RIGHT]) ) );
+  me->set_grob_property ("edge-width",  gh_cons ( gh_double2scm ( width[LEFT]  ), 
+                                                 gh_double2scm ( width[RIGHT] ) ));
+  me->set_grob_property ("shorten-pair", gh_cons ( gh_double2scm ( shorten[LEFT] ), 
+                                                  gh_double2scm ( shorten[RIGHT] ) ));
 }
index b33942fde1ecddf0c6daffd16982b7beb810a487..b139a85bff0936c3e61d6b9563a147612084af41 100644 (file)
@@ -15,7 +15,6 @@ startGraceMusic = {
     \property Voice.Stem \override #'no-stem-extend = ##t
     \property Voice.Stem \override #'flag-style  = #"grace"
 
-    \property Voice.Beam \override #'space-function = #grace-beam-space-function
     \property Voice.Beam \override #'thickness = #0.384
     
     % Can't use Staff.fontSize, since time sigs, keys sigs, etc. will
index 5fea3d145d552e52751a2f415bc269bbe043b474..56612415aa07bc294d8311d94f0967e3feef1b14 100644 (file)
@@ -136,14 +136,19 @@ is the  first to satisfy CRIT "
   (let*
       ((supported-reps
        `(("volta" . ((iterator-ctor . ,Volta_repeat_iterator::constructor)
+                     (start-moment-function .  ,Repeated_music::first_start)
                      (length . ,Repeated_music::volta_music_length)))
            ("unfold" . ((iterator-ctor . ,Unfolded_repeat_iterator::constructor)
-                      (length . ,Repeated_music::unfolded_music_length)))
+                        (start-moment-function .  ,Repeated_music::first_start)                         
+                        (length . ,Repeated_music::unfolded_music_length)))
            ("fold" . ((iterator-ctor  . ,Folded_repeat_iterator::constructor)
+                      (start-moment-function .  ,Repeated_music::minimum_start)                         
                       (length . ,Repeated_music::folded_music_length)))
            ("percent" . ((iterator-ctor . ,Percent_repeat_iterator::constructor)
+                         (start-moment-function .  ,Repeated_music::first_start)
                          (length . ,Repeated_music::unfolded_music_length)))
            ("tremolo" . ((iterator-ctor . ,Chord_tremolo_iterator::constructor)
+                         (start-moment-function .  ,Repeated_music::first_start)                         
                          (length . ,Repeated_music::unfolded_music_length)))))
          
        (handle (assoc name supported-reps)))
index 1d3c58d027d7e6eb2d20d8ccb2ad7c1c32a8f4c3..e13bbc4893d901e77eafe713bf4f7e263d130066 100644 (file)
 
 
 (define (box-grob-molecule grob)
-  "Make a box of exactly the extents of the grob."
+  "Make a box of exactly the extents of the grob.  The box precisely
+encloses the contents.
+"
   (let* ((xext (ly-get-extent grob grob 0))
         (yext (ly-get-extent grob grob 1))
         (mol (ly-make-molecule '() '(10000 . -10000) '(10000 . -10000)))
         (thick 0.1)
         )
-    (display "hoi")
-    (set! mol (ly-add-molecule mol (box-molecule xext (cons (car yext) (+ (car yext) thick)))))
-    (set! mol (ly-add-molecule mol (box-molecule xext (cons (- (cdr yext) thick) (cdr yext)))))
-    (set! mol (ly-add-molecule mol (box-molecule (cons (car xext) (+ (car xext) thick)) yext)))
-    (set! mol (ly-add-molecule mol (box-molecule (cons (- (cdr xext) thick) (cdr xext)) yext)))
+
+    (set! mol (ly-add-molecule mol (box-molecule xext (cons (- (car yext) thick) (car yext) ))))
+    (set! mol (ly-add-molecule mol (box-molecule xext (cons  (cdr yext) (+ (cdr yext) thick) ))))
+    (set! mol (ly-add-molecule mol (box-molecule (cons (cdr xext) (+ (cdr xext) thick)) yext)))
+    (set! mol (ly-add-molecule mol (box-molecule (cons (- (car xext) thick) (car xext)) yext)))
     mol
   ))
index 10e91ee26332566b0a534e302d19e5030b57585f..77b54f113cee4799c6ac8f2d1a57588780777808 100644 (file)
@@ -20,6 +20,8 @@ written by Rune Zedeler. "
         (begin
           (ly-set-mus-property
            music 'length Repeated_music::unfolded_music_length)
+         (ly-set-mus-property
+          music 'start-moment-function Repeated_music::first_start)
           (ly-set-mus-property
            music 'iterator-ctor Unfolded_repeat_iterator::constructor)))
 
@@ -36,6 +38,10 @@ written by Rune Zedeler. "
 
     music))
 
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
 (define  (pitchify-scripts music)
   "Copy the pitch fields of the Note_requests into  Text_script_requests, to aid
 Fingering_engraver."
index 93933e1aff02c726c432125d31061c4e5ccdc644..8b91f1d45f863918e9251f54aa53f447a7010f25 100644 (file)
@@ -59,6 +59,10 @@ TODO: consider making type into symbol ")
 (music-property-description 'type symbol? "The type of this music object. Determines iteration in some cases.")
 (music-property-description 'repeat-count  integer? "do a @code{\repeat} how ofen?")
 (music-property-description 'span-direction dir? "Does this start or stop a spanner?")
+
+(music-property-description 'start-moment-function procedure? "Function to compute the negative length of
+starting grace notes.")
+
 (music-property-description 'symbol symbol? "Grob name to perform an override/revert on.")
 (music-property-description 'text markup? "markup expression to be printed")
 ;; markup?
index 44745f99bb5baf6194ce614b8420851c83647f47..cf10c42f20c5ce06d1459ee828596409249723aa 100644 (file)
@@ -986,20 +986,19 @@ def system (cmd):
 
 
 def get_bbox (filename):
-       f = open (filename)
+       system ('gs -sDEVICE=bbox -q  -sOutputFile=- -dNOPAUSE %s -c quit > %s.bbox 2>&1 ' % (filename, filename))
+
+       box = open (filename + '.bbox').read()
+       m = re.match ('^%%BoundingBox: ([0-9]+) ([0-9]+) ([0-9]+) ([0-9]+)', box)
        gr = []
-       while 1:
-               l =f.readline ()
-               m = re.match ('^%%BoundingBox: ([0-9]+) ([0-9]+) ([0-9]+) ([0-9]+)', l)
-               if m:
-                       gr = map (string.atoi, m.groups ())
-                       break
+       if m:
+               gr = map (string.atoi, m.groups ())
        
        return gr
 
 def make_pixmap (name):
        bbox = get_bbox (name + '.eps')
-       margin = 3
+       margin = 0
        fo = open (name + '.trans.eps' , 'w')
        fo.write ('%d %d translate\n' % (-bbox[0]+margin, -bbox[1]+margin))
        fo.close ()
index 4db0600eba1b13b52fcde25cef83395e66adc95d..a8db4c32876a88d9288d597d086fb1ed195ed2fa 100644 (file)
@@ -39,7 +39,7 @@ dist:
        $(MAKE) local-dist $(distdir)
        chmod -R a+r $(distdir)
        chmod  a+x `find $(distdir) -type d -print` 
-       (cd ./$(depth)/$(outdir); $(TAR) cf - $(DIST_NAME) | gzip -9 > $(DIST_NAME).tar.gz)
+       (cd ./$(depth)/$(outdir); $(TAR) -cf -  --owner=0 --group=0 $(DIST_NAME) | gzip -9 > $(DIST_NAME).tar.gz)
 # ugh.
 # Can't compare "stage1" dist with "stage2" dist in this way?
        -ln -f $(depth)/$(outdir)/$(distname).tar.gz $(release-dir)