]> git.donarmstrong.com Git - lilypond.git/commitdiff
* scm/grob-description.scm (all-grob-descriptions): set
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Wed, 7 Aug 2002 22:45:41 +0000 (22:45 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Wed, 7 Aug 2002 22:45:41 +0000 (22:45 +0000)
X-offset-callbacks for TextScript

* lily/stem.cc (invisible_b): don't use support_head(), since it
sets stem direction.

* lily/beam.cc (struct Int_set): don't get stuck inserting
interval segments of length 0.0.

* scripts/convert-ly.py:  break-align conversion.

24 files changed:
ChangeLog
Documentation/user/invoking.itexi
lily/a2-engraver.cc
lily/accidental-engraver.cc
lily/accidental-placement.cc
lily/accidental.cc
lily/afm.cc
lily/ambitus.cc
lily/auto-beam-engraver.cc
lily/axis-group-interface.cc
lily/bar-line.cc
lily/beam-engraver.cc
lily/beam-quanting.cc
lily/beam.cc
lily/break-align-interface.cc
lily/break-substitution.cc
lily/chord-tremolo-engraver.cc
lily/chord.cc
lily/clef-engraver.cc
lily/command-request.cc
lily/stem.cc
scm/grob-description.scm
scripts/convert-ly.py
scripts/ly2dvi.py

index 4143e6c1c69a76a9c6f63847b97fc287d18d0698..3912f4f24c3845736cfe44bb6f3a50d97dde25b8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,20 @@
+2002-08-08  Han-Wen Nienhuys  <hanwen@cs.uu.nl>
+
+       * scm/grob-description.scm (all-grob-descriptions): set
+       X-offset-callbacks for TextScript
+
+       * lily/stem.cc (invisible_b): don't use support_head(), since it
+       sets stem direction.
+
+       * lily/beam.cc (struct Int_set): don't get stuck inserting
+       interval segments of length 0.0.
+
+       * scripts/convert-ly.py:  break-align conversion.
+
+2002-08-06  Han-Wen Nienhuys  <hanwen@cs.uu.nl>
+
+       * lily/*.cc (process_music): gh_int2scm -> scm_int2num
+
 2002-08-06  Heikki Junes <hjunes@cc.hut.fi>
 
        * lilypond-mode.el: Also "C-xC-s" sets default command to LilyPond.
index 12937161ff8a86c4180143f4aa3a185cd6cde4df..e8b7699644a1b8fdc1e390e50d6f13b5cb7cda55 100644 (file)
@@ -361,7 +361,11 @@ so you can add multiple packages using multiple @code{-s=latexpackages} options.
 @code{geometry}.
 
 @item latexoptions
-    Specify additional options for the La@TeX{} @code{\documentclass}. You can put any valid value here. This was designed to allow ly2dvi to produce output for double-sided paper, with balanced margins and pagenumbers on alternating sides. To achieve this specify @code{twoside}
+    Specify additional options for the La@TeX{}
+@code{\documentclass}. You can put any valid value here. This was
+designed to allow ly2dvi to produce output for double-sided paper,
+with balanced margins and pagenumbers on alternating sides. To achieve
+this specify @code{twoside}
 
 @item orientation
     Set orientation. Choices are @code{portrait} or @code{landscape}. Is
@@ -380,8 +384,8 @@ block.
 the @code{\paper} block.
 
 @item pagenumber
-   If set to @code{no}, no page numbers will be printed.
-
+   If set to @code{no}, no page numbers will be printed.  If set to a
+positive integer, start with this value as the first page number.
 
   
   @item fontenc
index ec3ecf9161f98607f23011340a8a6520fe7f42ef..ac7177ba91cdddc3759853c564185ff00cf5dda4 100644 (file)
@@ -174,7 +174,7 @@ A2_engraver::acknowledge_grob (Grob_info i)
        {
        
          /* Blunt axe method: every grob gets a propertysetting. */
-         i.grob_->set_grob_property ("direction", gh_int2scm (d));
+         i.grob_->set_grob_property ("direction", scm_int2num (d));
        }
     }
 
@@ -184,7 +184,7 @@ A2_engraver::acknowledge_grob (Grob_info i)
     if (state_ == UNIRHYTHM
        && unisilence != SCM_BOOL_T)
     {
-      i.grob_->set_grob_property ("staff-position", gh_int2scm (d * 6));
+      i.grob_->set_grob_property ("staff-position", scm_int2num (d * 6));
     }
 }
 
index f4c07abbcf3dca28aa802f02e74a3b0337c652c5..0c00497d0918ac726b7b753b373d3ca3b489d2e0 100644 (file)
@@ -136,9 +136,9 @@ number_accidentals (SCM sig, Note_req * note, Pitch *pitch, SCM curbarnum, SCM l
 
   SCM prev;
   if (ignore_octave_b)
-    prev = ly_assoc_cdr (gh_int2scm (n), sig);
+    prev = ly_assoc_cdr (scm_int2num (n), sig);
   else
-    prev = gh_assoc (gh_cons (gh_int2scm (o), gh_int2scm (n)), sig);
+    prev = gh_assoc (gh_cons (scm_int2num (o), scm_int2num (n)), sig);
 
   /* should really be true unless prev == SCM_BOOL_F */
   if (gh_pair_p (prev) && gh_pair_p (ly_cdr (prev)))
@@ -150,10 +150,10 @@ number_accidentals (SCM sig, Note_req * note, Pitch *pitch, SCM curbarnum, SCM l
   /* If an accidental was not found or the accidental was too old */
   if (prev == SCM_BOOL_F ||
       (gh_number_p (lazyness) && curbarnum_i > accbarnum_i + gh_scm2int (lazyness)))
-    prev = gh_assoc (gh_int2scm (n), sig);
+    prev = gh_assoc (scm_int2num (n), sig);
 
 
-  SCM prev_acc = (prev == SCM_BOOL_F) ? gh_int2scm (0) : ly_cdr (prev);
+  SCM prev_acc = (prev == SCM_BOOL_F) ? scm_int2num (0) : ly_cdr (prev);
 
   int p = gh_number_p (prev_acc) ? gh_scm2int (prev_acc) : 0;
 
@@ -301,9 +301,9 @@ Accidental_engraver::process_acknowledged_grobs ()
              announce_grob (a, SCM_EOL);
 
              
-             SCM accs = gh_cons (gh_int2scm (pitch->alteration_), SCM_EOL);
+             SCM accs = gh_cons (scm_int2num (pitch->alteration_), SCM_EOL);
              if (num == 2 && extra_natural_b)
-               accs = gh_cons (gh_int2scm (0), accs);
+               accs = gh_cons (scm_int2num (0), accs);
 
              /* TODO:
 
@@ -348,7 +348,7 @@ Accidental_engraver::process_acknowledged_grobs ()
          int n = pitch->notename_;
          int o = pitch->octave_;
          int a = pitch->alteration_;
-         SCM on_s = gh_cons (gh_int2scm (o), gh_int2scm (n));
+         SCM on_s = gh_cons (scm_int2num (o), scm_int2num (n));
 
          /*
            TODO: Speed this up!
@@ -387,7 +387,7 @@ Accidental_engraver::process_acknowledged_grobs ()
                    noteheads with the same notename.
                  */
                  localsig = ly_assoc_front_x
-                   (localsig, on_s, gh_cons (gh_int2scm (a), barnum)); 
+                   (localsig, on_s, gh_cons (scm_int2num (a), barnum)); 
                }
              origin->set_property ("localKeySignature",  localsig);
              origin = origin->daddy_trans_;
index d7c4e866bed63780098d393d2044ed70cd26606e..03d7ac60c6ab159e79aac66ffb22e9991ed35af9 100644 (file)
@@ -33,7 +33,7 @@ Accidental_placement::alignment_callback(SCM s, SCM )
       position_accidentals (par);
     }
 
-  return gh_int2scm (0);
+  return scm_int2num (0);
 }
 
 
@@ -57,7 +57,7 @@ Accidental_placement::add_accidental (Grob* me, Grob* a)
   int n = p->notename_;
 
   SCM accs = me->get_grob_property ("accidental-grobs");
-  SCM key = gh_int2scm (n);
+  SCM key = scm_int2num (n);
   SCM entry = scm_assq (key, accs);
   if (entry == SCM_BOOL_F)
     {
index 658be717d5d25d8d435e64ab7a2d98956128ccd0..9d1ad1a34ef1a6c740fcf6d9b2d09f28f1a74d4b 100644 (file)
@@ -132,7 +132,7 @@ Accidental_interface::brew_molecule (SCM smob)
       SCM ac = Font_interface::font_alist_chain (me);
       ac = gh_cons (gh_cons (gh_cons
                             (ly_symbol2scm ("font-relative-size"),
-                             gh_int2scm (-1)), SCM_EOL),
+                             scm_int2num (-1)), SCM_EOL),
                    ac);
       fm = Font_interface::get_font (me, ac);
     }
index e9d770e46d00d8f966d39e2120feb7dfa5497895..51dbba8224532f0429ba718f4383a88cff7d54ad 100644 (file)
@@ -169,7 +169,7 @@ Adobe_font_metric::find_by_name (String s) const
     }
   
   SCM at = (scm_list_n (ly_symbol2scm ("char"),
-                     gh_int2scm (cm->code),
+                     scm_int2num (cm->code),
                      SCM_UNDEFINED));
   
   //  at= fontify_atom ((Font_metric*)this, at);
index 8b5cf38395ba92d6080e997ca216a4194c391939..37eb5b9617bcd93623a3de9ded15fe089bcfd760 100644 (file)
@@ -65,9 +65,9 @@ number_accidentals (SCM key_signature, Pitch *pitch,
 
   SCM prev;
   if (ignore_octave_b)
-    prev = ly_assoc_cdr (gh_int2scm (notename), key_signature);
+    prev = ly_assoc_cdr (scm_int2num (notename), key_signature);
   else
-    prev = gh_assoc (gh_cons (gh_int2scm (octave), gh_int2scm (notename)),
+    prev = gh_assoc (gh_cons (scm_int2num (octave), scm_int2num (notename)),
                     key_signature);
 
   /* should really be true unless prev == SCM_BOOL_F */
@@ -78,9 +78,9 @@ number_accidentals (SCM key_signature, Pitch *pitch,
 
   /* If an accidental was not found */
   if (prev == SCM_BOOL_F)
-    prev = gh_assoc (gh_int2scm (notename), key_signature);
+    prev = gh_assoc (scm_int2num (notename), key_signature);
 
-  SCM prev_acc = (prev == SCM_BOOL_F) ? gh_int2scm (0) : ly_cdr (prev);
+  SCM prev_acc = (prev == SCM_BOOL_F) ? scm_int2num (0) : ly_cdr (prev);
   int sig_alteration = gh_number_p (prev_acc) ? gh_scm2int (prev_acc) : 0;
 
   if (alteration == sig_alteration) // no accidental at all needed
index 55d8ab3e66f5320fc13ed5d528b8ceeb4d85fdd4..35706dde6b9955e2eda82442ffa85be266fa236e 100644 (file)
@@ -129,10 +129,10 @@ Auto_beam_engraver::test_moment (Direction dir, Moment test_mom)
   Moment one_beat = *unsmob_moment (get_property ("beatLength"));
   int num = int ((*unsmob_moment (get_property ("measureLength")) / one_beat).main_part_);
   int den = one_beat.den ();
-  SCM time = scm_list_n (gh_int2scm (num), gh_int2scm (den), SCM_UNDEFINED);
+  SCM time = scm_list_n (scm_int2num (num), scm_int2num (den), SCM_UNDEFINED);
 
-  SCM type = scm_list_n (gh_int2scm (test_mom.num ()),
-                     gh_int2scm (test_mom.den ()), SCM_UNDEFINED);
+  SCM type = scm_list_n (scm_int2num (test_mom.num ()),
+                     scm_int2num (test_mom.den ()), SCM_UNDEFINED);
 
   SCM settings = get_property ("autoBeamSettings");
   
index 51e8c2f82e7819d012a81f5bb3880425fdf77d4e..ec4e2023031a05ad9ed557d6ae3cc4c2c20c72d4 100644 (file)
@@ -69,8 +69,8 @@ Axis_group_interface::group_extent_callback (SCM element_smob, SCM scm_axis)
 void
 Axis_group_interface::set_axes (Grob*me,Axis a1, Axis a2)
 {
-  SCM sa1= gh_int2scm (a1);
-  SCM sa2 = gh_int2scm (a2);
+  SCM sa1= scm_int2num (a1);
+  SCM sa2 = scm_int2num (a2);
 
   SCM axes = me->get_grob_property ("axes");
   
index f54d33c961de99a7ab62f74a372193b600adcd10..d897133e216aec6fc9169ba2dd469492fe1420ea 100644 (file)
@@ -146,7 +146,7 @@ Bar_line::before_line_breaking (SCM smob)
   if (gh_string_p (g) && bsd)
     {
       SCM proc = me->get_grob_property ("break-glyph-function");
-      g = gh_call2 (proc, g, gh_int2scm (bsd));
+      g = gh_call2 (proc, g, scm_int2num (bsd));
     }
 
   
@@ -185,7 +185,7 @@ Bar_line::get_staff_bar_size (SCM smob)
       return gh_double2scm ((Staff_symbol_referencer::line_count (me) -1) * ss);
     }
   else
-    return gh_int2scm (0);
+    return scm_int2num (0);
 }
 
 
index 85fc234a92bc13a23b3b218abbbef9b45490e152..9b3be1c57388580e472a07a415f7356d01dfb889 100644 (file)
@@ -288,7 +288,7 @@ Beam_engraver::acknowledge_grob (Grob_info info)
            }
 
          stem->set_grob_property ("duration-log",
-                                   gh_int2scm (durlog));
+                                   scm_int2num (durlog));
          Moment stem_location = now - beam_start_mom_ + beam_start_location_;
          beam_info_->add_stem (stem_location,
  (durlog- 2) >? 0);
index ba6fcf3f9ca4e1e30571c6c28a99081b72357e5a..e9f992c774d7b77fc3bb4f2529b6dec5029ae516 100644 (file)
@@ -235,7 +235,7 @@ Beam::quanting (SCM smob)
   // debug quanting
   me->set_grob_property ("quant-score",
                         gh_double2scm (qscores[best_idx].demerits));
-  me->set_grob_property ("best-idx", gh_int2scm (best_idx));
+  me->set_grob_property ("best-idx", scm_int2num (best_idx));
 #endif
 
   return SCM_UNSPECIFIED;
index 9d86ab4157465744370258bf1b9c7c9b16227cf2..b4a98a36a70c764b01a886b200cc87d7cf3b545b 100644 (file)
@@ -77,7 +77,7 @@ Real
 Beam::get_beam_translation (Grob *me)
 {
   SCM func = me->get_grob_property ("space-function");
-  SCM s = gh_call2 (func, me->self_scm (), gh_int2scm (get_beam_count (me)));
+  SCM s = gh_call2 (func, me->self_scm (), scm_int2num (get_beam_count (me)));
   return gh_scm2double (s);
 }
 
@@ -203,7 +203,7 @@ position_with_maximal_common_beams (SCM left_beaming, SCM right_beaming,
       for ( SCM s = gh_car (right_beaming); gh_pair_p (s); s = gh_cdr (s))
        {
          int k = - right_dir * gh_scm2int (gh_car (s)) + i;
-         if (scm_memq (gh_int2scm (k), left_beaming) != SCM_BOOL_F)
+         if (scm_memq (scm_int2num (k), left_beaming) != SCM_BOOL_F)
            count ++;
        }
 
@@ -254,7 +254,7 @@ Beam::connect_beams (Grob *me)
                    start_point - this_dir * gh_scm2int (gh_car (s));
 
                  new_slice.add_point (new_beam_pos);
-                 gh_set_car_x (s, gh_int2scm (new_beam_pos));
+                 gh_set_car_x (s, scm_int2num (new_beam_pos));
                }
 
 
@@ -271,7 +271,7 @@ Beam::connect_beams (Grob *me)
          for (; gh_pair_p (s); s = gh_cdr (s))
            {
              int np = - this_dir * gh_scm2int (gh_car(s));
-             gh_set_car_x (s, gh_int2scm (np));
+             gh_set_car_x (s, scm_int2num (np));
              last_int.add_point (np);
            }
        }
@@ -417,7 +417,7 @@ Beam::brew_molecule (SCM grob)
                  int t = Stem::duration_log (st); 
 
                  SCM proc = me->get_grob_property ("flag-width-function");
-                 SCM result = gh_call1 (proc, gh_int2scm (t));
+                 SCM result = gh_call1 (proc, scm_int2num (t));
                  nw_f = gh_scm2double (result);
                }
              
@@ -494,8 +494,8 @@ Beam::get_default_dir (Grob *me)
   count[UP]  = count[DOWN] = 0;
   Direction d = DOWN;
 
-  Link_array<Item> stems=
-       Pointer_group_interface__extract_grobs (me, (Item*)0, "stems");
+  Link_array<Grob> stems=
+       Pointer_group_interface__extract_grobs (me, (Grob*)0, "stems");
 
   for (int i=0; i <stems.size (); i++)
     do {
@@ -514,10 +514,10 @@ Beam::get_default_dir (Grob *me)
   
   SCM func = me->get_grob_property ("dir-function");
   SCM s = gh_call2 (func,
-                   gh_cons (gh_int2scm (count[UP]),
-                            gh_int2scm (count[DOWN])),
-                   gh_cons (gh_int2scm (total[UP]),
-                            gh_int2scm (total[DOWN])));
+                   gh_cons (scm_int2num (count[UP]),
+                            scm_int2num (count[DOWN])),
+                   gh_cons (scm_int2num (total[UP]),
+                            scm_int2num (total[DOWN])));
 
   if (gh_number_p (s) && gh_scm2int (s))
     return to_dir (s);
@@ -533,8 +533,8 @@ Beam::get_default_dir (Grob *me)
 void
 Beam::set_stem_directions (Grob *me, Direction d)
 {
-  Link_array<Item> stems
-    =Pointer_group_interface__extract_grobs (me, (Item*) 0, "stems");
+  Link_array<Grob> stems
+    =Pointer_group_interface__extract_grobs (me, (Grob*) 0, "stems");
   
   for (int i=0; i <stems.size (); i++)
     {
@@ -599,13 +599,13 @@ struct Int_set
            before[RIGHT] = s[LEFT];
            after[LEFT] = s[RIGHT];
 
-           if (!before.empty_b())
+           if (before.empty_b() && before.length () > 0.0)
              {
                allowed_regions_.insert (before, i);
                i++;
              }
            allowed_regions_.del (i);
-           if (!after.empty_b ())
+           if (!after.empty_b () && after.length () > 0.0)
              {
                allowed_regions_.insert (after, i);
                i++;
@@ -707,7 +707,7 @@ Beam::consider_auto_knees (Grob* me, Direction d)
          Direction d =  (hps.center () < max_gap.center()) ?
            UP : DOWN ;
          
-         stem->set_grob_property ("direction", gh_int2scm (d));
+         stem->set_grob_property ("direction", scm_int2num (d));
 
          /*
            UGH. Check why we still need dir-forced; I think we can
@@ -754,7 +754,7 @@ Beam::set_stem_shorten (Grob *me)
   
   Real staff_space = Staff_symbol_referencer::staff_space (me);
   SCM shorten_elt = scm_list_ref (shorten,
-                                 gh_int2scm (beam_count <? (sz - 1)));
+                                 scm_int2num (beam_count <? (sz - 1)));
   Real shorten_f = gh_scm2double (shorten_elt) * staff_space;
 
   /* your similar cute comment here */
index 0a1678172eca7252366ac07db687b9dcba28f446..c29c74b2407c6b12dfba9ecb06ddc03699f45d8e 100644 (file)
@@ -52,7 +52,7 @@ Break_align_interface::self_align_callback (SCM element_smob, SCM axis)
   Direction bsd = item->break_status_dir ();
   if (bsd == LEFT)
     {
-      me->set_grob_property ("self-alignment-X", gh_int2scm (RIGHT));
+      me->set_grob_property ("self-alignment-X", scm_int2num (RIGHT));
     }
 
   /*
index 0a2876c92c66d47144e401c3aebd7be0ccf39dfc..78a90b9519368e961e0d7353416109664118de71 100644 (file)
@@ -106,7 +106,7 @@ do_break_substitution (SCM src)
 
       for (int i  =0 ; i< l ; i++)
        {
-         SCM si = gh_int2scm (i);
+         SCM si = scm_int2num (i);
          scm_vector_set_x (nv, si, do_break_substitution (scm_vector_ref (src, si))); 
        }
     }
index b677471bd8bbe6c3ecb7456b3741d3370d1cfb80..4f0a920dca27695566d73cf60f73906db82e420d 100644 (file)
@@ -122,7 +122,7 @@ Chord_tremolo_engraver::process_music ()
              stem_tremolo_ = new Item (get_property ("StemTremolo"));
              announce_grob(stem_tremolo_, repeat_->self_scm());
              stem_tremolo_->set_grob_property ("flag-count",
-                                               gh_int2scm (flags_));
+                                               scm_int2num (flags_));
 
            }
        }
index 5150bb0b3c4d087cd407daaaf3659c2b3e668507..45f7e6781dfc86e6d710f9b9a8daf834ba63d039 100644 (file)
@@ -130,7 +130,7 @@ Chord::step_scm (SCM tonic, SCM p)
   while (i < 0)
     i += 7;
   i++;
-  return gh_int2scm (i);
+  return scm_int2num (i);
 }
 
 /*
@@ -169,7 +169,7 @@ Chord::missing_thirds (SCM pitches)
        {
          int third = (unsmob_pitch (last)->notename_
                       - unsmob_pitch (tonic)-> notename_ + 7) % 7;
-         last = ly_pitch_transpose (last, scm_vector_ref (thirds, gh_int2scm (third)));
+         last = ly_pitch_transpose (last, scm_vector_ref (thirds, scm_int2num (third)));
        }
       
       if (step > gh_scm2int (step_scm (tonic, last)))
@@ -180,7 +180,7 @@ Chord::missing_thirds (SCM pitches)
              int third = (unsmob_pitch (last)->notename_
                           - unsmob_pitch (tonic)->notename_ + 7) % 7;
              last = ly_pitch_transpose (last, scm_vector_ref (thirds,
-                                                     gh_int2scm (third)));
+                                                     scm_int2num (third)));
            }
        }
       else
@@ -189,7 +189,7 @@ Chord::missing_thirds (SCM pitches)
        }
     }
   
-  return lower_step (tonic, missing, gh_int2scm (7));
+  return lower_step (tonic, missing, scm_int2num (7));
 }
 
 /* Return PITCHES with PITCH added not as lowest note */
@@ -246,12 +246,12 @@ Chord::tonic_add_sub_to_pitches (SCM tonic, SCM add, SCM sub)
        }
     }
   add = transpose_pitches (tonic, add);
-  add = lower_step (tonic, add, gh_int2scm (7));
+  add = lower_step (tonic, add, scm_int2num (7));
   add = scm_sort_list (add, Pitch::less_p_proc);
   add = ly_unique (add);
   
   sub = transpose_pitches (tonic, sub);
-  sub = lower_step (tonic, sub, gh_int2scm (7));
+  sub = lower_step (tonic, sub, scm_int2num (7));
   sub = scm_sort_list (sub, Pitch::less_p_proc);
   
   /* default chord includes upto 5: <1, 3, 5>   */
@@ -264,8 +264,8 @@ Chord::tonic_add_sub_to_pitches (SCM tonic, SCM add, SCM sub)
     tmp = ly_snoc (fifth, tmp);
   else if (dim_b)
     {
-      add = lower_step (tonic, add, gh_int2scm (5));
-      add = lower_step (tonic, add, gh_int2scm (7));
+      add = lower_step (tonic, add, scm_int2num (5));
+      add = lower_step (tonic, add, scm_int2num (7));
     }
 
   /* find missing thirds */
@@ -275,7 +275,7 @@ Chord::tonic_add_sub_to_pitches (SCM tonic, SCM add, SCM sub)
 
   /* if dim modifier is given: lower all missing */
   if (dim_b)
-    missing = lower_step (tonic, missing, gh_int2scm (0));
+    missing = lower_step (tonic, missing, scm_int2num (0));
   
   /* if additions include any 3, don't add third */
   SCM third = ly_cadr (base_pitches (tonic));
index b36fc2dc8aba81cd337d54b71a8c7af98ce1796d..e7b4dfa94ed9bbf51a0cc9efe3de4ef8c19e2577 100644 (file)
@@ -111,7 +111,7 @@ Clef_engraver::create_clef ()
       g->set_parent (clef_, Y_AXIS);
       g->set_parent (clef_, X_AXIS);
 
-      g->set_grob_property ("direction", gh_int2scm (sign (gh_scm2int (oct))));
+      g->set_grob_property ("direction", scm_int2num (sign (gh_scm2int (oct))));
       octavate_ = g;
       announce_grob(octavate_, SCM_EOL);
     }
index 9bcd708a0673b4ee4d3680bb6b4177e2de3ef252..9e2e0970ca140533a907021b77aad2211e5fe057 100644 (file)
@@ -32,10 +32,10 @@ Key_change_req::transpose (Pitch p)
 
          orig.transpose (p);
 
-         SCM key = gh_cons (gh_int2scm (orig.get_octave ()),
-                            gh_int2scm (orig.notename_));
+         SCM key = gh_cons (scm_int2num (orig.get_octave ()),
+                            scm_int2num (orig.notename_));
 
-         newlist = gh_cons (gh_cons (key, gh_int2scm (orig.alteration_)),
+         newlist = gh_cons (gh_cons (key, scm_int2num (orig.alteration_)),
                             newlist);
        }
       else if (gh_number_p (key))
@@ -43,8 +43,8 @@ Key_change_req::transpose (Pitch p)
          Pitch orig (0, gh_scm2int (key), gh_scm2int (alter));
          orig.transpose (p);
 
-         key =gh_int2scm (orig.notename_);
-         alter = gh_int2scm (orig.alteration_);
+         key =scm_int2num (orig.notename_);
+         alter = scm_int2num (orig.alteration_);
          newlist = gh_cons (gh_cons (key, alter), newlist);
        }
     }
index ceefac9709c6f2978ede0cdbce8212834efe914e..20c5bc79e8c6a60ff5fac58a2348f389db455084 100644 (file)
@@ -123,7 +123,9 @@ Stem::set_stemend (Grob*me, Real se)
 
 /*
   Note head that determines hshift for upstems
- */ 
+
+  WARNING: triggers direction
+*/ 
 Grob*
 Stem::support_head (Grob*me)
 {
@@ -152,7 +154,9 @@ Stem::head_count (Grob*me)
 
 /*
   The note head which forms one end of the stem.  
- */
+
+  WARNING: triggers direction
+*/
 Grob*
 Stem::first_head (Grob*me)
 {
@@ -246,7 +250,8 @@ Stem::add_head (Grob*me, Grob *n)
 bool
 Stem::invisible_b (Grob*me)
 {
-  return ! (head_count (me) && Note_head::get_balltype (support_head (me)) >= 1);
+  return ! (head_count (me)
+           && gh_scm2int (me->get_grob_property ("duration-log")) >= 1);
 }
 
 Direction
index 3b9790090cd48ad9f276051dd0eba92a09c24f57..4425102e63c6b75e5065911426945a1a20b2b356 100644 (file)
      . (
        (X-extent-callback . ,Axis_group_interface::group_extent_callback)
        (left-padding . 0.3)
-       (right-padding . 0.3)
+
+       ;; this is quite small, but it is very ugly to have
+       ;; accs closer to the previous note than to the next one.
+       (right-padding . 0.15)
        (meta . ((interfaces . (item-interface accidental-placement-interface))))
        ))
 
      . (
        (molecule-callback . ,Text_item::brew_molecule)
        (no-spacing-rods . #t)
+       (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
        (direction . -1)
        (padding . 0.5)
        (script-priority . 200)
index e7789b0fa594fcf86398ee0dfe33f947e1bdd2b8..14049d621fd4fa1360be87da498273d7df89e41c 100644 (file)
@@ -893,6 +893,18 @@ if 1:
        conversions.append (((1,5,62), conv,
        'visibility-lambda -> break-visibility'))
        
+
+if 1:
+       def conv (str):
+               if re.search (r'\addlyrics',str) \
+                      and re.search ('automaticMelismata', str)  == None:
+                       sys.stderr.write  ('automaticMelismata is turned on by default since 1.5.67. Please fix this by hand.')
+                       raise FatalConversionError()
+               return str
+
+       conversions.append (((1,5,67), conv,
+                            'automaticMelismata turned on by default'))
+
 if 1:
        def conv (str):
                str = re.sub ('ly-set-grob-property', 'ly-set-grob-property!', str)
@@ -901,6 +913,32 @@ if 1:
        
        conversions.append (((1,5,68), conv, 'ly-set-X-property -> ly-set-X-property!'))
 
+if 1:
+       def conv (str):
+               break_dict = {
+               "Instrument_name": "instrument-name",
+               "Left_edge_item": "left-edge",
+               "Span_bar": "span-bar",
+               "Breathing_sign": "breathing-sign",
+               "Staff_bar": "staff-bar",
+               "Clef_item": "clef",
+               "Key_item": "key-signature",
+               "Time_signature": "time-signature",
+               "Custos": "custos"
+               }
+               def func(match):
+                       props =  m.group (1)
+                       for (k,v) in break_dict.items():
+                               props = re.sub (k, v, props)
+
+                       
+                       return  "breakAlignOrder = #'( %s )" % props
+               str = re.sub (r"breakAlignOrder *= *#'\(([a-z_A-Z ]+)\)", func, str)
+               return str
+
+       # 40 ? 
+       conversions.append (((1,5,40), conv, 'breakAlignOrder property names'))
+       
 
 ################################
 #      END OF CONVERSIONS      
index 9009214e7e4773b48ca85f58ffc6bd44456f1b7c..d15fd4452a889c57266d3ba43d0bb036f81c59d5 100644 (file)
@@ -422,11 +422,18 @@ def setup_environment ():
 #what a name.
 def set_setting (dict, key, val):
        try:
-               val = string.atof (val)
+               val = string.atoi (val)
        except ValueError:
                #warning (_ ("invalid value: %s") % `val`)
                pass
 
+       if type(val) == type ('hoi'):
+               try:
+                       val = string.atof (val)
+               except ValueError:
+                       #warning (_ ("invalid value: %s") % `val`)
+                       pass
+
        try:
                dict[key].append (val)
        except KeyError:
@@ -638,7 +645,7 @@ def global_latex_preamble (extra):
 '''
        
        if extra['pagenumber'] and extra['pagenumber'][-1] and extra['pagenumber'][-1] != 'no':
-               s = s + '\setcounter{page}{%s}\n' % (extra['pagenumber'][-1])
+               s = s + '\setcounter{page}{%d}\n' % (extra['pagenumber'][-1])
                 s = s + '\\pagestyle{plain}\n'
        else:
                s = s + '\\pagestyle{empty}\n'