]> git.donarmstrong.com Git - lilypond.git/commitdiff
patch::: 1.5.11.jcn2
authorJan Nieuwenhuizen <janneke@gnu.org>
Sat, 22 Sep 2001 10:00:14 +0000 (12:00 +0200)
committerJan Nieuwenhuizen <janneke@gnu.org>
Sat, 22 Sep 2001 10:00:14 +0000 (12:00 +0200)
1.5.11
======

* Allow breaks at measures starting with grace notes.

* Bugfix: don't give up when there is one entirely unspaceable
measure/line.

* Some GH deprecation.

* Midi module: add timestamps.

*

99 files changed:
CHANGES
VERSION
lily/afm.cc
lily/align-interface.cc
lily/arpeggio.cc
lily/auto-beam-engraver.cc
lily/auto-change-iterator.cc
lily/axis-group-engraver.cc
lily/axis-group-interface.cc
lily/beam.cc
lily/break-align-engraver.cc
lily/break-align-item.cc
lily/chord-name-engraver.cc
lily/chord.cc
lily/collision.cc
lily/command-request.cc
lily/dot-column.cc
lily/duration.cc
lily/dynamic-performer.cc
lily/engraver-group-engraver.cc
lily/figured-bass-engraver.cc
lily/font-interface.cc
lily/gourlay-breaking.cc
lily/grob.cc
lily/hairpin.cc
lily/include/lily-guile.hh
lily/include/protected-scm.hh
lily/item.cc
lily/key-engraver.cc
lily/key-item.cc
lily/lexer.ll
lily/lily-guile.cc
lily/line-of-score.cc
lily/line-spanner.cc
lily/local-key-engraver.cc
lily/local-key-item.cc
lily/lookup.cc
lily/lyric-phrasing-engraver.cc
lily/main.cc
lily/molecule.cc
lily/moment.cc
lily/music-sequence.cc
lily/music.cc
lily/my-lily-parser.cc
lily/new-spacing-spanner.cc
lily/note-column.cc
lily/note-head.cc
lily/note-heads-engraver.cc
lily/output-property-engraver.cc
lily/paper-def.cc
lily/paper-outputter.cc
lily/paper-score.cc
lily/parser.yy
lily/part-combine-music-iterator.cc
lily/performer-group-performer.cc
lily/piano-pedal-engraver.cc
lily/pitch.cc
lily/porrectus.cc
lily/property-engraver.cc
lily/repeat-acknowledge-engraver.cc
lily/repeated-music.cc
lily/request-chord-iterator.cc
lily/request-chord.cc
lily/rest-collision.cc
lily/scaled-font-metric.cc
lily/score.cc
lily/script-engraver.cc
lily/script.cc
lily/separating-group-spanner.cc
lily/separation-item.cc
lily/sequential-music-iterator.cc
lily/side-position-interface.cc
lily/simple-spacer.cc
lily/simultaneous-music-iterator.cc
lily/slur-bezier-bow.cc
lily/slur.cc
lily/spaceable-grob.cc
lily/spacing-spanner.cc
lily/span-arpeggio-engraver.cc
lily/span-bar.cc
lily/spanner.cc
lily/stem.cc
lily/system-start-delimiter.cc
lily/text-item.cc
lily/text-spanner.cc
lily/tie-engraver.cc
lily/tie.cc
lily/time-signature-performer.cc
lily/time-signature.cc
lily/translator-def.cc
lily/translator-group.cc
lily/translator.cc
lily/tuplet-bracket.cc
lily/tuplet-engraver.cc
lily/unfolded-repeat-iterator.cc
lily/volta-engraver.cc
lily/volta-spanner.cc
modules/midi.c
scripts/midi2ly.py [new file with mode: 0644]

diff --git a/CHANGES b/CHANGES
index a36a5782ce3bac15320bee986bd581c8538a651a..6a3d0b3cfeff2f20804e71a607ce30fcfb9751d8 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,17 @@
+1.5.11
+======
+
+* Allow breaks at measures starting with grace notes.
+
+* Bugfix: don't give up when there is one entirely unspaceable
+measure/line.
+
+* Some GH deprecation.
+
+* Midi module: add timestamps.
+
+* 
+
 1.5.11.jcn1
 ===========
 
diff --git a/VERSION b/VERSION
index cd50e05bad62c104a56a8b52eb90c95f0f10488c..8de2d3c03b3685f1aa4a3af7235dfa2aa53d1e74 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -2,7 +2,7 @@ PACKAGE_NAME=LilyPond
 MAJOR_VERSION=1
 MINOR_VERSION=5
 PATCH_LEVEL=11
-MY_PATCH_LEVEL=jcn1
+MY_PATCH_LEVEL=jcn2
 
 # use the above to send patches: MY_PATCH_LEVEL is always empty for a
 # released version.
index 8fac391067b134cfdcdc21d4802ef13172128ae8..f09d63bad58ce915cad52de595cfcbc345318fdd 100644 (file)
@@ -159,7 +159,7 @@ Adobe_font_metric::find_by_name (String s) const
       return m;
     }
   
-  SCM at = (gh_list (ly_symbol2scm ("char"),
+  SCM at = (scm_listify (ly_symbol2scm ("char"),
                      gh_int2scm (cm->code),
                      SCM_UNDEFINED));
   
index 6f6321af680df9f7fa860101ead0906474c358db..8211c349af283717552e9abeba981fac6f614c2b 100644 (file)
@@ -123,8 +123,8 @@ Align_interface::align_elements_to_extents (Grob * me, Axis a)
   SCM thr = me->get_grob_property ("threshold");
   if (gh_pair_p (thr))
     {
-      threshold[SMALLER] = gh_scm2double (gh_car (thr));
-      threshold[BIGGER] = gh_scm2double (gh_cdr (thr));      
+      threshold[SMALLER] = gh_scm2double (ly_car (thr));
+      threshold[BIGGER] = gh_scm2double (ly_cdr (thr));      
     }
 
   
@@ -143,19 +143,19 @@ Align_interface::align_elements_to_extents (Grob * me, Axis a)
          // todo: fucks up if item both in Halign & Valign. 
          SCM min_dims = e->remove_grob_property ("minimum-space");
          if (gh_pair_p (min_dims) &&
-             gh_number_p (gh_car (min_dims))
-             && gh_number_p (gh_cdr (min_dims)))
+             gh_number_p (ly_car (min_dims))
+             && gh_number_p (ly_cdr (min_dims)))
            {
              y.unite (ly_scm2interval (min_dims));
            }
          
          SCM extra_dims = e->remove_grob_property ("extra-space");
          if (gh_pair_p (extra_dims) &&
-             gh_number_p (gh_car (extra_dims))
-             && gh_number_p (gh_cdr (extra_dims)))
+             gh_number_p (ly_car (extra_dims))
+             && gh_number_p (ly_cdr (extra_dims)))
            {
-             y[LEFT] += gh_scm2double (gh_car (extra_dims));
-             y[RIGHT] += gh_scm2double (gh_cdr (extra_dims));
+             y[LEFT] += gh_scm2double (ly_car (extra_dims));
+             y[RIGHT] += gh_scm2double (ly_cdr (extra_dims));
            }
 
          elems.push (e);
@@ -245,7 +245,7 @@ Align_interface::align_elements_to_extents (Grob * me, Axis a)
 Axis
 Align_interface::axis (Grob*me)
 {
-  return  Axis (gh_scm2int (gh_car (me->get_grob_property ("axes"))));
+  return  Axis (gh_scm2int (ly_car (me->get_grob_property ("axes"))));
 }
 
 
@@ -259,10 +259,10 @@ Align_interface::get_count (Grob*me,Grob*s)
   int c =0;
   while (gh_pair_p (e))
     {
-      if (gh_car (e) == s->self_scm ())
+      if (ly_car (e) == s->self_scm ())
        break;
       c++;
-      e = gh_cdr (e);
+      e = ly_cdr (e);
     }
   return c;
 }
index 900949224c34ce87afb0529127e99b3b06f7562d..5b0e755577b254f27b611484f4a51ef5ceb56732 100644 (file)
@@ -29,9 +29,9 @@ Arpeggio::brew_molecule (SCM smob)
   Grob *me = unsmob_grob (smob);
   
   Grob * common = me;
-  for (SCM s = me->get_grob_property ("stems"); gh_pair_p (s); s = gh_cdr (s))
+  for (SCM s = me->get_grob_property ("stems"); gh_pair_p (s); s = ly_cdr (s))
     {
-      Grob * stem =  unsmob_grob (gh_car (s));
+      Grob * stem =  unsmob_grob (ly_car (s));
       common =  common->common_refpoint (Staff_symbol_referencer::staff_symbol_l (stem),
                                 Y_AXIS);
     }
@@ -47,9 +47,9 @@ Arpeggio::brew_molecule (SCM smob)
   Interval heads;
   Real my_y = me->relative_coordinate (common, Y_AXIS);
       
-  for (SCM s = me->get_grob_property ("stems"); gh_pair_p (s); s = gh_cdr (s))
+  for (SCM s = me->get_grob_property ("stems"); gh_pair_p (s); s = ly_cdr (s))
     {
-      Grob * stem = unsmob_grob (gh_car (s));
+      Grob * stem = unsmob_grob (ly_car (s));
       Grob * ss = Staff_symbol_referencer::staff_symbol_l (stem);
       Interval iv =Stem::head_positions (stem);
       iv *= Staff_symbol::staff_space (ss)/2.0;
index 0f8bf698bd35b61575d4508c7c1c996a099eafe3..8b5d8687f3185d2c4e228f64d461663e95e58bec 100644 (file)
@@ -109,19 +109,19 @@ Auto_beam_engraver::Auto_beam_engraver ()
 bool
 Auto_beam_engraver::test_moment (Direction dir, Moment test_mom)
 {
-  SCM wild = gh_list (ly_symbol2scm ("*"), ly_symbol2scm ("*"), SCM_UNDEFINED);
+  SCM wild = scm_listify (ly_symbol2scm ("*"), ly_symbol2scm ("*"), SCM_UNDEFINED);
   SCM function;
   if (dir == START)
-    function = gh_list (ly_symbol2scm ("begin"), SCM_UNDEFINED);
+    function = scm_listify (ly_symbol2scm ("begin"), SCM_UNDEFINED);
   else
-    function = gh_list (ly_symbol2scm ("end"), SCM_UNDEFINED);
+    function = scm_listify (ly_symbol2scm ("end"), SCM_UNDEFINED);
 
   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 = gh_list (gh_int2scm (num), gh_int2scm (den), SCM_UNDEFINED);
+  SCM time = scm_listify (gh_int2scm (num), gh_int2scm (den), SCM_UNDEFINED);
 
-  SCM type = gh_list (gh_int2scm (test_mom.num ()),
+  SCM type = scm_listify (gh_int2scm (test_mom.num ()),
                      gh_int2scm (test_mom.den ()), SCM_UNDEFINED);
 
   SCM settings = get_property ("autoBeamSettings");
@@ -144,23 +144,23 @@ Auto_beam_engraver::test_moment (Direction dir, Moment test_mom)
   /* second guess: property generic time exception */
   SCM m = gh_assoc (gh_append3 (function, wild, time), settings);
   
-  if (m != SCM_BOOL_F && unsmob_moment (gh_cdr (m)))
-    moment = * unsmob_moment (gh_cdr (m));
+  if (m != SCM_BOOL_F && unsmob_moment (ly_cdr (m)))
+    moment = * unsmob_moment (ly_cdr (m));
 
   /* third guess: property time exception, specific for duration type */
   m = gh_assoc (gh_append3 (function, type, time), settings);
-  if (m != SCM_BOOL_F && unsmob_moment (gh_cdr (m)))
-    moment = * unsmob_moment (gh_cdr (m));
+  if (m != SCM_BOOL_F && unsmob_moment (ly_cdr (m)))
+    moment = * unsmob_moment (ly_cdr (m));
 
   /* fourth guess [user override]: property plain generic */
   m = gh_assoc (gh_append3 (function, wild, wild), settings);
-  if (m != SCM_BOOL_F && unsmob_moment (gh_cdr (m)))
-    moment = * unsmob_moment (gh_cdr (m));
+  if (m != SCM_BOOL_F && unsmob_moment (ly_cdr (m)))
+    moment = * unsmob_moment (ly_cdr (m));
 
   /* fifth guess [user override]: property plain, specific for duration type */
   m = gh_assoc (gh_append3 (function, type, wild), settings);
-  if (m != SCM_BOOL_F && unsmob_moment (gh_cdr (m)))
-    moment = * unsmob_moment (gh_cdr (m));
+  if (m != SCM_BOOL_F && unsmob_moment (ly_cdr (m)))
+    moment = * unsmob_moment (ly_cdr (m));
   
   Rational r;
   if (moment.to_bool ())
index 2f29c4be38e47c49f43f0dc175ac84f6840b06b6..32b1b05608a6f05c763e19ff7e2764780a031af5 100644 (file)
@@ -85,8 +85,8 @@ Auto_change_iterator::pending_pitch (Moment m) const
   while (1)
     {
       SCM muses = iter->get_music (m);
-      for (SCM s = muses; gh_pair_p (s); s=gh_cdr (s))
-       if (Note_req* nr = dynamic_cast<Note_req*> (unsmob_music (gh_car (s))))
+      for (SCM s = muses; gh_pair_p (s); s=ly_cdr (s))
+       if (Note_req* nr = dynamic_cast<Note_req*> (unsmob_music (ly_car (s))))
          {
            ps.push (*unsmob_pitch (nr->get_mus_property ("pitch")));
          }
index 1a68c4251fd3fbeb155ac0594e371727dfa5c1f3..3c1679614737daee928ef2d242583073dd4b730e 100644 (file)
@@ -65,21 +65,21 @@ Axis_group_engraver::finalize ()
   String type = daddy_grav_l ()->type_str_ ;
   SCM dims = get_property ("VerticalExtent");
   
-  if (gh_pair_p (dims) && gh_number_p (gh_car (dims))
-      && gh_number_p (gh_cdr (dims)))
+  if (gh_pair_p (dims) && gh_number_p (ly_car (dims))
+      && gh_number_p (ly_cdr (dims)))
     {
       staffline_p_->set_extent_callback (Grob::preset_extent_proc, Y_AXIS);
       staffline_p_->set_grob_property ("extent-Y", dims);
     }
 
   dims = get_property ("MinimumVerticalExtent");
-  if (gh_pair_p (dims) && gh_number_p (gh_car (dims))
-      && gh_number_p (gh_cdr (dims)))
+  if (gh_pair_p (dims) && gh_number_p (ly_car (dims))
+      && gh_number_p (ly_cdr (dims)))
     staffline_p_->set_grob_property ("minimum-extent-Y", dims);
 
   dims = get_property ("ExtraVerticalExtent");
-  if (gh_pair_p (dims) && gh_number_p (gh_car (dims))
-      && gh_number_p (gh_cdr (dims)))
+  if (gh_pair_p (dims) && gh_number_p (ly_car (dims))
+      && gh_number_p (ly_cdr (dims)))
     staffline_p_->set_grob_property ("extra-extent-Y", dims);
 
   Grob *  it = unsmob_grob (get_property ("currentCommandColumn"));
index c974f3fa767b453ec10012c747befb6c6d4090a3..02960f6aba86bc48e5214622d2e9c5e7356483a4 100644 (file)
@@ -13,9 +13,9 @@
 void
 Axis_group_interface::add_element (Grob*me,Grob *e)
 {
-  for (SCM ax = me->get_grob_property ("axes"); ax != SCM_EOL ; ax = gh_cdr (ax))
+  for (SCM ax = me->get_grob_property ("axes"); ax != SCM_EOL ; ax = ly_cdr (ax))
     {
-      Axis a = (Axis) gh_scm2int (gh_car (ax));
+      Axis a = (Axis) gh_scm2int (ly_car (ax));
       
       if (!e->parent_l (a))
        e->set_parent (me, a);
@@ -41,9 +41,9 @@ Interval
 Axis_group_interface::relative_group_extent (Axis a, Grob *common, SCM elts)
 {
   Interval r;
-  for (SCM s = elts; gh_pair_p (s); s = gh_cdr (s))
+  for (SCM s = elts; gh_pair_p (s); s = ly_cdr (s))
     {
-      Grob * se = unsmob_grob (gh_car (s));
+      Grob * se = unsmob_grob (ly_car (s));
       Interval dims = se->extent (common, a);
       if (!dims.empty_b ())
        r.unite (dims);
@@ -60,9 +60,9 @@ Axis_group_interface::group_extent_callback (SCM element_smob, SCM scm_axis)
 
   Grob * common = (Grob*) me;
 
-  for (SCM s = me->get_grob_property ("elements"); gh_pair_p (s); s = gh_cdr (s))
+  for (SCM s = me->get_grob_property ("elements"); gh_pair_p (s); s = ly_cdr (s))
     {
-      Grob * se = unsmob_grob (gh_car (s));
+      Grob * se = unsmob_grob (ly_car (s));
       common = se->common_refpoint (common, a);
     }
 
@@ -114,9 +114,9 @@ Axis_group_interface::get_children (Grob*me)
   if (!has_interface (me))
     return childs;
   
-  for (SCM ep = me->get_grob_property ("elements"); gh_pair_p (ep); ep = gh_cdr (ep))
+  for (SCM ep = me->get_grob_property ("elements"); gh_pair_p (ep); ep = ly_cdr (ep))
     {
-      Grob* e = unsmob_grob (gh_car (ep));
+      Grob* e = unsmob_grob (ly_car (ep));
       if (e)
        childs.concat (Axis_group_interface::get_children (e));
     }
index df1bf65ffa809ecc77c2ca32ca169d3b178059ac..b45edf9b610bc17ea6bfcf9e211561904dd0be32 100644 (file)
@@ -52,9 +52,9 @@ int
 Beam::get_multiplicity (Grob*me) 
 {
   int m = 0;
-  for (SCM s = me->get_grob_property ("stems"); gh_pair_p (s); s = gh_cdr (s))
+  for (SCM s = me->get_grob_property ("stems"); gh_pair_p (s); s = ly_cdr (s))
     {
-      Grob * sc = unsmob_grob (gh_car (s));
+      Grob * sc = unsmob_grob (ly_car (s));
 
       if (Stem::has_interface (sc))
        m = m >? Stem::beam_count (sc,LEFT) >? Stem::beam_count (sc,RIGHT);
@@ -299,8 +299,8 @@ Beam::after_line_breaking (SCM smob)
     somewhere (?), I guess, not by looping here. */
   
   SCM list = me->get_grob_property ("y-dy-callbacks");
-  for (SCM i = list; gh_pair_p (i); i = gh_cdr (i))
-    gh_call1 (gh_car (i), smob);
+  for (SCM i = list; gh_pair_p (i); i = ly_cdr (i))
+    gh_call1 (ly_car (i), smob);
 
   // UGH. Y is not in staff position unit?
   // Ik dacht datwe daar juist van weg wilden?
@@ -458,8 +458,8 @@ Beam::quantise_dy (SCM smob)
                         gh_double2scm (me->paper_l ()->get_var ("stafflinethickness")
                                        / 1.0));
   
-  for (SCM s = quants; gh_pair_p (s); s = gh_cdr (s))
-    a.push (gh_scm2double (gh_car (s)));
+  for (SCM s = quants; gh_pair_p (s); s = ly_cdr (s))
+    a.push (gh_scm2double (ly_car (s)));
   
   if (a.size () > 1)
     {
@@ -703,15 +703,15 @@ Beam::quantise_y_f (Grob*me,Real y, Real dy, int quant_dir)
   SCM proc = me->get_grob_property ("vertical-position-quant-function");
   SCM quants = scm_apply (proc,
                          me->self_scm (),
-                         gh_list (gh_int2scm (multiplicity),
+                         scm_listify (gh_int2scm (multiplicity),
                                   gh_double2scm (dy/staff_space),
                                   gh_double2scm (thick/staff_space),
                                   SCM_EOL, SCM_UNDEFINED));
   
   Array<Real> a;
 
-  for (; gh_pair_p (quants); quants = gh_cdr (quants))
-    a.push (gh_scm2double (gh_car (quants)));
+  for (; gh_pair_p (quants); quants = ly_cdr (quants))
+    a.push (gh_scm2double (ly_car (quants)));
 
   if (a.size () <= 1)
     return y;
index a403c4a60ecd03fa8c5a1e7140795c8e87b77f23..21551ad5b29db6b28a3c2dc813c8a251767f9e05 100644 (file)
@@ -51,20 +51,20 @@ void
 Break_align_engraver::stop_translation_timestep ()
 {
   SCM order = get_property ("breakAlignOrder");
-  for (; gh_pair_p (order); order = gh_cdr (order))
+  for (; gh_pair_p (order); order = ly_cdr (order))
     {
-      SCM p = scm_assoc (gh_car (order), column_alist_);
+      SCM p = scm_assoc (ly_car (order), column_alist_);
       if (gh_pair_p (p))
        {
-         add_column (gh_cdr (p));
-         column_alist_ = scm_assoc_remove_x (column_alist_, gh_car (order));
+         add_column (ly_cdr (p));
+         column_alist_ = scm_assoc_remove_x (column_alist_, ly_car (order));
        }
     }
 
-  for (SCM p = column_alist_; gh_pair_p (p); p = gh_cdr (p))
+  for (SCM p = column_alist_; gh_pair_p (p); p = ly_cdr (p))
     {
-      SCM pair = gh_car (p);
-      add_column (gh_cdr (pair));
+      SCM pair = ly_car (p);
+      add_column (ly_cdr (pair));
     }
 
   
@@ -136,7 +136,7 @@ Break_align_engraver::acknowledge_grob (Grob_info inf)
 
       if (s != SCM_BOOL_F)
        {
-         Grob *e =  unsmob_grob (gh_cdr (s));
+         Grob *e =  unsmob_grob (ly_cdr (s));
          group = dynamic_cast<Item*> (e);
        }
       else
index 28b93b81848a9ff53da0784c53ca99255bd021ec..709687ce286a59c94a9ed9a2151698ffef14cc91 100644 (file)
@@ -129,7 +129,7 @@ Break_align_interface::do_alignment (Grob *me)
       SCM extra_space;
       if (e != SCM_BOOL_F)
        {
-         extra_space = gh_cdr (e);
+         extra_space = ly_cdr (e);
        }
       else
        {
@@ -139,7 +139,7 @@ Break_align_interface::do_alignment (Grob *me)
          extra_space = scm_list_n (ly_symbol2scm ("minimum-space"), gh_double2scm (0.0), SCM_UNDEFINED);
        }
 
-      SCM symbol = gh_car (extra_space);
+      SCM symbol = ly_car (extra_space);
       Real spc = gh_scm2double (gh_cadr (extra_space));
 
       dists.push (spc);
@@ -149,14 +149,14 @@ Break_align_interface::do_alignment (Grob *me)
 
 
   // skip the first sym.
-  symbol_list  = gh_cdr (scm_reverse (symbol_list));
+  symbol_list  = ly_cdr (scm_reverse (symbol_list));
   for (int i=0; i <elems.size ()-1; i++)
     {
-      elems[i]->set_grob_property (gh_car (symbol_list),
+      elems[i]->set_grob_property (ly_car (symbol_list),
                                  scm_cons (gh_double2scm (0),
                                            gh_double2scm (dists[i+1])));
 
-      symbol_list = gh_cdr (symbol_list);
+      symbol_list = ly_cdr (symbol_list);
     }
 
 
@@ -198,12 +198,12 @@ Break_align_interface::do_alignment (Grob *me)
   
   Real stretch_distance =0.;
   
-  if (gh_car (symbol_list) == ly_symbol2scm ("extra-space"))
+  if (ly_car (symbol_list) == ly_symbol2scm ("extra-space"))
     {
       spring_len += dists.top ();
       stretch_distance = dists.top ();
     }
-  else if (gh_car (symbol_list) == ly_symbol2scm ("minimum-space"))
+  else if (ly_car (symbol_list) == ly_symbol2scm ("minimum-space"))
     {
       spring_len = spring_len >? dists.top ();
       stretch_distance = spring_len;
index 7a4302a91209f7a298e1d843ebcfee07595f963c..da58ffaaf10d0ca3113814e9d0936bfb673d4aa4 100644 (file)
@@ -52,10 +52,10 @@ Chord_name_engraver::Chord_name_engraver ()
 void
 Chord_name_engraver::add_note (Note_req* n)
 {
-  SCM pitches = gh_car (chord_);
-  SCM modifiers = gh_cdr (chord_);
-  SCM inversion = modifiers == SCM_EOL ? SCM_EOL : gh_car (modifiers);
-  SCM bass = modifiers == SCM_EOL ? SCM_EOL : gh_cdr (modifiers);
+  SCM pitches = ly_car (chord_);
+  SCM modifiers = ly_cdr (chord_);
+  SCM inversion = modifiers == SCM_EOL ? SCM_EOL : ly_car (modifiers);
+  SCM bass = modifiers == SCM_EOL ? SCM_EOL : ly_cdr (modifiers);
   
   if (n->get_mus_property ("inversion") == SCM_BOOL_T)
     inversion = n->get_mus_property ("pitch");
@@ -88,13 +88,13 @@ Chord_name_engraver::acknowledge_grob (Grob_info i)
 void
 Chord_name_engraver::create_grobs ()
 {
-  if (!chord_name_p_ && gh_car (chord_) != SCM_EOL)
+  if (!chord_name_p_ && ly_car (chord_) != SCM_EOL)
     {
       chord_name_p_ = new Item (get_property ("ChordName"));
       chord_name_p_->set_grob_property ("chord", chord_);
       announce_grob (chord_name_p_, 0);
       SCM s = get_property ("chordChanges");
-      if (to_boolean (s) && gh_car (last_chord_) != SCM_EOL
+      if (to_boolean (s) && ly_car (last_chord_) != SCM_EOL
                  && gh_equal_p (chord_, last_chord_))
        chord_name_p_->set_grob_property ("begin-of-line-visible", SCM_BOOL_T);
     }
@@ -109,7 +109,7 @@ Chord_name_engraver::stop_translation_timestep ()
     }
   chord_name_p_ = 0;
 
-  if (gh_car (chord_) != SCM_EOL)
+  if (ly_car (chord_) != SCM_EOL)
     last_chord_ = chord_;
   chord_ = gh_cons (SCM_EOL, gh_cons (SCM_EOL, SCM_EOL));
 }
index 233c5722d24e8f87d88227f257a56c85d6196b3f..01568367fe150009f725899c9913f9befc50062a 100644 (file)
@@ -24,11 +24,11 @@ SCM
 ly_unique (SCM list)
 {
   SCM unique = SCM_EOL;
-  for (SCM i = list; gh_pair_p (i); i = gh_cdr (i))
+  for (SCM i = list; gh_pair_p (i); i = ly_cdr (i))
     {
-      if (!gh_pair_p (gh_cdr (i))
-         || !gh_equal_p (gh_car (i), gh_cadr (i)))
-       unique = gh_cons (gh_car (i), unique);
+      if (!gh_pair_p (ly_cdr (i))
+         || !gh_equal_p (ly_car (i), gh_cadr (i)))
+       unique = gh_cons (ly_car (i), unique);
     }
   return gh_reverse (unique);
 }
@@ -38,10 +38,10 @@ SCM
 ly_remove_member (SCM s, SCM list)
 {
   SCM removed = SCM_EOL;
-  for (SCM i = list; gh_pair_p (i); i = gh_cdr (i))
+  for (SCM i = list; gh_pair_p (i); i = ly_cdr (i))
     {
-      if (!gh_equal_p (gh_car (i), s))
-       removed = gh_cons (gh_car (i), removed);
+      if (!gh_equal_p (ly_car (i), s))
+       removed = gh_cons (ly_car (i), removed);
     }
   return gh_reverse (removed);
 }
@@ -50,7 +50,7 @@ ly_remove_member (SCM s, SCM list)
 SCM
 ly_snoc (SCM s, SCM list)
 {
-  return gh_append2 (list, gh_list (s, SCM_UNDEFINED));
+  return gh_append2 (list, scm_listify (s, SCM_UNDEFINED));
 }
 
 
@@ -63,8 +63,8 @@ ly_split_list (SCM s, SCM list)
   SCM after = list;
   for (; gh_pair_p (after);)
     {
-      SCM i = gh_car (after);
-      after = gh_cdr (after);
+      SCM i = ly_car (after);
+      after = ly_cdr (after);
       if (gh_equal_p (i, s))
        break;
       before = gh_cons (i, before);
@@ -86,8 +86,8 @@ Chord::base_pitches (SCM tonic)
   SCM minor = Pitch (0, 2, -1).smobbed_copy ();
 
   base = gh_cons (tonic, base);
-  base = gh_cons (Pitch::transpose (gh_car (base), major), base);
-  base = gh_cons (Pitch::transpose (gh_car (base), minor), base);
+  base = gh_cons (Pitch::transpose (ly_car (base), major), base);
+  base = gh_cons (Pitch::transpose (ly_car (base), minor), base);
 
   return gh_reverse (base);
 }
@@ -99,9 +99,9 @@ Chord::transpose_pitches (SCM tonic, SCM pitches)
      hoe doe je lambda in C?
   */
   SCM transposed = SCM_EOL;
-  for (SCM i = pitches; gh_pair_p (i); i = gh_cdr (i))
+  for (SCM i = pitches; gh_pair_p (i); i = ly_cdr (i))
     {
-      transposed = gh_cons (Pitch::transpose (tonic, gh_car (i)),
+      transposed = gh_cons (Pitch::transpose (tonic, ly_car (i)),
                            transposed);
     }
   return gh_reverse (transposed);
@@ -117,10 +117,10 @@ SCM
 Chord::lower_step (SCM tonic, SCM pitches, SCM step)
 {
   SCM lowered = SCM_EOL;
-  for (SCM i = pitches; gh_pair_p (i); i = gh_cdr (i))
+  for (SCM i = pitches; gh_pair_p (i); i = ly_cdr (i))
     {
-      SCM p = gh_car (i);
-      if (gh_equal_p (step_scm (tonic, gh_car (i)), step)
+      SCM p = ly_car (i);
+      if (gh_equal_p (step_scm (tonic, ly_car (i)), step)
          || gh_scm2int (step) == 0)
        {
          p = Pitch::transpose (p, Pitch (0, 0, -1).smobbed_copy ());
@@ -138,22 +138,22 @@ Chord::member_notename (SCM p, SCM pitches)
   SCM member = gh_member (p, pitches);
   if (member == SCM_BOOL_F)
     {
-      for (SCM i = pitches; gh_pair_p (i); i = gh_cdr (i))
+      for (SCM i = pitches; gh_pair_p (i); i = ly_cdr (i))
        {
          /*
            Urg, eindelijk gevonden: () != #f, kan maar niet aan wennen.
            Anders kon iets korter...
           */
          if (unsmob_pitch (p)->notename_i_
-             == unsmob_pitch (gh_car (i))->notename_i_)
+             == unsmob_pitch (ly_car (i))->notename_i_)
            {
-             member = gh_car (i);
+             member = ly_car (i);
              break;
            }
        }
     }
   else
-    member = gh_car (member);
+    member = ly_car (member);
   return member;
 }
 
@@ -165,20 +165,20 @@ Chord::member_pitch (SCM p, SCM pitches)
   SCM member = gh_member (p, pitches);
   if (member == SCM_BOOL_F)
     {
-      for (SCM i = pitches; gh_pair_p (i); i = gh_cdr (i))
+      for (SCM i = pitches; gh_pair_p (i); i = ly_cdr (i))
        {
          if (unsmob_pitch (p)->notename_i_
-             == unsmob_pitch (gh_car (i))->notename_i_
+             == unsmob_pitch (ly_car (i))->notename_i_
              && unsmob_pitch (p)->alteration_i_
-             == unsmob_pitch (gh_car (i))->alteration_i_)
+             == unsmob_pitch (ly_car (i))->alteration_i_)
            {
-             member = gh_car (i);
+             member = ly_car (i);
              break;
            }
        }
     }
   else
-    member = gh_car (member);
+    member = ly_car (member);
   return member;
 }
 
@@ -219,13 +219,13 @@ Chord::missing_thirds (SCM pitches)
                      thirds);
   thirds = scm_vector (gh_reverse (thirds));
   
-  SCM tonic = gh_car (pitches);
+  SCM tonic = ly_car (pitches);
   SCM last = tonic;
   SCM missing = SCM_EOL;
 
   for (SCM i = pitches; gh_pair_p (i);)
     {
-      SCM p = gh_car (i);
+      SCM p = ly_car (i);
       int step = gh_scm2int (step_scm (tonic, p));
       
       if (unsmob_pitch (last)->notename_i_ == unsmob_pitch (p)->notename_i_)
@@ -248,7 +248,7 @@ Chord::missing_thirds (SCM pitches)
        }
       else
        {
-         i = gh_cdr (i);
+         i = ly_cdr (i);
        }
     }
   
@@ -261,7 +261,7 @@ Chord::add_above_tonic (SCM pitch, SCM pitches)
 {
   /* Should we maybe first make sure that PITCH is below tonic? */
   if (pitches != SCM_EOL)
-    while (Pitch::less_p (pitch, gh_car (pitches)) == SCM_BOOL_T)
+    while (Pitch::less_p (pitch, ly_car (pitches)) == SCM_BOOL_T)
       pitch = Pitch::transpose (pitch, Pitch (1, 0, 0).smobbed_copy ());
    
   pitches = gh_cons (pitch, pitches);
@@ -273,7 +273,7 @@ SCM
 Chord::add_below_tonic (SCM pitch, SCM pitches)
 {
   if (pitches != SCM_EOL)
-    while (Pitch::less_p (gh_car (pitches), pitch) == SCM_BOOL_T)
+    while (Pitch::less_p (ly_car (pitches), pitch) == SCM_BOOL_T)
       pitch = Pitch::transpose (pitch, Pitch (-1, 0, 0).smobbed_copy ());
   return gh_cons (pitch, pitches);
 }
@@ -295,9 +295,9 @@ Chord::tonic_add_sub_to_pitches (SCM tonic, SCM add, SCM sub)
 {
   /* urg: catch dim modifier: 3rd, 5th, 7th, .. should be lowered */
   bool dim_b = false;
-  for (SCM i = add; gh_pair_p (i); i = gh_cdr (i))
+  for (SCM i = add; gh_pair_p (i); i = ly_cdr (i))
     {
-      Pitch* p = unsmob_pitch (gh_car (i));
+      Pitch* p = unsmob_pitch (ly_car (i));
       /* Ugr
        This chord modifier stuff should really be fixed
        Cmaj7 yields C 7/7-
@@ -361,9 +361,9 @@ Chord::tonic_add_sub_to_pitches (SCM tonic, SCM add, SCM sub)
   
   SCM pitches = SCM_EOL;
   /* Add all that aren't subtracted */
-  for (SCM i = add; gh_pair_p (i); i = gh_cdr (i))
+  for (SCM i = add; gh_pair_p (i); i = ly_cdr (i))
     {
-      SCM p = gh_car (i);
+      SCM p = ly_car (i);
       SCM s = member_notename (p, sub);
       if (s != SCM_BOOL_F)
        sub = scm_delete (s, sub);
@@ -372,9 +372,9 @@ Chord::tonic_add_sub_to_pitches (SCM tonic, SCM add, SCM sub)
     }
   pitches = scm_sort_list (pitches, Pitch::less_p_proc);
   
-  for (SCM i = sub; gh_pair_p (i); i = gh_cdr (i))
+  for (SCM i = sub; gh_pair_p (i); i = ly_cdr (i))
     warning (_f ("invalid subtraction: not part of chord: %s",
-                unsmob_pitch (gh_car (i))->str ()));
+                unsmob_pitch (ly_car (i))->str ()));
 
   return pitches;
 }
@@ -395,7 +395,7 @@ Chord::get_chord (SCM tonic, SCM add, SCM sub, SCM inversion, SCM bass, SCM dur)
          /* Then, delete and add as base note, ie: the inversion */
          pitches = scm_delete (s, pitches);
          Note_req* n = new Note_req;
-         n->set_mus_property ("pitch", gh_car (add_below_tonic (s, pitches)));
+         n->set_mus_property ("pitch", ly_car (add_below_tonic (s, pitches)));
          n->set_mus_property ("duration", dur);
          n->set_mus_property ("inversion", SCM_BOOL_T);
          list = gh_cons (n->self_scm (), list);
@@ -410,17 +410,17 @@ Chord::get_chord (SCM tonic, SCM add, SCM sub, SCM inversion, SCM bass, SCM dur)
   if (bass != SCM_EOL)
     {
       Note_req* n = new Note_req;
-      n->set_mus_property ("pitch", gh_car (add_below_tonic (bass, pitches)));
+      n->set_mus_property ("pitch", ly_car (add_below_tonic (bass, pitches)));
       n->set_mus_property ("duration", dur);
       n->set_mus_property ("bass", SCM_BOOL_T);
       list = gh_cons (n->self_scm (), list);
       scm_gc_unprotect_object (n->self_scm ());
     }
   
-  for (SCM i = pitches; gh_pair_p (i); i = gh_cdr (i))
+  for (SCM i = pitches; gh_pair_p (i); i = ly_cdr (i))
     {
       Note_req* n = new Note_req;
-      n->set_mus_property ("pitch", gh_car (i));
+      n->set_mus_property ("pitch", ly_car (i));
       n->set_mus_property ("duration", dur);
       list = gh_cons (n->self_scm (), list);
       scm_gc_unprotect_object (n->self_scm ());
index d0bcf4eec24f9e928fb33b0cf278458d7b967354..27b33630743833cb93962b4d8a214be82e31112b 100644 (file)
@@ -214,7 +214,7 @@ Collision::do_shifts (Grob* me)
   Real wid
     = gh_scm2double (me->get_grob_property ("note-width"));
   
-  for (; gh_pair_p (hand); hand =gh_cdr (hand))
+  for (; gh_pair_p (hand); hand =ly_cdr (hand))
     {
       Grob * s = unsmob_grob (gh_caar (hand));
       Real amount = gh_scm2double (gh_cdar (hand));
@@ -222,7 +222,7 @@ Collision::do_shifts (Grob* me)
       s->translate_axis (amount *wid, X_AXIS);
       done.push (s);
     }
-  for (; gh_pair_p (autos); autos =gh_cdr (autos))
+  for (; gh_pair_p (autos); autos =ly_cdr (autos))
     {
       Grob * s = unsmob_grob (gh_caar (autos));
       Real amount = gh_scm2double (gh_cdar (autos));
@@ -245,9 +245,9 @@ Collision::automatic_shift (Grob *me)
   SCM  tups = SCM_EOL;
 
   SCM s = me->get_grob_property ("elements");
-  for (; gh_pair_p (s); s = gh_cdr (s))
+  for (; gh_pair_p (s); s = ly_cdr (s))
     {
-      SCM car = gh_car (s);
+      SCM car = ly_car (s);
 
       Grob * se = unsmob_grob (car);
       if (Note_column::has_interface (se))
@@ -348,9 +348,9 @@ Collision::forced_shift (Grob *me)
   SCM tups = SCM_EOL;
   
   SCM s = me->get_grob_property ("elements");
-  for (; gh_pair_p (s); s = gh_cdr (s))
+  for (; gh_pair_p (s); s = ly_cdr (s))
     {
-      Grob * se = unsmob_grob (gh_car (s));
+      Grob * se = unsmob_grob (ly_car (s));
 
       SCM force =  se->remove_grob_property ("force-hshift");
       if (gh_number_p (force))
index ce8db7f353851be59e034193cda0fd48c88c2909..93e191401083f9bf3d71d3d19dda00e7ed22c6ca 100644 (file)
@@ -27,14 +27,14 @@ Key_change_req::transpose (Pitch p)
 {
   SCM newlist = SCM_EOL;
   SCM pa = get_mus_property ("pitch-alist");
-  for (SCM s = pa; gh_pair_p (s); s = gh_cdr (s))
+  for (SCM s = pa; gh_pair_p (s); s = ly_cdr (s))
     {
       SCM key = gh_caar (s);
       SCM alter = gh_cdar (s);
       if (gh_pair_p (key))
        {
-         Pitch orig (gh_scm2int (gh_car (key)),
-                             gh_scm2int (gh_cdr (key)),
+         Pitch orig (gh_scm2int (ly_car (key)),
+                             gh_scm2int (ly_cdr (key)),
                              gh_scm2int (alter));
 
          orig.transpose (p);
@@ -64,14 +64,14 @@ bool
 alist_equal_p (SCM a, SCM b)
 {
   for (SCM s = a;
-       gh_pair_p (s); s = gh_cdr (s))
+       gh_pair_p (s); s = ly_cdr (s))
     {
       SCM key = gh_caar (s);
       SCM val = gh_cdar (s);
       SCM l = scm_assoc (key, b);
 
       if (l == SCM_BOOL_F
-         || !gh_equal_p ( gh_cdr (l), val))
+         || !gh_equal_p ( ly_cdr (l), val))
 
        return false;
     }
index 4ae84934f63b51338980c4c3ce73846d1151fd66..00237602771d85107a1080250be9a542b316386d 100644 (file)
@@ -78,8 +78,8 @@ Dot_column::do_shifts (SCM l)
   Link_array<Grob> dots;
   while (gh_pair_p (l))
     {
-      dots.push (unsmob_grob (gh_car (l)));
-      l = gh_cdr (l);
+      dots.push (unsmob_grob (ly_car (l)));
+      l = ly_cdr (l);
     }
   
   dots.sort (compare_position);
index 1a0273850db88f4fbd81aeb6569c7afea6513237..6476466774e51a8398660487d654f19361705e4c 100644 (file)
@@ -94,7 +94,7 @@ IMPLEMENT_SIMPLE_SMOBS (Duration);
 int
 Duration::print_smob (SCM s, SCM port, scm_print_state *)
 {
-  Duration  *r = (Duration *) gh_cdr (s);
+  Duration  *r = (Duration *) ly_cdr (s);
      
   scm_puts ("#<Duration ", port);
   scm_display (ly_str02scm (r->str ().ch_C ()), port);
@@ -106,8 +106,8 @@ Duration::print_smob (SCM s, SCM port, scm_print_state *)
 SCM
 Duration::equal_p (SCM a , SCM b)
 {
-  Duration  *p = (Duration *) gh_cdr (a);
-  Duration  *q = (Duration *) gh_cdr (b);  
+  Duration  *p = (Duration *) ly_cdr (a);
+  Duration  *q = (Duration *) ly_cdr (b);  
 
   bool eq = p->dots_i_ == q->dots_i_
     && p->durlog_i_ == q->durlog_i_
index f805428f0c8e6ed9bc87566d84be7029e376ac0d..0b5d1b73b06a1a04450268535c683eaa4f2f6255 100644 (file)
@@ -99,8 +99,8 @@ Dynamic_performer::create_audio_elements ()
          if (gh_pair_p (s))
            {
              Interval iv;
-             iv[MIN] = gh_scm2double (gh_car (s));
-             iv[MAX] = gh_scm2double (gh_cdr (s));
+             iv[MIN] = gh_scm2double (ly_car (s));
+             iv[MAX] = gh_scm2double (ly_cdr (s));
              volume = iv[MIN] + iv.length () * volume;
            }
        }
index 0a47bb8420dec903fce1706a8ce937063f42f409..37516251991415672840f26ef034660b54eb5403 100644 (file)
@@ -28,9 +28,9 @@ void
 Engraver_group_engraver::create_grobs ()
 {
 
-  for (SCM p = simple_trans_list_; gh_pair_p (p); p = gh_cdr (p))
+  for (SCM p = simple_trans_list_; gh_pair_p (p); p = ly_cdr (p))
     {
-      Translator * t = unsmob_translator (gh_car (p));
+      Translator * t = unsmob_translator (ly_car (p));
       Engraver * eng = dynamic_cast<Engraver*> (t);
       if (eng)
        eng->create_grobs ();
@@ -43,9 +43,9 @@ Engraver_group_engraver::acknowledge_grobs ()
   for (int j =0; j < announce_info_arr_.size (); j++)
     {
       Grob_info info = announce_info_arr_[j];
-      for (SCM p = simple_trans_list_; gh_pair_p (p); p = gh_cdr (p))
+      for (SCM p = simple_trans_list_; gh_pair_p (p); p = ly_cdr (p))
        {
-         Translator * t = unsmob_translator (gh_car (p));
+         Translator * t = unsmob_translator (ly_car (p));
          Engraver * eng = dynamic_cast<Engraver*> (t);
          if (eng && eng!= info.origin_trans_l_)
            eng->acknowledge_grob (info);
@@ -56,9 +56,9 @@ Engraver_group_engraver::acknowledge_grobs ()
 void
 Engraver_group_engraver::do_announces ()
 {
-  for (SCM p = trans_group_list_; gh_pair_p (p); p =gh_cdr (p))
+  for (SCM p = trans_group_list_; gh_pair_p (p); p =ly_cdr (p))
     {
-      Translator * t = unsmob_translator (gh_car (p));
+      Translator * t = unsmob_translator (ly_car (p));
       dynamic_cast<Engraver_group_engraver*> (t)->do_announces ();
     }
 
@@ -80,17 +80,17 @@ Engraver_group_engraver::do_announces ()
 void
 Engraver_group_engraver::process_music ()
 {
-   for (SCM p = simple_trans_list_; gh_pair_p (p); p =gh_cdr (p))
+   for (SCM p = simple_trans_list_; gh_pair_p (p); p =ly_cdr (p))
     {
-      Translator * t = unsmob_translator (gh_car (p));
+      Translator * t = unsmob_translator (ly_car (p));
       Engraver * eng = dynamic_cast<Engraver*> (t);
 
       if (eng)
        eng->process_music ();
     }
-   for (SCM p = trans_group_list_; gh_pair_p (p); p =gh_cdr (p))
+   for (SCM p = trans_group_list_; gh_pair_p (p); p =ly_cdr (p))
     {
-      Translator * t = unsmob_translator (gh_car (p));
+      Translator * t = unsmob_translator (ly_car (p));
       Engraver*eng = dynamic_cast<Engraver*> (t);
       if (eng)
        eng->process_music ();
index 87894fcdd5bc879f1680a288b903cf34a3e12809..a086ac5808884c95155e7b31fd3842f6bee0cd81 100644 (file)
@@ -84,9 +84,9 @@ Figured_bass_engraver::process_music ()
                                     figure_->get_grob_property ("accidental-alist"));
              if (gh_pair_p (alter))
                {
-                 one_fig = gh_list (ly_symbol2scm ("columns"),
+                 one_fig = scm_listify (ly_symbol2scm ("columns"),
                                     one_fig,
-                                    gh_cdr(alter),
+                                    ly_cdr(alter),
                                     SCM_UNDEFINED);
                }
            }
index 0ea3bf7675d25375b7fff9a8e0c4b39ba7fef038..25f15ac822f2c80051747db1f49e40c1f0e32f04 100644 (file)
@@ -35,10 +35,10 @@ scaling)
 SCM
 Font_interface::font_alist_chain (Grob *me)
 {
-  SCM defaults = gh_cdr (scm_assoc (ly_symbol2scm ("font-defaults"),
+  SCM defaults = ly_cdr (scm_assoc (ly_symbol2scm ("font-defaults"),
                                    me->paper_l ()->style_sheet_));
 
-  SCM ch = gh_list (me->mutable_property_alist_,
+  SCM ch = scm_listify (me->mutable_property_alist_,
                    me->immutable_property_alist_,
                    defaults,
                    SCM_UNDEFINED);
@@ -82,10 +82,10 @@ Font_interface::get_font (Grob *me, SCM chain)
   
   SCM ss = me->paper_l ()->style_sheet_;
 
-  SCM proc = gh_cdr (scm_assoc (ly_symbol2scm ("properties-to-font"),
+  SCM proc = ly_cdr (scm_assoc (ly_symbol2scm ("properties-to-font"),
                                ss));
 
-  SCM fonts = gh_cdr (scm_assoc (ly_symbol2scm ("fonts"), ss));
+  SCM fonts = ly_cdr (scm_assoc (ly_symbol2scm ("fonts"), ss));
 
   assert (gh_procedure_p (proc));
   SCM font_name = gh_call2 (proc, fonts, chain);
@@ -101,11 +101,11 @@ Font_interface::add_style (Grob* me, SCM style, SCM chain)
   
   SCM sheet = me->paper_l ()->style_sheet_;
       
-  SCM style_alist = gh_cdr (scm_assoc (ly_symbol2scm ("style-alist"), sheet));
+  SCM style_alist = ly_cdr (scm_assoc (ly_symbol2scm ("style-alist"), sheet));
   SCM entry = scm_assoc (style, style_alist);
   if (gh_pair_p (entry))
     {
-      chain = gh_cons (gh_cdr (entry), chain);
+      chain = gh_cons (ly_cdr (entry), chain);
     }
   return chain;
 }
@@ -179,26 +179,26 @@ Font_interface::properties_to_font_name (SCM fonts, SCM alist_chain)
        series = ly_assoc_chain (series_sym, alist_chain);
 
        if (gh_pair_p (shape))
-        shape = gh_cdr (shape);
+        shape = ly_cdr (shape);
        if (gh_pair_p (family))
-        family = gh_cdr (family);
+        family = ly_cdr (family);
        if (gh_pair_p (series))
-        series = gh_cdr (series);
+        series = ly_cdr (series);
     }
   else
-    name = gh_cdr (name);
+    name = ly_cdr (name);
 
 
   if (gh_pair_p (point_sz))
-    point_sz = gh_cdr (point_sz);
+    point_sz = ly_cdr (point_sz);
   else
     {
       rel_sz = ly_assoc_chain (rel_sz_sym, alist_chain);
       if (gh_pair_p (rel_sz))
-       rel_sz = gh_cdr (rel_sz);
+       rel_sz = ly_cdr (rel_sz);
     }
 
-  for (SCM s = fonts ; gh_pair_p (s); s = gh_cdr (s))
+  for (SCM s = fonts ; gh_pair_p (s); s = ly_cdr (s))
     {
       SCM qlist = gh_caar (s);
 
@@ -226,7 +226,7 @@ Font_interface::properties_to_font_name (SCM fonts, SCM alist_chain)
        }
       else
        {
-         if (!wild_compare (gh_car (qlist), rel_sz))
+         if (!wild_compare (ly_car (qlist), rel_sz))
            continue;
        }
 
@@ -236,7 +236,7 @@ Font_interface::properties_to_font_name (SCM fonts, SCM alist_chain)
     }
 
   warning (_ ("couldn't find any font satisfying "));
-  scm_write (gh_list (name, point_sz, shape, series , family, rel_sz, SCM_UNDEFINED), scm_current_error_port ());
+  scm_write (scm_listify (name, point_sz, shape, series , family, rel_sz, SCM_UNDEFINED), scm_current_error_port ());
   scm_flush (scm_current_error_port ());
  
   return ly_str02scm ("cmr10");
index 04112971d318513083b415e3f3373c949da1f243..78e5c2fa04d5b9132c05b47bee55128833e97882 100644 (file)
@@ -66,6 +66,8 @@ Gourlay_breaking::do_solve () const
   optimal_paths[0] = first_node; 
   int break_idx=1;
 
+  Real worst_force = 0.0;
+  
   for (; break_idx< breaks.size (); break_idx++) 
     {
       /*
@@ -94,13 +96,26 @@ Gourlay_breaking::do_solve () const
          sp->solve (&cp);
          delete sp;
 
+         if (cp.force_f_ > worst_force)
+           worst_force = cp.force_f_;
+
+         /*
+           We remember this solution as a "should always work
+           solution", in case everything fucks up.  */
          if (start_idx == break_idx - 1)
-           backup_sol = cp;    // in case everything fucks up
+           backup_sol = cp;
          if (!cp.satisfies_constraints_b_)
-           break;
-
+           {
+             /*
+               If it doesn't satisfy constraints, we make this one
+               really unattractive.
+             */
+             cp.force_f_ += worst_force;
+             cp.force_f_ *= 10;        
+           }
          
          Real this_demerits;
+
          if (optimal_paths[start_idx].demerits_f_ >= infinity_f)
            this_demerits = infinity_f;
          else
@@ -113,6 +128,13 @@ Gourlay_breaking::do_solve () const
              minimal_sol = cp;
              minimal_demerits = this_demerits;
            }
+
+         /*
+           we couldn't satisfy the constraints, this won't get better
+           if we add more columns, so we get on with the next one
+         */
+         if (!cp.satisfies_constraints_b_)
+           break ; 
        }
 
       int prev =break_idx - 1;
@@ -156,9 +178,14 @@ Gourlay_breaking::do_solve () const
   if (optimal_paths.top ().demerits_f_ >= infinity_f)
     warning (_ ("No feasible line breaking found"));
   
-  for (int i= final_breaks.size (); i--;) 
-    lines.push (optimal_paths[final_breaks[i]].line_config_);
-  
+  for (int i= final_breaks.size (); i--;)
+    {
+      Column_x_positions cp (optimal_paths[final_breaks[i]].line_config_);
+      
+      lines.push (cp);
+      if(!cp.satisfies_constraints_b_)
+       warning ("Could not find line breaking that satisfies constraints.");
+    }
   return lines;
 }
 
index c5cfcbe1747fd0c5b98138fbf7390ca3b71feb39..314db7ae4e69798277b6d089036d03ddee2b9bd4 100644 (file)
@@ -94,7 +94,7 @@ Grob::Grob (SCM basicprops)
   SCM meta = get_grob_property ("meta");
   SCM ifs = scm_assoc (ly_symbol2scm ("interfaces"), meta);
   
-  set_grob_property ("interfaces",gh_cdr (ifs));
+  set_grob_property ("interfaces",ly_cdr (ifs));
 }
 
 
@@ -131,10 +131,10 @@ Grob::get_grob_property (SCM sym) const
 {
   SCM s = scm_sloppy_assq (sym, mutable_property_alist_);
   if (s != SCM_BOOL_F)
-    return gh_cdr (s);
+    return ly_cdr (s);
 
   s = scm_sloppy_assq (sym, immutable_property_alist_);
-  return (s == SCM_BOOL_F) ? SCM_EOL : gh_cdr (s); 
+  return (s == SCM_BOOL_F) ? SCM_EOL : ly_cdr (s); 
 }
 
 /*
@@ -211,8 +211,8 @@ Grob::preset_extent (SCM element_smob, SCM scm_axis)
   
   if (gh_pair_p (ext))
     {
-      Real l = gh_scm2double (gh_car (ext));
-      Real r = gh_scm2double (gh_cdr (ext));
+      Real l = gh_scm2double (ly_car (ext));
+      Real r = gh_scm2double (ly_cdr (ext));
       return ly_interval2scm (Interval (l, r));
     }
   
@@ -241,9 +241,9 @@ Grob::calculate_dependencies (int final, int busy, SCM funcname)
   
   status_c_= busy;
 
-  for (SCM d=  get_grob_property ("dependencies"); gh_pair_p (d); d = gh_cdr (d))
+  for (SCM d=  get_grob_property ("dependencies"); gh_pair_p (d); d = ly_cdr (d))
     {
-      unsmob_grob (gh_car (d))
+      unsmob_grob (ly_car (d))
        ->calculate_dependencies (final, busy, funcname);
     }
 
@@ -278,7 +278,7 @@ Grob::get_uncached_molecule ()const
 
   SCM  mol = SCM_EOL;
   if (gh_procedure_p (proc)) 
-    mol = gh_apply (proc, gh_list (this->self_scm (), SCM_UNDEFINED));
+    mol = gh_apply (proc, scm_listify (this->self_scm (), SCM_UNDEFINED));
 
   
   Molecule *m = unsmob_molecule (mol);
@@ -296,7 +296,7 @@ Grob::get_uncached_molecule ()const
       // ugr.
       
       mol = Molecule (m->extent_box (),
-                     gh_list (origin, m->get_expr (), SCM_UNDEFINED)
+                     scm_listify (origin, m->get_expr (), SCM_UNDEFINED)
                      ). smobbed_copy ();
 
       m = unsmob_molecule (mol);
@@ -397,12 +397,12 @@ Grob::handle_broken_grobs (SCM src, SCM criterion)
     }
   else if (gh_pair_p (src))
     {
-      SCM oldcar =gh_car (src);
+      SCM oldcar =ly_car (src);
       /*
        UGH! breaks on circular lists.
       */
       SCM newcar = handle_broken_grobs (oldcar, criterion);
-      SCM oldcdr = gh_cdr (src);
+      SCM oldcdr = ly_cdr (src);
       
       if (newcar == SCM_UNDEFINED
          && (gh_pair_p (oldcdr) || oldcdr == SCM_EOL))
@@ -611,8 +611,8 @@ Grob::extent (Grob * refp, Axis a) const
    */
   if (gh_pair_p (extra))
     {
-      ext[BIGGER] +=  gh_scm2double (gh_cdr (extra));
-      ext[SMALLER] +=   gh_scm2double (gh_car (extra));
+      ext[BIGGER] +=  gh_scm2double (ly_cdr (extra));
+      ext[SMALLER] +=   gh_scm2double (ly_car (extra));
     }
   
   extra = get_grob_property (a == X_AXIS
@@ -620,8 +620,8 @@ Grob::extent (Grob * refp, Axis a) const
                                : "minimum-extent-Y");
   if (gh_pair_p (extra))
     {
-      ext.unite (Interval (gh_scm2double (gh_car (extra)),
-                          gh_scm2double (gh_cdr (extra))));
+      ext.unite (Interval (gh_scm2double (ly_car (extra)),
+                          gh_scm2double (ly_cdr (extra))));
     }
 
   ext.translate (x);
@@ -656,9 +656,9 @@ Grob *
 Grob::common_refpoint (SCM elist, Axis a) const
 {
   Grob * common = (Grob*) this;
-  for (; gh_pair_p (elist); elist = gh_cdr (elist))
+  for (; gh_pair_p (elist); elist = ly_cdr (elist))
     {
-      Grob * s = unsmob_grob (gh_car (elist));
+      Grob * s = unsmob_grob (ly_car (elist));
       if (s)
        common = common->common_refpoint (s, a);
     }
@@ -671,7 +671,7 @@ Grob::name () const
 {
   SCM meta = get_grob_property ("meta");
   SCM nm = scm_assoc (ly_symbol2scm ("name"), meta);
-  nm = (gh_pair_p (nm)) ? gh_cdr (nm) : SCM_EOL;
+  nm = (gh_pair_p (nm)) ? ly_cdr (nm) : SCM_EOL;
   return  gh_string_p (nm) ?ly_scm2string (nm) :  classname (this);  
 }
 
@@ -790,7 +790,7 @@ Grob::mark_smob (SCM ses)
 int
 Grob::print_smob (SCM s, SCM port, scm_print_state *)
 {
-  Grob *sc = (Grob *) gh_cdr (s);
+  Grob *sc = (Grob *) ly_cdr (s);
      
   scm_puts ("#<Grob ", port);
   scm_puts ((char *)sc->name ().ch_C (), port);
index c3b9fe33f9b97060fcc63a934b9fe8908b17ec96..04b27283e98e24a30ad54bd9eecff02b36de3e03 100644 (file)
@@ -116,7 +116,7 @@ Hairpin::brew_molecule (SCM smob)
 
     Lookup::line  (XY1, XY2).
   */
-  SCM hairpin = gh_list (ly_symbol2scm ("hairpin"),
+  SCM hairpin = scm_listify (ly_symbol2scm ("hairpin"),
                         gh_double2scm (thick),
                         gh_double2scm (width),
                         gh_double2scm (starth),
index 3b6593c6f8a1b8bed055a701772d589ca2dbf667..5db4d23d211859c3228c4f6226653f5692052b5e 100644 (file)
@@ -9,8 +9,15 @@
 #ifndef LILY_GUILE_HH
 #define LILY_GUILE_HH
 
-#include <guile/gh.h>
 #include <libguile.h>
+
+/*
+  TODO: the  GH interface is deprecated as of GUILE 1.6
+
+  Remove all gh_XXX functions.
+ */
+#include <guile/gh.h>
+
 #include "config.h"
 
 /* Guile 1.3.4 compatibility */
@@ -80,6 +87,19 @@ SCM ly_type (SCM);
 bool type_check_assignment (SCM val, SCM sym,  SCM type_symbol) ;
 SCM ly_number2string (SCM s);
 
+
+#define ly_cdr(x) SCM_CDR(x)
+#define ly_car(x) SCM_CAR(x)
+#define ly_caar(x) SCM_CAAR(x)
+#define ly_cdar(x) SCM_CDAR(x)
+#define ly_cadr(x) SCM_CADR(x)
+#define ly_cddr(x) SCM_CDDR(x)
+
+#define ly_pair_p(x) SCM_PAIRP(x)
+#define ly_symbol_p(x) SCM_SYMBOLP(x)
+#define ly_number_p(x) SCM_NUMBERP(x)
+#define ly_procedure_p(x) SCM_NFALSEP(scm_procedure_p(x))
+
 /*
   display and print newline.
  */
index bfe3cafcdcdb0d0a1e53078afc6c854230b53b96..10ba29c8e849ddb632188f91357f5d40f0dd3120 100644 (file)
@@ -10,7 +10,7 @@
 #ifndef PROTECTED_SCM_HH
 #define PROTECTED_SCM_HH
 
-#include <guile/gh.h>
+#include <libguile.h>
 
 /*
   Mix GUILE GC with C++ ctors and dtors. 
index eeed9d86ccaddd7a928a78a13eaacc76a39bc48c..6fae06efb950b74d174e430202b8a601ffec3969 100644 (file)
@@ -162,8 +162,8 @@ Item::handle_prebroken_dependencies ()
     {
       SCM args = scm_list_n (gh_int2scm (break_status_dir ()), SCM_UNDEFINED);
       SCM result = gh_apply (vis, args);
-      bool trans = gh_scm2bool (gh_car (result));
-      bool empty = gh_scm2bool (gh_cdr (result));
+      bool trans = gh_scm2bool (ly_car (result));
+      bool empty = gh_scm2bool (ly_cdr (result));
       
       if (empty && trans)
        suicide ();
index 8dc62ea994507c898853b3cdf4cb0f76c75d568d..37b215fbd69ca3e7d85164e9bbf24c83a073d13e 100644 (file)
@@ -156,17 +156,17 @@ Key_engraver::read_req (Key_change_req const * r)
   SCM n = scm_list_copy (p);
   SCM accs = SCM_EOL;
   for (SCM s = get_property ("keyAccidentalOrder");
-       gh_pair_p (s); s = gh_cdr (s))
+       gh_pair_p (s); s = ly_cdr (s))
     {
-      if (gh_pair_p (scm_member (gh_car (s), n)))
+      if (gh_pair_p (scm_member (ly_car (s), n)))
        {
-         accs = gh_cons (gh_car (s), accs);
-         n = scm_delete_x (gh_car (s), n);
+         accs = gh_cons (ly_car (s), accs);
+         n = scm_delete_x (ly_car (s), n);
        }
     }
-  for (SCM s = n ; gh_pair_p (s); s = gh_cdr (s))
+  for (SCM s = n ; gh_pair_p (s); s = ly_cdr (s))
     if (gh_scm2int (gh_cdar (s)))
-      accs = gh_cons (gh_car (s), accs);
+      accs = gh_cons (ly_car (s), accs);
 
   old_accs_ = get_property ("keySignature");
   daddy_trans_l_->set_property ("keySignature", accs);
index b66cd6b490ce5fbe56b2a0925d36ac3ad2b15c0d..713ae61e27ead6957a5200bc5a599a87c90167fb 100644 (file)
@@ -37,7 +37,7 @@ int
 alteration_pos  (SCM what, int alter, int c0p)
 {
   if (gh_pair_p (what))
-    return gh_scm2int (gh_car (what)) * 7 + gh_scm2int (gh_cdr (what)) + c0p;
+    return gh_scm2int (ly_car (what)) * 7 + gh_scm2int (ly_cdr (what)) + c0p;
 
   int p = gh_scm2int (what);
 
@@ -101,7 +101,7 @@ Key_item::brew_molecule (SCM smob)
   */
   int c0p = gh_scm2int (me->get_grob_property ("c0-position"));
 
-  for (SCM s = newas; gh_pair_p (s); s = gh_cdr (s))
+  for (SCM s = newas; gh_pair_p (s); s = ly_cdr (s))
     {
       SCM what = gh_caar (s);
       int alter = gh_scm2int (gh_cdar (s));
@@ -133,11 +133,11 @@ Key_item::brew_molecule (SCM smob)
        natural=Font_interface::get_default_font (me)->
            find_by_name (String ("accidentals-") + style + String ("0"));
       
-      for (; gh_pair_p (old); old = gh_cdr (old))
+      for (; gh_pair_p (old); old = ly_cdr (old))
         {
          SCM found = scm_assoc (gh_caar (old), newas);
          if (found == SCM_BOOL_F
-             || gh_cdr (found) != gh_cdar (old))
+             || ly_cdr (found) != gh_cdar (old))
            {
              SCM what = gh_caar (old);
              int alter = 0;
index b44ae5ef9dadaac6932dd70023f51b9afa178c0e..e07648fc32acefee31c836a4823fc618abf50b66 100644 (file)
@@ -547,7 +547,7 @@ My_lily_lexer::scan_escaped_word (String str)
                
                if (gh_pair_p (pitch))
                {
-                       yylval.scm = gh_cdr (pitch);
+                       yylval.scm = ly_cdr (pitch);
                        return NOTENAME_PITCH;
                }
        }
@@ -566,11 +566,11 @@ My_lily_lexer::scan_bare_word (String str)
        if ((YYSTATE == notes) || (YYSTATE == chords)) {
                SCM pitch = scm_hashq_get_handle (pitchname_tab_, sym);
                if (gh_pair_p (pitch)) {
-                   yylval.scm = gh_cdr (pitch);
+                   yylval.scm = ly_cdr (pitch);
                     return (YYSTATE == notes) ? NOTENAME_PITCH : TONICNAME_PITCH;
                } else if ((pitch = scm_hashq_get_handle (chordmodifier_tab_, sym))!= SCM_BOOL_F)
                {
-                   yylval.scm = gh_cdr (pitch);
+                   yylval.scm = ly_cdr (pitch);
                    return CHORDMODIFIER_PITCH;
                }
        }
index b474ab2849bddd315deb2cdff25b8c684abeb081..376a0a6928dc12ef2903dc583d6d36cdda933d25 100644 (file)
@@ -26,7 +26,7 @@
 SCM
 ly_last (SCM list)
 {
-  return gh_car (scm_last_pair (list));
+  return ly_car (scm_last_pair (list));
 }
 
 SCM
@@ -111,7 +111,7 @@ ly_parse_scm (char const* s, int* n)
 SCM
 ly_quote_scm (SCM s)
 {
-  return gh_list (ly_symbol2scm ("quote"), s, SCM_UNDEFINED);
+  return scm_listify (ly_symbol2scm ("quote"), s, SCM_UNDEFINED);
 }
 
 
@@ -166,7 +166,7 @@ ly_gulp_file (SCM fn)
 void
 read_lily_scm_file (String fn)
 {
-  gh_eval_str ((char *) gulp_file_to_string (fn).ch_C ());
+  scm_c_eval_string ((char *) gulp_file_to_string (fn).ch_C ());
 }
 
 extern "C" {
@@ -197,7 +197,7 @@ SCM
 index_cell (SCM s, Direction d)
 {
   assert (d);
-  return (d == LEFT) ? gh_car (s) : gh_cdr (s);
+  return (d == LEFT) ? ly_car (s) : ly_cdr (s);
 }
 
 SCM
@@ -232,7 +232,7 @@ ly_isdir_p (SCM s)
 bool
 ly_number_pair_p (SCM p)
 {
-  return gh_pair_p (p) && gh_number_p (gh_car (p)) && gh_number_p (gh_cdr (p));
+  return gh_pair_p (p) && gh_number_p (ly_car (p)) && gh_number_p (ly_cdr (p));
 }
 
 bool
@@ -301,8 +301,8 @@ to_dir (SCM s)
 Interval
 ly_scm2interval (SCM p)
 {
-  return  Interval (gh_scm2double (gh_car (p)),
-                   gh_scm2double (gh_cdr (p)));
+  return  Interval (gh_scm2double (ly_car (p)),
+                   gh_scm2double (ly_cdr (p)));
 }
 
 SCM
@@ -339,7 +339,7 @@ appendable_list_append (SCM l, SCM elt)
 {
   SCM newcons = gh_cons (elt, SCM_EOL);
   
-  gh_set_cdr_x (gh_car (l), newcons);      
+  gh_set_cdr_x (ly_car (l), newcons);      
   gh_set_car_x (l, newcons);
 }
 
@@ -353,8 +353,8 @@ ly_offset2scm (Offset o)
 Offset
 ly_scm2offset (SCM s)
 {
-  return Offset (gh_scm2double (gh_car (s)),
-                gh_scm2double (gh_cdr (s)));
+  return Offset (gh_scm2double (ly_car (s)),
+                gh_scm2double (ly_cdr (s)));
 }
 
 SCM
@@ -445,9 +445,8 @@ SCM
 ly_version ()
 {
   char const* vs =  "\' (" MAJOR_VERSION " " MINOR_VERSION " "  PATCH_LEVEL " " MY_PATCH_LEVEL ")" ;
-
   
-  return gh_eval_str ((char*)vs);
+  return scm_c_eval_string ((char*)vs);
 }
 
 static void
@@ -477,7 +476,7 @@ ly_deep_copy (SCM l)
 {
   if (gh_pair_p (l))
     {
-      return gh_cons (ly_deep_copy (gh_car (l)), ly_deep_copy (gh_cdr (l)));
+      return gh_cons (ly_deep_copy (ly_car (l)), ly_deep_copy (ly_cdr (l)));
     }
   else
     return l;
@@ -491,11 +490,11 @@ ly_assoc_chain (SCM key, SCM achain)
 {
   if (gh_pair_p (achain))
     {
-      SCM handle = scm_assoc (key, gh_car (achain));
+      SCM handle = scm_assoc (key, ly_car (achain));
       if (gh_pair_p (handle))
        return handle;
       else
-       return ly_assoc_chain (key, gh_cdr (achain));
+       return ly_assoc_chain (key, ly_cdr (achain));
     }
   else
     return SCM_BOOL_F;
index a6cff9391f916419535ea82c8548613d17d6a838..cde23f37526f7ea626ad47368562609fc536fd45 100644 (file)
@@ -25,9 +25,9 @@
 void
 fixup_refpoints (SCM s)
 {
-  for (; gh_pair_p (s); s = gh_cdr (s))
+  for (; gh_pair_p (s); s = ly_cdr (s))
     {
-      Grob::fixup_refpoint (gh_car (s));
+      Grob::fixup_refpoint (ly_car (s));
     }
 }
 
@@ -59,9 +59,9 @@ void
 Line_of_score::output_lines ()
 {
   for (SCM s = get_grob_property ("all-elements");
-       gh_pair_p (s); s = gh_cdr (s))
+       gh_pair_p (s); s = ly_cdr (s))
     {
-      unsmob_grob (gh_car (s))->do_break_processing ();
+      unsmob_grob (ly_car (s))->do_break_processing ();
     }
   /*
     fixups must be done in broken line_of_scores, because new elements
@@ -71,9 +71,9 @@ Line_of_score::output_lines ()
     {
       Grob *se = broken_into_l_arr_[i];
       SCM all = se->get_grob_property ("all-elements");
-      for (SCM s = all; gh_pair_p (s); s = gh_cdr (s))
+      for (SCM s = all; gh_pair_p (s); s = ly_cdr (s))
        {
-         fixup_refpoint (gh_car (s));
+         fixup_refpoint (ly_car (s));
        }
       count += scm_ilength (all);
     }
@@ -86,9 +86,9 @@ Line_of_score::output_lines ()
 
   
   for (SCM s = get_grob_property ("all-elements");
-       gh_pair_p (s); s = gh_cdr (s))
+       gh_pair_p (s); s = ly_cdr (s))
     {
-      unsmob_grob (gh_car (s))->handle_broken_dependencies ();
+      unsmob_grob (ly_car (s))->handle_broken_dependencies ();
     }
   handle_broken_dependencies ();
 
@@ -112,7 +112,7 @@ Line_of_score::output_lines ()
 
       if (i < broken_into_l_arr_.size () - 1)
        {
-         SCM lastcol =  gh_car (line_l->get_grob_property ("columns"));
+         SCM lastcol =  ly_car (line_l->get_grob_property ("columns"));
          Grob*  e = unsmob_grob (lastcol);
          SCM inter = e->get_grob_property ("between-system-string");
          if (gh_string_p (inter))
@@ -150,11 +150,11 @@ set_loose_columns (Line_of_score* which, Column_x_positions const *posns)
 
          if (!left)
            {
-             left = dynamic_cast<Item*> (unsmob_grob (gh_car (between)));
+             left = dynamic_cast<Item*> (unsmob_grob (ly_car (between)));
              left = left->column_l ();
            }
          divide_over ++;       
-         loose = dynamic_cast<Item*> (unsmob_grob (gh_cdr (between)));
+         loose = dynamic_cast<Item*> (unsmob_grob (ly_cdr (between)));
          loose = loose->column_l ();
        }
 
@@ -177,7 +177,7 @@ set_loose_columns (Line_of_score* which, Column_x_positions const *posns)
          thiscol->translate_axis (lx + j*(rx - lx)/divide_over, X_AXIS);
 
          j ++; 
-         loose = dynamic_cast<Item*> (unsmob_grob (gh_cdr (between)));
+         loose = dynamic_cast<Item*> (unsmob_grob (ly_cdr (between)));
        }
       
     }
@@ -236,13 +236,13 @@ Line_of_score::output_molecule (SCM expr, Offset o)
       if (!gh_pair_p (expr))
        return;
   
-      SCM head =gh_car (expr);
+      SCM head =ly_car (expr);
       if (unsmob_input (head))
        {
          Input * ip = unsmob_input (head);
       
 
-         pscore_l_->outputter_l_->output_scheme (gh_list (define_origin_sym,
+         pscore_l_->outputter_l_->output_scheme (scm_listify (define_origin_sym,
                                                           ly_str02scm (ip->file_str ().ch_C ()),
                                                           gh_int2scm (ip->line_number ()),
                                                           gh_int2scm (ip->column_number ()),
@@ -251,7 +251,7 @@ Line_of_score::output_molecule (SCM expr, Offset o)
        }
       else  if (head ==  no_origin_sym)
        {
-         pscore_l_->outputter_l_->output_scheme (gh_list (no_origin_sym, SCM_UNDEFINED));
+         pscore_l_->outputter_l_->output_scheme (scm_listify (no_origin_sym, SCM_UNDEFINED));
          expr = gh_cadr (expr);
        }
       else if (head == offset_sym)
@@ -267,7 +267,7 @@ Line_of_score::output_molecule (SCM expr, Offset o)
       else
        {
          pscore_l_->outputter_l_->
-           output_scheme (gh_list (placebox_sym,
+           output_scheme (scm_listify (placebox_sym,
                                    gh_double2scm (o[X_AXIS]),
                                    gh_double2scm (o[Y_AXIS]),
                                    expr,
@@ -289,7 +289,7 @@ Line_of_score::add_column (Paper_column*p)
 {
   Grob *me = this;
   SCM cs = me->get_grob_property ("columns");
-  Grob * prev =  gh_pair_p (cs) ? unsmob_grob (gh_car (cs)) : 0;
+  Grob * prev =  gh_pair_p (cs) ? unsmob_grob (ly_car (cs)) : 0;
 
   p->rank_i_ = prev ? Paper_column::rank_i (prev) + 1 : 0; 
 
@@ -306,28 +306,28 @@ Line_of_score::add_column (Paper_column*p)
 void
 Line_of_score::pre_processing ()
 {
-  for (SCM s = get_grob_property ("all-elements"); gh_pair_p (s); s = gh_cdr (s))
-    unsmob_grob (gh_car (s))->discretionary_processing ();
+  for (SCM s = get_grob_property ("all-elements"); gh_pair_p (s); s = ly_cdr (s))
+    unsmob_grob (ly_car (s))->discretionary_processing ();
 
   if (verbose_global_b)
     progress_indication (_f ("Element count %d ",  element_count ()));
 
   
-  for (SCM s = get_grob_property ("all-elements"); gh_pair_p (s); s = gh_cdr (s))
-    unsmob_grob (gh_car (s))->handle_prebroken_dependencies ();
+  for (SCM s = get_grob_property ("all-elements"); gh_pair_p (s); s = ly_cdr (s))
+    unsmob_grob (ly_car (s))->handle_prebroken_dependencies ();
   
   fixup_refpoints (get_grob_property ("all-elements"));
   
-  for (SCM s = get_grob_property ("all-elements"); gh_pair_p (s); s = gh_cdr (s))
+  for (SCM s = get_grob_property ("all-elements"); gh_pair_p (s); s = ly_cdr (s))
     {
-      Grob* sc = unsmob_grob (gh_car (s));
+      Grob* sc = unsmob_grob (ly_car (s));
       sc->calculate_dependencies (PRECALCED, PRECALCING, ly_symbol2scm ("before-line-breaking-callback"));
     }
   
   progress_indication ("\n" + _ ("Calculating column positions...") + " ");
-  for (SCM s = get_grob_property ("all-elements"); gh_pair_p (s); s = gh_cdr (s))
+  for (SCM s = get_grob_property ("all-elements"); gh_pair_p (s); s = ly_cdr (s))
     {
-      Grob * e = unsmob_grob (gh_car (s));
+      Grob * e = unsmob_grob (ly_car (s));
       SCM proc = e->get_grob_property ("spacing-procedure");
       if (gh_procedure_p (proc))
        gh_call1 (proc, e->self_scm ());
@@ -338,9 +338,9 @@ void
 Line_of_score::post_processing (bool last_line)
 {
   for (SCM s = get_grob_property ("all-elements");
-       gh_pair_p (s); s = gh_cdr (s))
+       gh_pair_p (s); s = ly_cdr (s))
     {
-      Grob* sc = unsmob_grob (gh_car (s));
+      Grob* sc = unsmob_grob (ly_car (s));
       sc->calculate_dependencies (POSTCALCED, POSTCALCING,
                                  ly_symbol2scm ("after-line-breaking-callback"));
     }
@@ -362,22 +362,22 @@ Line_of_score::post_processing (bool last_line)
     generate all molecules  to trigger all font loads.
 
  (ugh. This is not very memory efficient.)  */
-  for (SCM s = get_grob_property ("all-elements"); gh_pair_p (s); s = gh_cdr (s))
+  for (SCM s = get_grob_property ("all-elements"); gh_pair_p (s); s = ly_cdr (s))
     {
-      unsmob_grob (gh_car (s))->get_molecule ();
+      unsmob_grob (ly_car (s))->get_molecule ();
     }
   /*
     font defs;
    */
   SCM font_names = ly_quote_scm (paper_l ()->font_descriptions ());  
-  output_scheme (gh_list (ly_symbol2scm ("define-fonts"),
+  output_scheme (scm_listify (ly_symbol2scm ("define-fonts"),
                                        font_names,
                                        SCM_UNDEFINED));
 
   /*
     line preamble.
    */
-  output_scheme (gh_list (ly_symbol2scm ("start-line"),
+  output_scheme (scm_listify (ly_symbol2scm ("start-line"),
                          gh_double2scm (height),
                          SCM_UNDEFINED));
   
@@ -385,9 +385,9 @@ Line_of_score::post_processing (bool last_line)
      The default layer is 1. */
   for (int i = 0; i < 3; i++)
     for (SCM s = get_grob_property ("all-elements"); gh_pair_p (s);
-        s = gh_cdr (s))
+        s = ly_cdr (s))
       {
-       Grob *sc = unsmob_grob (gh_car (s));
+       Grob *sc = unsmob_grob (ly_car (s));
        Molecule *m = sc->get_molecule ();
        if (!m)
          continue;
@@ -403,8 +403,8 @@ Line_of_score::post_processing (bool last_line)
        SCM e = sc->get_grob_property ("extra-offset");
        if (gh_pair_p (e))
          {
-           o[X_AXIS] += gh_scm2double (gh_car (e));
-           o[Y_AXIS] += gh_scm2double (gh_cdr (e));      
+           o[X_AXIS] += gh_scm2double (ly_car (e));
+           o[Y_AXIS] += gh_scm2double (ly_cdr (e));      
          }
        
        output_molecule (m->get_expr (), o);
@@ -412,11 +412,11 @@ Line_of_score::post_processing (bool last_line)
   
   if (last_line)
     {
-      output_scheme (gh_list (ly_symbol2scm ("stop-last-line"), SCM_UNDEFINED));
+      output_scheme (scm_listify (ly_symbol2scm ("stop-last-line"), SCM_UNDEFINED));
     }
   else
     {
-      output_scheme (gh_list (ly_symbol2scm ("stop-line"), SCM_UNDEFINED));
+      output_scheme (scm_listify (ly_symbol2scm ("stop-line"), SCM_UNDEFINED));
     }
 }
 
@@ -430,19 +430,19 @@ Line_of_score::broken_col_range (Item const*l, Item const*r) const
   r = r->column_l ();
   SCM s = get_grob_property ("columns");
 
-  while (gh_pair_p (s) && gh_car (s) != r->self_scm ())
-    s = gh_cdr (s);
+  while (gh_pair_p (s) && ly_car (s) != r->self_scm ())
+    s = ly_cdr (s);
     
   if (gh_pair_p (s))
-    s = gh_cdr (s);
+    s = ly_cdr (s);
   
-  while (gh_pair_p (s) && gh_car (s) != l->self_scm ())
+  while (gh_pair_p (s) && ly_car (s) != l->self_scm ())
     {
-      Paper_column*c = dynamic_cast<Paper_column*> (unsmob_grob (gh_car (s)));
+      Paper_column*c = dynamic_cast<Paper_column*> (unsmob_grob (ly_car (s)));
       if (Item::breakable_b (c) && !c->line_l_)
        ret.push (c);
 
-      s = gh_cdr (s);
+      s = ly_cdr (s);
     }
 
   ret.reverse ();
index 2a12e914869318dc07e26ef37b60f86d2ad902cd..c9071393cfb62c2ff185fef1278e8e851e4b15bf 100644 (file)
@@ -48,7 +48,7 @@ Line_spanner::line_atom (Grob* me, Real dx, Real dy)
   Real on = length - thick;
   Real off = period - on;
 
-  SCM list = gh_list (ly_symbol2scm ("dashed-line"),
+  SCM list = scm_listify (ly_symbol2scm ("dashed-line"),
                      gh_double2scm (thick),
                      gh_double2scm (on),
                      gh_double2scm (off),
@@ -77,12 +77,12 @@ Line_spanner::line_molecule (Grob* me, Real dx, Real dy)
           && type == ly_symbol2scm ("trill"))
     {
       SCM alist_chain = Font_interface::font_alist_chain (me);
-      SCM style_chain = gh_list (gh_cons (ly_symbol2scm ("font-family"),
+      SCM style_chain = scm_listify (gh_cons (ly_symbol2scm ("font-family"),
                                          ly_symbol2scm ("music")),
                                 SCM_UNDEFINED);
       
       Font_metric *fm = Font_interface::get_font (me,
-                                                 gh_list (style_chain,
+                                                 scm_listify (style_chain,
                                                           alist_chain,
                                                           SCM_UNDEFINED));
       Molecule m = fm->find_by_name ("scripts-trill-element");
index ed71c533773a215e1f84ec607fced5b9577bc72a..274883c15a585e4a797683b9d406323aad1b3b6c 100644 (file)
@@ -95,7 +95,7 @@ Local_key_engraver::create_grobs ()
          SCM prev = scm_assoc (gh_cons (gh_int2scm (o), gh_int2scm (n)), localsig);
          if (prev == SCM_BOOL_F)
            prev = scm_assoc (gh_int2scm (n), localsig);
-         SCM prev_acc = (prev == SCM_BOOL_F) ? gh_int2scm (0) : gh_cdr (prev);
+         SCM prev_acc = (prev == SCM_BOOL_F) ? gh_int2scm (0) : ly_cdr (prev);
          bool different = !gh_equal_p (prev_acc , gh_int2scm (a));
          int p = gh_number_p (prev_acc) ? gh_scm2int (prev_acc) : 0;
 
index fe7d9de2abb404ee0b6b0a25db8dad714d987855..9c490908892565929b473ee719097a4502d1e827 100644 (file)
@@ -20,7 +20,7 @@
 static SCM
 pitch_less (SCM p1, SCM p2)
 {
-  return Pitch::less_p (gh_car (p1),  gh_car (p2));
+  return Pitch::less_p (ly_car (p1),  ly_car (p2));
 }
 
 static SCM pitch_less_proc;
@@ -85,7 +85,7 @@ Local_key_item::after_line_breaking (SCM smob)
 
   SCM accs = me->get_grob_property ("accidentals");
   for (SCM s = accs;
-       gh_pair_p (s); s = gh_cdr (s))
+       gh_pair_p (s); s = ly_cdr (s))
     {
       SCM opts = gh_cdar (s);
 
@@ -97,7 +97,7 @@ Local_key_item::after_line_breaking (SCM smob)
          if (!sp->original_l_)
            {
              /* there should be a better way to delete part of me */
-             scm_set_car_x (s, gh_list (gh_caar (s),
+             scm_set_car_x (s, scm_listify (gh_caar (s),
                                         ly_symbol2scm ("deleted"),
                                         SCM_UNDEFINED));
              me->set_grob_property ("molecule", SCM_EOL);
@@ -142,7 +142,7 @@ Local_key_item::brew_molecule (SCM smob)
 
   SCM accs = me->get_grob_property ("accidentals");
   for (SCM s = accs;
-       gh_pair_p (s); s = gh_cdr (s))
+       gh_pair_p (s); s = ly_cdr (s))
     {
       Pitch p (*unsmob_pitch (gh_caar (s)));
       SCM opts = gh_cdar (s);
index b01db45413ca14b3f931ec242ae3804dacf7dc76..849be07c8161b136f34f3caf7adc492fbb729bb0 100644 (file)
@@ -37,7 +37,7 @@ Lookup::beam (Real slope, Real width, Real thick)
         Interval (min_y, max_y));
 
   
-  SCM at = gh_list (ly_symbol2scm ("beam"),
+  SCM at = scm_listify (ly_symbol2scm ("beam"),
                    gh_double2scm (width),
                    gh_double2scm (slope),
                    gh_double2scm (thick),
@@ -57,7 +57,7 @@ Lookup::dashed_slur (Bezier b, Real thick, Real dash)
       l = gh_cons (ly_offset2scm (b.control_[i]), l);
     }
 
-  SCM at = (gh_list (ly_symbol2scm ("dashed-slur"),
+  SCM at = (scm_listify (ly_symbol2scm ("dashed-slur"),
                               gh_double2scm (thick), 
                               gh_double2scm (dash),
                               ly_quote_scm (l),
@@ -80,7 +80,7 @@ Lookup::blank (Box b)
 Molecule
 Lookup::filledbox (Box b) 
 {
-  SCM  at  = (gh_list (ly_symbol2scm ("filledbox"),
+  SCM  at  = (scm_listify (ly_symbol2scm ("filledbox"),
                     gh_double2scm (-b[X_AXIS][LEFT]),
                     gh_double2scm (b[X_AXIS][RIGHT]),                 
                     gh_double2scm (-b[Y_AXIS][DOWN]),
@@ -148,7 +148,7 @@ Lookup::slur (Bezier curve, Real curvethick, Real linethick)
     }
   
   
-  SCM at = (gh_list (ly_symbol2scm ("bezier-sandwich"),
+  SCM at = (scm_listify (ly_symbol2scm ("bezier-sandwich"),
                     ly_quote_scm (list),
                     gh_double2scm (linethick),
                     SCM_UNDEFINED));
@@ -161,8 +161,8 @@ Molecule
 Lookup::accordion (SCM s, Real staff_space, Font_metric *fm) 
 {
   Molecule m;
-  String sym = ly_scm2string (gh_car (s));
-  String reg = ly_scm2string (gh_car (gh_cdr (s)));
+  String sym = ly_scm2string (ly_car (s));
+  String reg = ly_scm2string (ly_car (ly_cdr (s)));
 
   if (sym == "Discant")
     {
@@ -365,7 +365,7 @@ Lookup::repeat_slash (Real w, Real s, Real t)
   SCM wid = gh_double2scm (w);
   SCM sl = gh_double2scm (s);
   SCM thick = gh_double2scm (t);
-  SCM slashnodot = gh_list (ly_symbol2scm ("repeat-slash"),
+  SCM slashnodot = scm_listify (ly_symbol2scm ("repeat-slash"),
                            wid, sl, thick, SCM_UNDEFINED);
 
   Box b (Interval (0, w + sqrt (sqr(t/s) + sqr (t))),
index 90a092ebdd57092c50ac003ffd3fdaca46212ff5..a335ca7f61b8f6f8e26f2bed3241367e6621d8db 100644 (file)
@@ -110,7 +110,7 @@ Lyric_phrasing_engraver::lookup_context_id (const String &context_id)
       // (key . ((alist_entry . old_entry) . previous_entry))
       if (to_boolean (gh_cdadr (s))) { // it's an old entry ... make it a new one
        SCM val = gh_cons (gh_cons (gh_caadr (s), SCM_BOOL_F), gh_cddr (s)); 
-       voice_alist_ = scm_assoc_set_x (voice_alist_, gh_car (s), val);
+       voice_alist_ = scm_assoc_set_x (voice_alist_, ly_car (s), val);
        return unsmob_voice_entry (gh_caar (val));
       }
       else { // the entry is current ... return it.
@@ -265,7 +265,7 @@ void Lyric_phrasing_engraver::create_grobs ()
   SCM sp = get_property ("phrasingPunctuation");
   punc = gh_string_p (sp) ? ly_scm2string (sp) : ".,;:?!\""; 
   
-  for (SCM v=voice_alist_; gh_pair_p (v); v = gh_cdr (v)) {
+  for (SCM v=voice_alist_; gh_pair_p (v); v = ly_cdr (v)) {
     SCM v_entry = gh_cdar (v);
     // ((current . oldflag) . previous)
     if (!to_boolean (gh_cdar (v_entry))) { // not an old entry left over from a prior note ...
@@ -281,7 +281,7 @@ void Lyric_phrasing_engraver::create_grobs ()
       if (entry->get_melisma ()) {
        if (entry->lyric_count ())
          warning (_ ("Huh? Melismatic note found to have associated lyrics."));
-       SCM previous_scm = gh_cdr (v_entry);
+       SCM previous_scm = ly_cdr (v_entry);
        if (previous_scm != SCM_EOL) {
          Syllable_group *previous = unsmob_voice_entry (previous_scm);
          if (previous->lyric_count ())
@@ -296,7 +296,7 @@ void Lyric_phrasing_engraver::create_grobs ()
 void
 Lyric_phrasing_engraver::stop_translation_timestep ()
 {
-  for (SCM v=voice_alist_; gh_pair_p (v); v = gh_cdr (v)) {
+  for (SCM v=voice_alist_; gh_pair_p (v); v = ly_cdr (v)) {
     SCM entry_scm = gh_cdar (v);
     // ((alist_entry . entry_is_old) . previous_entry)
     Syllable_group * entry = unsmob_voice_entry (gh_caar (entry_scm));
@@ -304,9 +304,9 @@ Lyric_phrasing_engraver::stop_translation_timestep ()
     // set previous_entry, set entry_is_old, and resave it to alist_
     // but only change if this current was not old.
     if (! to_boolean (gh_cdar (entry_scm))) { 
-      Syllable_group * previous_entry = unsmob_voice_entry (gh_cdr (entry_scm));
+      Syllable_group * previous_entry = unsmob_voice_entry (ly_cdr (entry_scm));
       previous_entry->copy (entry);
-      entry_scm = gh_cons (gh_cons (gh_caar (entry_scm), SCM_BOOL_T), gh_cdr (entry_scm));
+      entry_scm = gh_cons (gh_cons (gh_caar (entry_scm), SCM_BOOL_T), ly_cdr (entry_scm));
       voice_alist_ = scm_assoc_set_x (voice_alist_, gh_caar (v), entry_scm);
     }
     entry->next_lyric ();
index dfb402ee41aa66bbd3e47ed7d4187058028f595e..226d054d7819a809fee7624a945903b0823b941f 100644 (file)
@@ -309,7 +309,7 @@ format_to_ext (String format)
 }
 
 void
-main_prog (int, char**)
+main_prog (void * closure, int, char**)
 {
   /*
     need to do this first. Engravers use lily.scm contents.
@@ -324,7 +324,7 @@ main_prog (int, char**)
   all_fonts_global_p = new All_font_metrics (global_path.str ());
 
   init_scheme_code_string += ")";
-  gh_eval_str ((char *)init_scheme_code_string.ch_C());
+  scm_c_eval_string ((char *)init_scheme_code_string.ch_C());
   
   int p=0;
   const char *arg  = oparser_p_static->get_next_arg ();
@@ -486,9 +486,9 @@ main (int argc, char **argv)
   identify (&cerr);
 
 #ifdef WINNT
-  gh_enter (argc, argv, main_prog);
+  scm_boot_guile (argc, argv, main_prog, 0);
 #else
-  gh_enter (argc, argv, (void (*) (int, char**))main_prog);
+  scm_boot_guile (argc, argv, (void (*) (void*, int, char**))main_prog, 0);
 #endif
 
   return 0;                    // unreachable
index b226c741e7fbf5f251535afd3e89abd294bdf5c3..513f4b82ac186e6f5bef1f788809599186af7373 100644 (file)
@@ -61,7 +61,7 @@ Molecule::translate (Offset o)
       incr (a);
     }
 
-  expr_ = gh_list (ly_symbol2scm ("translate-molecule"),
+  expr_ = scm_listify (ly_symbol2scm ("translate-molecule"),
                   ly_offset2scm (o),
                   expr_, SCM_UNDEFINED);
   if (!empty_b ())
@@ -82,7 +82,7 @@ Molecule::translate_axis (Real x,Axis a)
 void
 Molecule::add_molecule (Molecule const &m)
 {
-  expr_ = gh_list (ly_symbol2scm ("combine-molecule"),
+  expr_ = scm_listify (ly_symbol2scm ("combine-molecule"),
                   m.expr_,
                   expr_, SCM_UNDEFINED);
   dim_.unite (m.dim_);
@@ -222,7 +222,7 @@ fontify_atom (Font_metric * met, SCM f)
   if (f == SCM_EOL)
     return f;
   else
-    return  gh_list (ly_symbol2scm ("fontify"),
+    return  scm_listify (ly_symbol2scm ("fontify"),
                     ly_quote_scm (met->description_), f, SCM_UNDEFINED);
 }
 
@@ -245,7 +245,7 @@ IMPLEMENT_SIMPLE_SMOBS (Molecule);
 int
 Molecule::print_smob (SCM s, SCM port, scm_print_state *)
 {
-  Molecule  *r = (Molecule *) gh_cdr (s);
+  Molecule  *r = (Molecule *) ly_cdr (s);
      
   scm_puts ("#<Molecule ", port);
   /*  String str (r->str ());
@@ -259,7 +259,7 @@ Molecule::print_smob (SCM s, SCM port, scm_print_state *)
 SCM
 Molecule::mark_smob (SCM s)
 {
-  Molecule  *r = (Molecule *) gh_cdr (s);
+  Molecule  *r = (Molecule *) ly_cdr (s);
   
   return r->expr_;
 }
index e75b6880f6958acc8319de3175963ddd6f2f7eb8..91eea12f126b99fda10794637e077e0dab5a6884 100644 (file)
@@ -35,7 +35,7 @@ Moment::smobbed_copy () const
 int
 Moment::print_smob (SCM s, SCM port, scm_print_state *)
 {
-  Moment  *r = (Moment *) gh_cdr (s);
+  Moment  *r = (Moment *) ly_cdr (s);
      
   scm_puts ("#<Mom ", port);
   String str (r->str ());
index 1df990d42b5aca513341b4a765c1c78ebded1b78..207913331444ec1b22a25159bd9934bb61924260 100644 (file)
@@ -23,7 +23,7 @@ Music_sequence::truncate (int k)
     {
       SCM s = l;
       k--;
-      for (; gh_pair_p (s) && k--; s = gh_cdr (s))
+      for (; gh_pair_p (s) && k--; s = ly_cdr (s))
        ;
 
       if (gh_pair_p (s))
@@ -59,8 +59,8 @@ Music_sequence::Music_sequence (SCM l)
 void
 Music_sequence::transpose (Pitch rq)
 {
-  for (SCM s = music_list (); gh_pair_p (s);  s = gh_cdr (s))
-    unsmob_music (gh_car (s))->transpose (rq);    
+  for (SCM s = music_list (); gh_pair_p (s);  s = ly_cdr (s))
+    unsmob_music (ly_car (s))->transpose (rq);    
 }
 
 
@@ -72,9 +72,9 @@ Music_sequence::cumulative_length () const
   Moment cumulative;
   
   Moment last_len ; 
-  for (SCM s = music_list (); gh_pair_p (s);  s = gh_cdr (s))
+  for (SCM s = music_list (); gh_pair_p (s);  s = ly_cdr (s))
     {
-      Moment l = unsmob_music (gh_car (s))->length_mom ();
+      Moment l = unsmob_music (ly_car (s))->length_mom ();
       if (last_len.grace_part_ && l.main_part_)
        {
          last_len.grace_part_ = Rational (0);
@@ -100,9 +100,9 @@ Moment
 Music_sequence::maximum_length () const
 {
   Moment dur = 0;
-  for (SCM s = music_list (); gh_pair_p (s);  s = gh_cdr (s))
+  for (SCM s = music_list (); gh_pair_p (s);  s = ly_cdr (s))
     {
-      Music * m = unsmob_music (gh_car (s));
+      Music * m = unsmob_music (ly_car (s));
       Moment l = m->length_mom ();
       dur = dur >? l;
     }
@@ -122,9 +122,9 @@ Music_sequence::do_relative_octave (Pitch p, bool ret_first)
   int count=0;
 
   Pitch last = p;
-  for (SCM s = music_list (); gh_pair_p (s);  s = gh_cdr (s))
+  for (SCM s = music_list (); gh_pair_p (s);  s = ly_cdr (s))
     {
-      last = unsmob_music (gh_car (s))->to_relative_octave (last);
+      last = unsmob_music (ly_car (s))->to_relative_octave (last);
       if (!count ++)
        retval = last;
     }
@@ -138,8 +138,8 @@ Music_sequence::do_relative_octave (Pitch p, bool ret_first)
 void
 Music_sequence::compress (Moment m)
 {
-  for (SCM s = music_list (); gh_pair_p (s);  s = gh_cdr (s))
-    unsmob_music (gh_car (s))->compress (m);
+  for (SCM s = music_list (); gh_pair_p (s);  s = ly_cdr (s))
+    unsmob_music (ly_car (s))->compress (m);
 }
 
 ADD_MUSIC (Music_sequence);
@@ -155,9 +155,9 @@ Music_sequence::minimum_start () const
 {
   Moment m;
   
-  for (SCM s = music_list (); gh_pair_p (s);  s = gh_cdr (s))
+  for (SCM s = music_list (); gh_pair_p (s);  s = ly_cdr (s))
     {
-      m = m <? unsmob_music (gh_car (s))->start_mom ();
+      m = m <? unsmob_music (ly_car (s))->start_mom ();
     }
   return m;
 }
@@ -167,9 +167,9 @@ Music_sequence::first_start () const
 {
   Moment m;
   
-  for (SCM s = music_list (); gh_pair_p (s);  s = gh_cdr (s))
+  for (SCM s = music_list (); gh_pair_p (s);  s = ly_cdr (s))
     {
-      Music * mus = unsmob_music (gh_car (s));
+      Music * mus = unsmob_music (ly_car (s));
       Moment l = mus->length_mom ();
       Moment s = mus->start_mom ();
       if (l.to_bool () || s.to_bool ())
index edb75a4899ab030f60a4ae6bbbf59e84bb16bb19..ca3f8fe813c39dc17b5a106ce977123eb7a8ea6b 100644 (file)
@@ -24,7 +24,7 @@ ly_deep_mus_copy (SCM m)
     }
   else if (gh_pair_p (m))
     {
-      return gh_cons (ly_deep_mus_copy (gh_car (m)), ly_deep_mus_copy (gh_cdr (m)));
+      return gh_cons (ly_deep_mus_copy (ly_car (m)), ly_deep_mus_copy (ly_cdr (m)));
     }
   else
     return m;
@@ -99,7 +99,7 @@ Music::start_mom () const
 void
 print_alist (SCM a, SCM port)
 {
-  for (SCM s = a; gh_pair_p (s); s = gh_cdr (s))
+  for (SCM s = a; gh_pair_p (s); s = ly_cdr (s))
     {
       scm_display (gh_caar (s), port);
       scm_puts (" = ", port); 
@@ -153,10 +153,10 @@ Music::get_mus_property (SCM sym) const
 {
   SCM s = scm_sloppy_assq (sym, mutable_property_alist_);
   if (s != SCM_BOOL_F)
-    return gh_cdr (s);
+    return ly_cdr (s);
 
   s = scm_sloppy_assq (sym, immutable_property_alist_);
-  return (s == SCM_BOOL_F) ? SCM_EOL : gh_cdr (s); 
+  return (s == SCM_BOOL_F) ? SCM_EOL : ly_cdr (s); 
 }
 
 /*
index 4a44f5919a8f814821e23923db12fd8f430bdaa2..9e699a5e82ca651456144342d38eb60d9ac93d8e 100644 (file)
@@ -120,7 +120,7 @@ My_lily_parser::paper_description ()
 
   SCM al = p->translator_p_dict_p_->to_alist ();
   SCM l = SCM_EOL;
-  for (SCM s = al ; gh_pair_p (s); s = gh_cdr (s))
+  for (SCM s = al ; gh_pair_p (s); s = ly_cdr (s))
     {
       Translator_def * td = unsmob_translator_def (gh_cdar (s));
       l = gh_cons (gh_cons (gh_caar (s), td->to_alist ()),  l);
index 760651efeec8a29367f88fd25e08c016947cc29e..3daabc0672f73a830a0b05ca5488b8c8727c1251 100644 (file)
@@ -144,7 +144,7 @@ cout << "params for cols " << Paper_column::rank_i (l) << " " << Paper_column::r
            access to the note head.
 
          */
-         for (SCM s = seq; gh_pair_p (s); s = gh_cdr (s))
+         for (SCM s = seq; gh_pair_p (s); s = ly_cdr (s))
            {
              Grob *lm = unsmob_grob (gh_caar (s));
              Grob *rm = unsmob_grob (gh_cdar (s));
@@ -189,7 +189,7 @@ New_spacing_spanner::breakable_column_spacing (Item* l, Item *r)
   Real break_dist = 0.0;
   SCM espace = l->get_grob_property ("extra-space");
   if (gh_pair_p (espace))
-    break_dist += gh_scm2double (gh_cdr (espace));
+    break_dist += gh_scm2double (ly_cdr (espace));
 
   if (!break_dist)
     break_dist = 1.0;
@@ -199,7 +199,7 @@ New_spacing_spanner::breakable_column_spacing (Item* l, Item *r)
   // todo: naming of "distance"
   espace = l->get_grob_property ("stretch-distance");
   if (gh_pair_p (espace))
-    break_stretch += gh_scm2double (gh_cdr (espace));
+    break_stretch += gh_scm2double (ly_cdr (espace));
 
   if (!break_stretch)
     break_stretch = 1.0;
@@ -471,8 +471,8 @@ New_spacing_spanner::stem_dir_correction (Grob*me, Grob*l, Grob*r)
   if (scm_ilength (dl) != 1 || scm_ilength (dr) != 1)
     return 0.;
 
-  dl = gh_car (dl);
-  dr = gh_car (dr);
+  dl = ly_car (dl);
+  dr = ly_car (dr);
 
   assert (gh_number_p (dl) && gh_number_p (dr));
   int d1 = gh_scm2int (dl);
index 6cf77b6d5ec6a210f1e0ac0f1d625802cf8497d3..9a0cdf8a9bc11498cb4c59a0af2b4fc42a77343c 100644 (file)
@@ -59,9 +59,9 @@ Note_column::head_positions_interval (Grob *me)
   iv.set_empty ();
 
   SCM h = me->get_grob_property ("note-heads");
-  for (; gh_pair_p (h); h = gh_cdr (h))
+  for (; gh_pair_p (h); h = ly_cdr (h))
     {
-      Grob *se = unsmob_grob (gh_car (h));
+      Grob *se = unsmob_grob (ly_car (h));
       
       int j = int (Staff_symbol_referencer::position_f (se));
       iv.unite (Slice (j,j));
index 33ce0003153452d0b06832b75729d94d489bb77f..8059064dd1726d26a944c2c7ee47179702065a86 100644 (file)
@@ -99,7 +99,7 @@ Note_head::brew_molecule (SCM smob)
     UGH: use grob-property.
   */
   Molecule out = Font_interface::get_default_font (me)->find_by_name (String ("noteheads-") + 
-               ly_scm2string (scm_primitive_eval (gh_list (ly_symbol2scm ("find-notehead-symbol"),
+               ly_scm2string (scm_primitive_eval (scm_listify (ly_symbol2scm ("find-notehead-symbol"),
                                                  me->get_grob_property ("duration-log"),
                                                  ly_quote_scm (style),
                                                            SCM_UNDEFINED))));
@@ -133,7 +133,7 @@ Note_head::brew_ez_molecule (SCM smob)
   int l = gh_scm2int (me->get_grob_property ("duration-log"));
 
   int b = (l >= 2);
-  SCM at = gh_list (ly_symbol2scm ("ez-ball"),
+  SCM at = scm_listify (ly_symbol2scm ("ez-ball"),
                    me->get_grob_property ("note-character"),
                    gh_int2scm (b),
                    gh_int2scm (1-b),
@@ -170,12 +170,12 @@ Note_head::stem_attachment_coordinate (Grob *me, Axis a)
     return 0.0;
 
   SCM st = me->get_grob_property ("style");
-  SCM result = gh_apply (v, gh_list (st, SCM_UNDEFINED));
+  SCM result = gh_apply (v, scm_listify (st, SCM_UNDEFINED));
 
   if (!gh_pair_p (result))
     return 0.0;
 
-  result = (a == X_AXIS) ? gh_car (result) : gh_cdr (result);
+  result = (a == X_AXIS) ? ly_car (result) : ly_cdr (result);
   
   return gh_number_p (result) ?  gh_scm2double (result) : 0.0;
 }
index 69d16f6c6714251134fc8333edb97a9d757760e7..3877dad1d0e224bdd838126bf2bf9f4282889421 100644 (file)
@@ -129,9 +129,13 @@ void
 Note_heads_engraver::start_translation_timestep ()
 {
   
-  /* TODO:make this settable?
+  /*
+    TODO: make this settable?
+
+    TODO: what if someone wants a line break in a grace note section??
    */
-  if (note_end_mom_ > now_mom ())
+  //  if (note_end_mom_ > now_mom ())  
+  if (note_end_mom_.main_part_ > now_mom ().main_part_)
     {
       Score_engraver * e = 0;
       Translator * t  =  daddy_grav_l ();
index fbf90263b62b0c14b36c9aece9a6cbf0a7b8a482..83a5045732a57e52a3f6313e0e3cb197fdfb5bab 100644 (file)
@@ -61,7 +61,7 @@ Output_property_engraver::acknowledge_grob (Grob_info inf)
        should typecheck pred. 
        */
       SCM result=gh_apply (pred,
-                          gh_list (inf.elem_l_->self_scm (), SCM_UNDEFINED));
+                          scm_listify (inf.elem_l_->self_scm (), SCM_UNDEFINED));
       if (to_boolean (result))
        {
          SCM sym = o->get_mus_property ("grob-property");
index 0fcdd18fc7dae0d25dd8026b896b3f4f1bdb76dd..84bb78ff44cbe60bbdcda2b80dde26b1d00fabf1 100644 (file)
@@ -128,7 +128,7 @@ Paper_def::find_font (SCM fn, Real m)
   SCM met = scm_assoc (key, scaled_fonts_);
 
   if (gh_pair_p (met))
-    return unsmob_metrics (gh_cdr (met));
+    return unsmob_metrics (ly_cdr (met));
 
   SCM ssc;
   if (scope_p_->try_retrieve (ly_symbol2scm ("outputscale"), &ssc))
@@ -155,7 +155,7 @@ Paper_def::font_descriptions ()const
 
   
   SCM l = SCM_EOL;
-  for (SCM s = scaled_fonts_; gh_pair_p (s); s = gh_cdr (s))
+  for (SCM s = scaled_fonts_; gh_pair_p (s); s = ly_cdr (s))
     {
       SCM desc = gh_caar (s);
       SCM mdesc = unsmob_metrics (gh_cdar (s))->description_;
index 59d4fb4ba5b3044f5b22b7799743286495645c39..4ad9f06c095cbd00f2143186d66368c74de15fd1 100644 (file)
@@ -74,7 +74,7 @@ Paper_outputter::output_header ()
       gh_define ("security-paranoia", SCM_BOOL_T);      
     }
 
-  SCM exp = gh_list (ly_symbol2scm ((output_format_global + "-scm").ch_C ()),
+  SCM exp = scm_listify (ly_symbol2scm ((output_format_global + "-scm").ch_C ()),
                     ly_quote_scm (ly_symbol2scm ("all-definitions")),
                     SCM_UNDEFINED);
   exp = scm_primitive_eval (exp);
@@ -93,7 +93,7 @@ Paper_outputter::output_header ()
   generate = generate + to_str (' ' * (120 - generate.length_i ())>? 0)  ;
   
   SCM args_scm = 
-    gh_list (ly_str02scm (creator.ch_l ()),
+    scm_listify (ly_str02scm (creator.ch_l ()),
             ly_str02scm (generate.ch_l ()), SCM_UNDEFINED);
 
 
@@ -106,7 +106,7 @@ Paper_outputter::output_header ()
 void
 Paper_outputter::output_comment (String str)
 {
-  output_scheme (gh_list (ly_symbol2scm ("comment"),
+  output_scheme (scm_listify (ly_symbol2scm ("comment"),
                          ly_str02scm ((char*)str.ch_C ()),
                          SCM_UNDEFINED)
                 );
@@ -151,7 +151,7 @@ void
 Paper_outputter::output_scope (Scope *scope, String prefix)
 {
   SCM al = scope->to_alist ();
-  for (SCM s = al ; gh_pair_p (s); s = gh_cdr (s))
+  for (SCM s = al ; gh_pair_p (s); s = ly_cdr (s))
     {
       SCM k = gh_caar (s);
       SCM v = gh_cdar (s);
@@ -190,7 +190,7 @@ void
 Paper_outputter::output_Real_def (String k, Real v)
 {
   
-  SCM scm = gh_list (ly_symbol2scm ("lily-def"),
+  SCM scm = scm_listify (ly_symbol2scm ("lily-def"),
                     ly_str02scm (k.ch_l ()),
                     ly_str02scm (to_str (v).ch_l ()),
                     SCM_UNDEFINED);
@@ -201,7 +201,7 @@ void
 Paper_outputter::output_String_def (String k, String v)
 {
   
-  SCM scm = gh_list (ly_symbol2scm ("lily-def"),
+  SCM scm = scm_listify (ly_symbol2scm ("lily-def"),
                     ly_str02scm (k.ch_l ()),
                     ly_str02scm (v.ch_l ()),
                     SCM_UNDEFINED);
@@ -211,7 +211,7 @@ Paper_outputter::output_String_def (String k, String v)
 void
 Paper_outputter::output_int_def (String k, int v)
 {
-  SCM scm = gh_list (ly_symbol2scm ("lily-def"),
+  SCM scm = scm_listify (ly_symbol2scm ("lily-def"),
                     ly_str02scm (k.ch_l ()),
                     ly_str02scm (to_str (v).ch_l ()),
                     SCM_UNDEFINED);
@@ -253,7 +253,7 @@ Paper_outputter::write_header_fields_to_file (Scope * header)
          /* Only write header field to file if it exists */
          if (gh_pair_p (val))
            {
-             s = ly_scm2string (gh_cdr (val));
+             s = ly_scm2string (ly_cdr (val));
              /* Always write header field file, even if string is empty ... */
              write_header_field_to_file (basename_, key, s);
            }
index 6d659d7064cd0576c3f222eb9bb227c2d3e1d914..ebf7d256bbe92ab0a9efcc25006ac8778a17ad6c 100644 (file)
@@ -117,12 +117,12 @@ Paper_score::process ()
   if (paper_l_->scope_p_)
     outputter_l_->output_scope (paper_l_->scope_p_, "lilypondpaper");
 
-  SCM scm = gh_list (ly_symbol2scm ("header-end"), SCM_UNDEFINED);
+  SCM scm = scm_listify (ly_symbol2scm ("header-end"), SCM_UNDEFINED);
   outputter_l_->output_scheme (scm);
 
   line_l_->output_lines ();
 
-  scm = gh_list (ly_symbol2scm ("end-output"), SCM_UNDEFINED);
+  scm = scm_listify (ly_symbol2scm ("end-output"), SCM_UNDEFINED);
   outputter_l_->output_scheme (scm);
 
   progress_indication ("\n");
index d147dd787e184ab81dbc9129e232d5ea5b07b3ef..3819a57f39a08f8c6da36fcb4150e14d2b68f68a 100644 (file)
@@ -99,7 +99,7 @@ is_duration_b (int t)
 void
 set_music_properties (Music *p, SCM a)
 {
-  for (SCM k = a; gh_pair_p (k); k = gh_cdr (k))
+  for (SCM k = a; gh_pair_p (k); k = ly_cdr (k))
        {
        p->set_mus_property (gh_caar (k), gh_cdar (k));
        }
@@ -382,7 +382,7 @@ notenames_body:
          int i = scm_ilength ($1);
 
          SCM tab = scm_make_vector (gh_int2scm (i), SCM_EOL);
-         for (SCM s = $1; gh_pair_p (s); s = gh_cdr (s)) {
+         for (SCM s = $1; gh_pair_p (s); s = ly_cdr (s)) {
                SCM pt = gh_cdar (s);
                if (!unsmob_pitch (pt))
                        THIS->parser_error ("Need pitch object.");
@@ -521,7 +521,7 @@ translator_spec_body:
                td->type_aliases_ = gh_cons ($3, td->type_aliases_);
        }
        | translator_spec_body ELEMENTDESCRIPTIONS embedded_scm {
-               for (SCM p = $3; gh_pair_p (p); p = gh_cdr (p))
+               for (SCM p = $3; gh_pair_p (p); p = ly_cdr (p))
                        unsmob_translator_def ($$)
                        ->add_property_assign (scm_symbol_to_string (gh_caar (p)), gh_cdar (p));
 
@@ -670,8 +670,8 @@ Music_list: /* empty */ {
                SCM s = $$;
                SCM c = gh_cons ($2->self_scm (), SCM_EOL);
                scm_gc_unprotect_object ($2->self_scm ()); /* UGH */
-               if (gh_pair_p (gh_cdr (s)))
-                       gh_set_cdr_x (gh_cdr (s), c); /* append */
+               if (gh_pair_p (ly_cdr (s)))
+                       gh_set_cdr_x (ly_cdr (s), c); /* append */
                else
                        gh_set_car_x (s, c); /* set first cons */
                gh_set_cdr_x (s, c) ;  /* remember last cell */ 
@@ -735,30 +735,30 @@ Repeated_music:
 
 Music_sequence: '{' Music_list '}'     {
                $$ = new Music_sequence (SCM_EOL);
-               $$->set_mus_property ("elements", gh_car ($2));
+               $$->set_mus_property ("elements", ly_car ($2));
        }
        ;
 
 Sequential_music:
        SEQUENTIAL '{' Music_list '}'           {
                $$ = new Sequential_music (SCM_EOL);
-               $$->set_mus_property ("elements", gh_car ($3));
+               $$->set_mus_property ("elements", ly_car ($3));
        }
        | '{' Music_list '}'            {
                $$ = new Sequential_music (SCM_EOL);
-               $$->set_mus_property ("elements", gh_car ($2));
+               $$->set_mus_property ("elements", ly_car ($2));
        }
        ;
 
 Simultaneous_music:
        SIMULTANEOUS '{' Music_list '}'{
                $$ = new Simultaneous_music (SCM_EOL);
-               $$->set_mus_property ("elements", gh_car ($3));
+               $$->set_mus_property ("elements", ly_car ($3));
 
        }
        | '<' Music_list '>'    {
                $$ = new Simultaneous_music (SCM_EOL);
-               $$->set_mus_property ("elements", gh_car ($2));
+               $$->set_mus_property ("elements", ly_car ($2));
        }
        ;
 
@@ -872,7 +872,7 @@ Composite_music:
                fraction Music  
 
        {
-               int n = gh_scm2int (gh_car ($3)); int d = gh_scm2int (gh_cdr ($3));
+               int n = gh_scm2int (ly_car ($3)); int d = gh_scm2int (ly_cdr ($3));
                Music *mp = $4;
                $$ = new Time_scaled_music (SCM_EOL);
                $$->set_spot (THIS->pop_spot ());
@@ -1148,9 +1148,9 @@ command_element:
                SCM result = gh_call1 (func, $2);
 
                SCM l = SCM_EOL;
-               for (SCM s = result ; gh_pair_p (s); s = gh_cdr (s)) {
+               for (SCM s = result ; gh_pair_p (s); s = ly_cdr (s)) {
                        Music * p = new Music (SCM_EOL);
-                       set_music_properties (p, gh_car (s));
+                       set_music_properties (p, ly_car (s));
                        l = gh_cons (p->self_scm (), l);
                        scm_gc_unprotect_object (p->self_scm ());
                }
@@ -1167,8 +1167,8 @@ command_element:
        | TIME_T fraction  {
                Music * p1 = set_property_music (ly_symbol2scm ( "timeSignatureFraction"), $2);
 
-  int l = gh_scm2int (gh_car ($2));
-  int o = gh_scm2int (gh_cdr ($2));
+  int l = gh_scm2int (ly_car ($2));
+  int o = gh_scm2int (ly_cdr ($2));
   
   Moment one_beat = Moment (1)/Moment (o);
   Moment len = Moment (l) * one_beat;
@@ -1177,7 +1177,7 @@ command_element:
                Music *p2 = set_property_music (ly_symbol2scm ("measureLength"), len.smobbed_copy ());
                Music *p3 = set_property_music (ly_symbol2scm ("beatLength"), one_beat.smobbed_copy ());
 
-               SCM list = gh_list (p1->self_scm (), p2->self_scm (), p3->self_scm(), SCM_UNDEFINED);
+               SCM list = scm_listify (p1->self_scm (), p2->self_scm (), p3->self_scm(), SCM_UNDEFINED);
                Sequential_music *seq = new Sequential_music (SCM_EOL);
                seq->set_mus_property ("elements", list);
                
@@ -1661,7 +1661,7 @@ multiplied_duration:
                $$ = unsmob_duration ($$)->compressed ( $3) .smobbed_copy ();
        }
        | multiplied_duration '*' FRACTION {
-               Rational  m (gh_scm2int (gh_car ($3)), gh_scm2int (gh_cdr ($3)));
+               Rational  m (gh_scm2int (ly_car ($3)), gh_scm2int (ly_cdr ($3)));
 
                $$ = unsmob_duration ($$)->compressed (m).smobbed_copy ();
        }
@@ -1764,7 +1764,7 @@ simple_element:
                        n->set_mus_property ("force-accidental", SCM_BOOL_T);
 
                Simultaneous_music*v = new Request_chord (SCM_EOL);
-               v->set_mus_property ("elements", gh_list (n->self_scm (), SCM_UNDEFINED));
+               v->set_mus_property ("elements", scm_listify (n->self_scm (), SCM_UNDEFINED));
                
                v->set_spot (i);
                n->set_spot (i);
@@ -1774,9 +1774,9 @@ simple_element:
                Music * m = unsmob_music ($1);
                Input i = THIS->pop_spot (); 
                m->set_spot (i);
-               for (SCM s = m->get_mus_property ("elements"); gh_pair_p (s); s = gh_cdr (s))
+               for (SCM s = m->get_mus_property ("elements"); gh_pair_p (s); s = ly_cdr (s))
                        {
-                               unsmob_music (gh_car (s))->set_mus_property ("duration", $2);
+                               unsmob_music (ly_car (s))->set_mus_property ("duration", $2);
                        }
                $$ = m;
        }       
@@ -1798,7 +1798,7 @@ simple_element:
                        e = rest_req_p->self_scm ();
                    }
                Simultaneous_music* velt_p = new Request_chord (SCM_EOL);
-               velt_p-> set_mus_property ("elements", gh_list (e,SCM_UNDEFINED));
+               velt_p-> set_mus_property ("elements", scm_listify (e,SCM_UNDEFINED));
                velt_p->set_spot (i);
 
                $$ = velt_p;
@@ -1817,13 +1817,13 @@ simple_element:
                sp2->set_mus_property ("span-type", r);
 
                Request_chord * rqc1 = new Request_chord (SCM_EOL);
-               rqc1->set_mus_property ("elements", gh_list (sp1->self_scm (), SCM_UNDEFINED));
+               rqc1->set_mus_property ("elements", scm_listify (sp1->self_scm (), SCM_UNDEFINED));
                Request_chord * rqc2 = new Request_chord (SCM_EOL);
-               rqc2->set_mus_property ("elements", gh_list (sk->self_scm (), SCM_UNDEFINED));;
+               rqc2->set_mus_property ("elements", scm_listify (sk->self_scm (), SCM_UNDEFINED));;
                Request_chord * rqc3 = new Request_chord (SCM_EOL);
-               rqc3->set_mus_property ("elements", gh_list (sp2->self_scm (), SCM_UNDEFINED));;
+               rqc3->set_mus_property ("elements", scm_listify (sp2->self_scm (), SCM_UNDEFINED));;
 
-               SCM ms = gh_list (rqc1->self_scm (), rqc2->self_scm (), rqc3->self_scm (), SCM_UNDEFINED);
+               SCM ms = scm_listify (rqc1->self_scm (), rqc2->self_scm (), rqc3->self_scm (), SCM_UNDEFINED);
 
                $$ = new Sequential_music (SCM_EOL);
                $$->set_mus_property ("elements", ms);
@@ -1836,7 +1836,7 @@ simple_element:
                lreq_p->set_mus_property ("duration",$2);
                lreq_p->set_spot (i);
                Simultaneous_music* velt_p = new Request_chord (SCM_EOL);
-               velt_p->set_mus_property ("elements", gh_list (lreq_p->self_scm (), SCM_UNDEFINED));
+               velt_p->set_mus_property ("elements", scm_listify (lreq_p->self_scm (), SCM_UNDEFINED));
 
                $$= velt_p;
        }
@@ -1910,7 +1910,7 @@ chord_step:
                $$ = gh_cons (unsmob_pitch ($1)->smobbed_copy (), SCM_EOL);
        }
        | CHORDMODIFIER_PITCH chord_note { /* Ugh. */
-               $$ = gh_list (unsmob_pitch ($1)->smobbed_copy (),
+               $$ = scm_listify (unsmob_pitch ($1)->smobbed_copy (),
                        $2, SCM_UNDEFINED);
        }
        ;
index 65596d0ad3be73518c432e0e0bc371fbfa816341..bd18cb347bffefece896bd24ddcf5a47cdbc4428 100644 (file)
@@ -126,9 +126,9 @@ get_music_info (Moment m, Music_iterator* iter, SCM *pitches, SCM *durations)
 {
   if (iter->ok ())
     {
-      for (SCM i = iter->get_music (m); gh_pair_p (i); i = gh_cdr (i))
+      for (SCM i = iter->get_music (m); gh_pair_p (i); i = ly_cdr (i))
        {
-         Music *m = unsmob_music (gh_car (i));
+         Music *m = unsmob_music (ly_car (i));
          if (Melodic_req *r = dynamic_cast<Melodic_req *> (m))
            *pitches = gh_cons (r->get_mus_property ("pitch"), *pitches);
          if (Rhythmic_req *r = dynamic_cast<Rhythmic_req *> (m))
@@ -152,8 +152,8 @@ Part_combine_music_iterator::get_state (Moment)
   if (!gh_pair_p (s))
     return state;
 
-  Moment change_mom = *unsmob_moment (gh_car (s));
-  Moment diff_mom = *unsmob_moment (gh_cdr (s));
+  Moment change_mom = *unsmob_moment (ly_car (s));
+  Moment diff_mom = *unsmob_moment (ly_cdr (s));
   
   Moment now = pending_moment ();
 
@@ -206,22 +206,22 @@ Part_combine_music_iterator::get_state (Moment)
              scm_sort_list_x (second_pitches,
                               scm_primitive_eval (ly_str02scm ("Pitch::less_p")));
 
-             interval = gh_int2scm (unsmob_pitch (gh_car (first_pitches))->steps ()
-                                    - unsmob_pitch (gh_car (scm_last_pair (second_pitches)))->steps ());
+             interval = gh_int2scm (unsmob_pitch (ly_car (first_pitches))->steps ()
+                                    - unsmob_pitch (ly_car (scm_last_pair (second_pitches)))->steps ());
            }
          
          if (first_durations != SCM_EOL)
            {
              scm_sort_list_x (first_durations,
                               scm_primitive_eval (ly_str02scm ("Duration::less_p")));
-             first_mom += unsmob_duration (gh_car (first_durations))->length_mom ();
+             first_mom += unsmob_duration (ly_car (first_durations))->length_mom ();
            }
          
          if (second_durations != SCM_EOL)
            {
              scm_sort_list_x (second_durations,
                               scm_primitive_eval (ly_str02scm ("Duration::less_p")));
-             second_mom += unsmob_duration (gh_car (second_durations))->length_mom ();
+             second_mom += unsmob_duration (ly_car (second_durations))->length_mom ();
            }
          
          if (first_pitches != SCM_EOL && second_pitches == SCM_EOL
@@ -280,10 +280,10 @@ Part_combine_music_iterator::get_state (Moment)
              SCM s = first_translator->get_property (ly_symbol2scm ("splitInterval"));
              int i = gh_scm2int (interval);
              if (gh_pair_p (s)
-                 && gh_number_p (gh_car (s))
-                 && gh_number_p (gh_cdr (s))
-                 && i >= gh_scm2int (gh_car (s))
-                 && i <= gh_scm2int (gh_cdr (s)))
+                 && gh_number_p (ly_car (s))
+                 && gh_number_p (ly_cdr (s))
+                 && i >= gh_scm2int (ly_car (s))
+                 && i <= gh_scm2int (ly_cdr (s)))
                {
                  if (! (state & ~ (SPLIT_INTERVAL | UNIRHYTHM | UNISON)))
                    state |= SPLIT_INTERVAL;
index 96e25b97d8755e25fd0da72cf1ab606a753d63f1..c13d65505c58a6f8d780d4743332ca353306c73f 100644 (file)
@@ -28,9 +28,9 @@ Performer_group_performer::announce_element (Audio_element_info info)
 void
 Performer_group_performer::create_audio_elements ()
 {
-  for (SCM p = simple_trans_list_; gh_pair_p (p); p = gh_cdr (p))
+  for (SCM p = simple_trans_list_; gh_pair_p (p); p = ly_cdr (p))
     {
-      Translator * t = unsmob_translator (gh_car (p));
+      Translator * t = unsmob_translator (ly_car (p));
       Performer * eng = dynamic_cast<Performer*> (t);
       if (eng)
        eng->create_audio_elements ();
@@ -44,9 +44,9 @@ Performer_group_performer::acknowledge_audio_elements ()
     {
       Audio_element_info info = announce_info_arr_[j];
 
-      for (SCM p = simple_trans_list_; gh_pair_p (p); p = gh_cdr (p))
+      for (SCM p = simple_trans_list_; gh_pair_p (p); p = ly_cdr (p))
        {
-         Translator * t = unsmob_translator (gh_car (p));
+         Translator * t = unsmob_translator (ly_car (p));
          Performer * eng = dynamic_cast<Performer*> (t);
          if (eng && eng!= info.origin_trans_l_)
            eng->acknowledge_audio_element (info);
@@ -57,9 +57,9 @@ Performer_group_performer::acknowledge_audio_elements ()
 void
 Performer_group_performer::do_announces ()
 {
-  for (SCM p = trans_group_list_; gh_pair_p (p); p =gh_cdr (p))
+  for (SCM p = trans_group_list_; gh_pair_p (p); p =ly_cdr (p))
     {
-      Translator * t = unsmob_translator (gh_car (p));
+      Translator * t = unsmob_translator (ly_car (p));
       dynamic_cast<Performer_group_performer*> (t)->do_announces ();
     }
 
index 0a57fa762c072744bec6deeb43c02c3fa4fcbbb2..df3238a6355a400aedcd77447210bcc9d492055a 100644 (file)
@@ -162,7 +162,7 @@ Piano_pedal_engraver::create_grobs ()
       else if (p->req_l_drul_[START])
        {
          p->start_req_l_ = p->req_l_drul_[START];
-         s = gh_car (strings);
+         s = ly_car (strings);
        }
 
       if (gh_string_p (s))
index aa7774debce072ce1de914f0da4af462446dfc61..54d876cfa7080bee983b2e89022d452e0bb5fbfc 100644 (file)
@@ -253,7 +253,7 @@ IMPLEMENT_SIMPLE_SMOBS (Pitch);
 int
 Pitch::print_smob (SCM s, SCM port, scm_print_state *)
 {
-  Pitch  *r = (Pitch *) gh_cdr (s);
+  Pitch  *r = (Pitch *) ly_cdr (s);
      
   scm_puts ("#<Pitch ", port);
   scm_display (ly_str02scm (r->str ().ch_C ()), port);
@@ -265,8 +265,8 @@ Pitch::print_smob (SCM s, SCM port, scm_print_state *)
 SCM
 Pitch::equal_p (SCM a , SCM b)
 {
-  Pitch  *p = (Pitch *) gh_cdr (a);
-  Pitch  *q = (Pitch *) gh_cdr (b);  
+  Pitch  *p = (Pitch *) ly_cdr (a);
+  Pitch  *q = (Pitch *) ly_cdr (b);  
 
   bool eq = p->notename_i_ == q->notename_i_
     && p->octave_i_ == q->octave_i_
index a4cd9a720700d8f560ef77e1ab3220ce9d27fe2c..439084b02087826f59edd31794e7d0303aadf058 100644 (file)
@@ -432,7 +432,7 @@ Porrectus::brew_horizontal_slope(Real width, Real slope, Real thickness)
   SCM width_scm = gh_double2scm (width);
   SCM slope_scm = gh_double2scm (slope);
   SCM thickness_scm = gh_double2scm (thickness);
-  SCM horizontal_slope = gh_list (ly_symbol2scm ("beam"),
+  SCM horizontal_slope = scm_listify (ly_symbol2scm ("beam"),
                                  width_scm, slope_scm,
                                  thickness_scm, SCM_UNDEFINED);
   Box b (Interval (0, width),
index 62096373140702908231a55dcbfb55a3010d22a0..044f9613c4d459d7f110613362187144cf4f2341 100644 (file)
@@ -60,10 +60,10 @@ Property_engraver::initialize ()
   prop_dict_ = new Scheme_hash_table;
 
   SCM plist = get_property (ly_symbol2scm ("Generic_property_list"));
-  for (; gh_pair_p (plist); plist = gh_cdr (plist))
+  for (; gh_pair_p (plist); plist = ly_cdr (plist))
     {
-      SCM elt_props = gh_car (plist);
-      prop_dict_->set (gh_car (elt_props), gh_cdr (elt_props));
+      SCM elt_props = ly_car (plist);
+      prop_dict_->set (ly_car (elt_props), ly_cdr (elt_props));
     }
 }
 
@@ -72,9 +72,9 @@ Property_engraver::acknowledge_grob (Grob_info i)
 {
  SCM ifs = i.elem_l_->get_grob_property ("interfaces");
   SCM props;
-  for (; gh_pair_p (ifs); ifs = gh_cdr (ifs))
+  for (; gh_pair_p (ifs); ifs = ly_cdr (ifs))
     {      
-      if (prop_dict_->try_retrieve (gh_car (ifs), &props))
+      if (prop_dict_->try_retrieve (ly_car (ifs), &props))
        {
          apply_properties (props,i.elem_l_, i.origin_trans_l_->daddy_trans_l_);
        }
@@ -90,7 +90,7 @@ Property_engraver::acknowledge_grob (Grob_info i)
 void
 Property_engraver::apply_properties (SCM p, Grob *e, Translator_group*origin)
 {
-  for (; gh_pair_p (p); p = gh_cdr (p))
+  for (; gh_pair_p (p); p = ly_cdr (p))
     {
       /*
        Try each property in order; earlier descriptions take
@@ -98,8 +98,8 @@ Property_engraver::apply_properties (SCM p, Grob *e, Translator_group*origin)
        they're already set.
       */
       
-      SCM entry = gh_car (p);
-      SCM prop_sym = gh_car (entry);
+      SCM entry = ly_car (p);
+      SCM prop_sym = ly_car (entry);
       SCM type_p   = gh_cadr (entry);
       SCM elt_prop_sym = gh_caddr (entry);
 
@@ -121,7 +121,7 @@ Property_engraver::apply_properties (SCM p, Grob *e, Translator_group*origin)
          warning (_f ("`%s' is deprecated.  Use\n \\property %s.%s \\override #'%s = #%s",
                       ly_symbol2string (prop_sym).ch_C (),
                       origin->type_str_.ch_C (),
-                      ly_scm2string (gh_cdr (name)).ch_C (),
+                      ly_scm2string (ly_cdr (name)).ch_C (),
                       ly_symbol2string (elt_prop_sym).ch_C (),
                       ly_scm2string (ly_write2scm (val)).ch_C ()));
        }
index d4891d97ac69d438a71769968f306066fc3057d3..a134dad1ee0444c91c23269986872fb6d5cf6a2f 100644 (file)
@@ -75,14 +75,14 @@ Repeat_acknowledge_engraver::process_music ()
   bool volta_found = false;
   while (gh_pair_p (cs))
     {
-      SCM command = gh_car (cs);
+      SCM command = ly_car (cs);
       if (command == ly_symbol2scm ("start-repeat"))
        start = true;
       else if (command == ly_symbol2scm ("end-repeat"))
        end = true;
-      else if (gh_pair_p (command) && gh_car (command) == ly_symbol2scm ("volta"))
+      else if (gh_pair_p (command) && ly_car (command) == ly_symbol2scm ("volta"))
        volta_found = true;
-      cs = gh_cdr (cs);      
+      cs = ly_cdr (cs);      
     }
 
   if (start && end)
index 3935cc3a1d4dc89cbfdb884467d018d8ffc108ab..13471ed2562cf736330836735f8484d7749363af 100644 (file)
@@ -40,8 +40,8 @@ Repeated_music::to_relative_octave (Pitch p)
 
   Pitch last = p ; 
   if (alternatives ())
-    for (SCM s = alternatives ()->music_list (); gh_pair_p (s);  s = gh_cdr (s))
-      unsmob_music (gh_car (s))->to_relative_octave (p);
+    for (SCM s = alternatives ()->music_list (); gh_pair_p (s);  s = ly_cdr (s))
+      unsmob_music (ly_car (s))->to_relative_octave (p);
      
 
   return last;
@@ -82,10 +82,10 @@ Repeated_music::alternatives_length_mom (bool fold) const
   SCM p = alternatives ()->music_list ();
   while (gh_pair_p (p) && done < repeat_count ())
     {
-      m = m + unsmob_music (gh_car (p))->length_mom ();
+      m = m + unsmob_music (ly_car (p))->length_mom ();
       done ++;
       if (repeat_count () - done < alternatives ()->length_i ())
-       p = gh_cdr (p);
+       p = ly_cdr (p);
     }
   return m;
 }
@@ -104,8 +104,8 @@ Repeated_music::alternatives_volta_length_mom () const
   SCM p = alternatives ()->music_list ();
   while (gh_pair_p (p))
     {
-      m = m + unsmob_music (gh_car (p))->length_mom ();
-      p = gh_cdr (p);
+      m = m + unsmob_music (ly_car (p))->length_mom ();
+      p = ly_cdr (p);
     }
   return m;
 }
index 9cee9ae4f40b38fb28145a2c5d45ba5521493063..e9a103808950a3951d14ed0c17ad54115c71e99d 100644 (file)
@@ -53,9 +53,9 @@ Request_chord_iterator::get_music (Moment) const
     {
       Music_sequence * ms = dynamic_cast<Music_sequence*> (music_l ());
      
-      for (SCM m = ms->music_list (); gh_pair_p (m); m = gh_cdr (m))
+      for (SCM m = ms->music_list (); gh_pair_p (m); m = ly_cdr (m))
        {
-         s = gh_cons (gh_car (m) , s);
+         s = gh_cons (ly_car (m) , s);
        }
     }
   return s;
@@ -67,9 +67,9 @@ Request_chord_iterator::process (Moment m)
   if (last_processed_mom_ < Moment (0))
     {
       for (SCM s = dynamic_cast<Music_sequence *> (music_l ())->music_list ();
-          gh_pair_p (s);  s = gh_cdr (s))
+          gh_pair_p (s);  s = ly_cdr (s))
        {
-         Music *mus = unsmob_music (gh_car (s));
+         Music *mus = unsmob_music (ly_car (s));
 
          bool gotcha = try_music (mus);
          if (!gotcha)
index 084042f021be6d18078bdf8c35162cab3ba81127..50835d2946374b66a2cdfd18bbcaa79a7d335dae 100644 (file)
@@ -21,9 +21,9 @@ Request_chord::Request_chord ()
 Pitch
 Request_chord::to_relative_octave (Pitch last)
 {
-  for (SCM s = music_list (); gh_pair_p (s);  s = gh_cdr (s))
+  for (SCM s = music_list (); gh_pair_p (s);  s = ly_cdr (s))
     {
-      Music * mus = unsmob_music (gh_car (s));
+      Music * mus = unsmob_music (ly_car (s));
       if (Melodic_req *m= dynamic_cast <Melodic_req *> (mus))
        {
          Pitch pit = *unsmob_pitch (m->get_mus_property ("pitch"));
index 591d90b3868998dc9cd58be9e715bd74139f5ec7..e81cef84953cfd6474c1c564b72aa7e314b590ef 100644 (file)
@@ -90,10 +90,10 @@ Rest_collision::do_shift (Grob *me, SCM elts)
   Link_array<Grob> rests;
   Link_array<Grob> notes;
   Grob * commony = 0;
-  for (SCM s = elts; gh_pair_p (s); s = gh_cdr (s))
+  for (SCM s = elts; gh_pair_p (s); s = ly_cdr (s))
     {
       
-      Grob * e = unsmob_grob (gh_car (s));
+      Grob * e = unsmob_grob (ly_car (s));
       if (!e)
        continue;
       
index 7077965c8f46c59a75c2232e63225c093cba3cb5..cf3bb64db01d467cf31b1503600116905de90bdf 100644 (file)
@@ -17,8 +17,8 @@ Scaled_font_metric::Scaled_font_metric (Font_metric* m, Real magn)
   magnification_f_ = magn;
   SCM desc = m->description_;
 
-  Real total_mag = magn * gh_scm2double (gh_cdr (desc));
-  description_ = gh_cons (gh_car (desc), gh_double2scm (total_mag));
+  Real total_mag = magn * gh_scm2double (ly_cdr (desc));
+  description_ = gh_cons (ly_car (desc), gh_double2scm (total_mag));
   orig_l_ = m;
 }
 
index 9ab1dbe428c1eb3359063c1d22951d4f4de76afb..0b6680ae95137a3df914a9af7b157acfb953279a 100644 (file)
@@ -51,7 +51,7 @@ Score::Score (Score const &s)
   /*
     TODO: this is not very elegant.... 
    */
-  store_locations_global_b = (gh_eval_str ("point-and-click") !=  SCM_BOOL_F);
+  store_locations_global_b = (scm_c_eval_string ("point-and-click") !=  SCM_BOOL_F);
 
   Music * m =unsmob_music (s.music_);
   music_ =  m?m->clone ()->self_scm () : SCM_EOL;
index 17aec42ba026c0a13f44c1a353ca8da22e4aaf05..ef0c8266affba90d9a85b1ddce98f0c7691ab317 100644 (file)
@@ -69,21 +69,21 @@ Script_engraver::process_music ()
        }
       // todo -> use result of articulation-to-scriptdef directly as basic prop list.
       Grob *p =new Item (get_property ("Script"));
-      art = gh_cdr (art);
-      p->set_grob_property ("molecule", gh_car (art));
+      art = ly_cdr (art);
+      p->set_grob_property ("molecule", ly_car (art));
 
-      art = gh_cdr (art);
-      bool follow_staff = gh_scm2bool (gh_car (art));
-      art = gh_cdr (art);
-      SCM relative_stem_dir = gh_car (art);
-      art = gh_cdr (art);
+      art = ly_cdr (art);
+      bool follow_staff = gh_scm2bool (ly_car (art));
+      art = ly_cdr (art);
+      SCM relative_stem_dir = ly_car (art);
+      art = ly_cdr (art);
 
       SCM force_dir = l->get_mus_property ("direction");
       if (isdir_b (force_dir) && !to_dir (force_dir))
-       force_dir = gh_car (art);
+       force_dir = ly_car (art);
       
-      art = gh_cdr (art);
-      SCM priority = gh_car (art);
+      art = ly_cdr (art);
+      SCM priority = ly_car (art);
 
       if (isdir_b (force_dir) && to_dir (force_dir))
        p->set_grob_property ("direction", force_dir);
index 2a43afc1340f8a26b171985080eb492529c63327..1579f0b97a35843f6fee3cbbcb0174f7865f7ded 100644 (file)
@@ -22,15 +22,15 @@ Script::get_molecule (Grob * me, Direction d)
   SCM s = me->get_grob_property ("molecule");
   assert (gh_pair_p (s));
 
-  SCM key = gh_car (s);
+  SCM key = ly_car (s);
   if (key == ly_symbol2scm ("feta"))
     {
       return Font_interface::get_default_font (me)->find_by_name ("scripts-" +
-                                   ly_scm2string (index_cell (gh_cdr (s), d)));
+                                   ly_scm2string (index_cell (ly_cdr (s), d)));
     }
   else if (key == ly_symbol2scm ("accordion"))
     {
-      return Lookup::accordion (gh_cdr (s), 1.0, Font_interface::get_default_font (me));
+      return Lookup::accordion (ly_cdr (s), 1.0, Font_interface::get_default_font (me));
     }
   else
     assert (false);
index 9a1c85d51b07622c68c0ac75dc02d127809282dd..89bceab5d4c0dce07302e9112541da72d7eb741e 100644 (file)
@@ -25,9 +25,9 @@ Separating_group_spanner::find_rods (Item * r, SCM next)
     This is an inner loop, however, in most cases, the interesting L
     will just be the first entry of NEXT, making it linear in most of
     the cases.  */
-  for(; gh_pair_p (next); next = gh_cdr (next))
+  for(; gh_pair_p (next); next = ly_cdr (next))
     {
-      Item *l = dynamic_cast<Item*> (unsmob_grob (gh_car( next)));
+      Item *l = dynamic_cast<Item*> (unsmob_grob (ly_car( next)));
       Item *lb = l->find_prebroken_piece (RIGHT);
 
       if (lb)
@@ -77,12 +77,12 @@ Separating_group_spanner::set_spacing_rods (SCM smob)
 {
   Grob*me = unsmob_grob (smob);
   
-  for (SCM s = me->get_grob_property ("elements"); gh_pair_p (s) && gh_pair_p (gh_cdr (s)); s = gh_cdr (s))
+  for (SCM s = me->get_grob_property ("elements"); gh_pair_p (s) && gh_pair_p (ly_cdr (s)); s = ly_cdr (s))
     {
       /*
        Order of elements is reversed!
        */
-      SCM elt = gh_car (s);
+      SCM elt = ly_car (s);
       Item *r = dynamic_cast<Item*> (unsmob_grob (elt));
 
       if (!r)
@@ -91,9 +91,9 @@ Separating_group_spanner::set_spacing_rods (SCM smob)
       Item *rb
        = dynamic_cast<Item*> (r->find_prebroken_piece (LEFT));
       
-      find_rods (r, gh_cdr (s));
+      find_rods (r, ly_cdr (s));
       if (rb)
-       find_rods (rb, gh_cdr (s));
+       find_rods (rb, ly_cdr (s));
     }
 
   find_musical_sequences (me);
@@ -104,9 +104,9 @@ Separating_group_spanner::set_spacing_rods (SCM smob)
   /*
     We've done our job, so we get lost. 
    */
-  for (SCM s = me->get_grob_property ("elements"); gh_pair_p (s); s = gh_cdr (s))
+  for (SCM s = me->get_grob_property ("elements"); gh_pair_p (s); s = ly_cdr (s))
     {
-      Item * it =dynamic_cast<Item*> (unsmob_grob (gh_car (s)));
+      Item * it =dynamic_cast<Item*> (unsmob_grob (ly_car (s)));
       if (it && it->broken_b ())
        {
          it->find_prebroken_piece (LEFT) ->suicide ();
@@ -133,9 +133,9 @@ 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))
+       gh_pair_p (s); s = ly_cdr (s))
     {
-      Item *it = dynamic_cast<Item*> (unsmob_grob (gh_car (s)));
+      Item *it = dynamic_cast<Item*> (unsmob_grob (ly_car (s)));
       if (last)
        {       
          Item *lcol = last->column_l ();
@@ -178,12 +178,12 @@ Separating_group_spanner::find_musical_sequences (Grob *me)
                    }
 
                  Item * left
-                   = dynamic_cast<Item*> (unsmob_grob (gh_car (between)));
+                   = dynamic_cast<Item*> (unsmob_grob (ly_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)));
+                   = dynamic_cast<Item*> (unsmob_grob (ly_cdr (between)));
                  if (Paper_column::rank_i (right->column_l ()) > llrank )
                    gh_set_cdr_x (between, llcol->self_scm ());
                }
index 522cde9ac162a6a3324610c2aaac920a86350d8b..2c48a347713fd15751621bbc29e1c8dc25035ae9 100644 (file)
@@ -34,9 +34,9 @@ Separation_item::my_width (Grob *me)
   Paper_column * pc = item->column_l ();
   Interval w;
   
-  for (SCM s =  me->get_grob_property ("elements"); gh_pair_p (s); s = gh_cdr (s))
+  for (SCM s =  me->get_grob_property ("elements"); gh_pair_p (s); s = ly_cdr (s))
     {
-      SCM elt = gh_car (s);
+      SCM elt = ly_car (s);
       if (!unsmob_grob (elt))
        continue;
 
index f37320caf078f2bb08157ec126e80100ecaef471..e77983a529269371479cdb9cce3e8c4ba270d1c1 100644 (file)
@@ -39,7 +39,7 @@
 
 
   if (gh_pair_p (cursor_))
-    iter_p_->music_l_ == unsmob_music (gh_car (cursor_))
+    iter_p_->music_l_ == unsmob_music (ly_car (cursor_))
   else
     iter_p_ == 0;
 
@@ -94,9 +94,9 @@ get_grace_fixups (SCM cursor)
   Grace_fixup *head = 0;
   Grace_fixup **tail = &head;
 
-  for (; gh_pair_p (cursor); cursor = gh_cdr (cursor))
+  for (; gh_pair_p (cursor); cursor = ly_cdr (cursor))
     {
-      Music * mus = unsmob_music (gh_car (cursor));
+      Music * mus = unsmob_music (ly_car (cursor));
       Moment s = mus->start_mom ();
       Moment l =mus->length_mom () - s;
 
@@ -130,7 +130,7 @@ Sequential_music_iterator::construct_children ()
 {
   cursor_ = dynamic_cast<Music_sequence const*> (music_l ())->music_list ();
 
-  iter_p_ = gh_pair_p (cursor_) ?  get_iterator_p (unsmob_music (gh_car (cursor_))) : 0;
+  iter_p_ = gh_pair_p (cursor_) ?  get_iterator_p (unsmob_music (ly_car (cursor_))) : 0;
   while (iter_p_ && !iter_p_->ok ())
     {
       next_element ();
@@ -184,10 +184,10 @@ Sequential_music_iterator::next_element ()
     }
   
   delete iter_p_;
-  cursor_ = gh_cdr (cursor_);
+  cursor_ = ly_cdr (cursor_);
 
   if (gh_pair_p (cursor_))
-    iter_p_ = get_iterator_p (unsmob_music (gh_car (cursor_)));
+    iter_p_ = get_iterator_p (unsmob_music (ly_car (cursor_)));
   else
     iter_p_ = 0;
 }
@@ -244,9 +244,9 @@ Sequential_music_iterator::get_music (Moment until)const
       s = gh_append2 (nm, s);
       
       Moment m = 0;
-      for (SCM i = nm; gh_pair_p (i); i = gh_cdr (i))
+      for (SCM i = nm; gh_pair_p (i); i = ly_cdr (i))
        {
-         Music *mus=unsmob_music (gh_car (i));
+         Music *mus=unsmob_music (ly_car (i));
          m = m >? (mus->length_mom () - mus->start_mom ());
        }
       if (m > Moment (0))
index 2bef230ec64880f6e5fcab7426807ed1f1a32c4f..00cf117a5ff1788887957e824c9dbf8eeea34188 100644 (file)
@@ -80,17 +80,17 @@ Side_position_interface::general_side_position (Grob * me, Axis a, bool use_exte
   */
   SCM support = me->get_grob_property ("side-support-elements");
     // me->remove_grob_property ("side-support-elements");
-  for (SCM s = support; s != SCM_EOL; s = gh_cdr (s))
+  for (SCM s = support; s != SCM_EOL; s = ly_cdr (s))
     {
-      Grob * e  = unsmob_grob (gh_car (s));
+      Grob * e  = unsmob_grob (ly_car (s));
       if (e)
        common = common->common_refpoint (e, a);
     }
   
   Interval dim;
-  for (SCM s = support; s != SCM_EOL; s = gh_cdr (s))
+  for (SCM s = support; s != SCM_EOL; s = ly_cdr (s))
     {
-      Grob * e  = unsmob_grob (gh_car (s));
+      Grob * e  = unsmob_grob (ly_car (s));
       if (e)
        if (use_extents)
          dim.unite (e->extent (common, a));
index 6671a6edb675d7bbcd19ac6d1fe7ee242d76b779..9a28be14cab856a77e1bc743723301cad2315ed4 100644 (file)
@@ -180,7 +180,7 @@ Simple_spacer::add_columns (Link_array<Grob> cols)
       SCM spring_params = SCM_EOL;
       for (SCM s = cols[i]->get_grob_property ("ideal-distances");
           !gh_pair_p (spring_params) && gh_pair_p (s);
-          s = gh_cdr (s))
+          s = ly_cdr (s))
        {
          Grob *other = unsmob_grob (gh_caar (s));
          if (other != cols[i+1])
@@ -192,8 +192,8 @@ Simple_spacer::add_columns (Link_array<Grob> cols)
       Spring_description desc;
       if (gh_pair_p (spring_params))
        {
-         desc.ideal_f_ = gh_scm2double (gh_car (spring_params));
-         desc.hooke_f_ = gh_scm2double (gh_cdr (spring_params));
+         desc.ideal_f_ = gh_scm2double (ly_car (spring_params));
+         desc.hooke_f_ = gh_scm2double (ly_cdr (spring_params));
        }
       else
        {
@@ -221,7 +221,7 @@ Simple_spacer::add_columns (Link_array<Grob> cols)
   for (int i=0; i < cols.size () - 1; i++)
     {
       for (SCM s = Spaceable_grob::get_minimum_distances (cols[i]);
-          gh_pair_p (s); s = gh_cdr (s))
+          gh_pair_p (s); s = ly_cdr (s))
        {
          Grob * other = unsmob_grob (gh_caar (s));
          int oi = cols.find_i (other);
index d72c81cea183196fa4275896625b2078833e3f40..390849e2263cae3fcfe742b080a037cdb9b6d7bb 100644 (file)
@@ -52,9 +52,9 @@ Simultaneous_music_iterator::construct_children ()
   Music_sequence const *sim = dynamic_cast<Music_sequence const*> (music_l ());
 
   SCM i = sim->music_list ();
-  for (; gh_pair_p (i); i = gh_cdr (i), j++)
+  for (; gh_pair_p (i); i = ly_cdr (i), j++)
     {
-      Music *mus = unsmob_music (gh_car (i));
+      Music *mus = unsmob_music (ly_car (i));
       Music_iterator * mi = static_get_iterator_p (mus);
 
       /* if separate_contexts_b_ is set, create a new context with the
index b5f0db22d72365f7de7e5097256d545380da68e0..8c1babb399cf1f9ac0419e6825bc9e78f8cba104 100644 (file)
@@ -154,11 +154,11 @@ Slur_bezier_bow::minimise_enclosed_area (Real beauty,
   if (fit_factor () > 1.0)
     blow_fit ();
   
-  Real pct_c0 = gh_scm2double (gh_cdr (scm_assoc (ly_symbol2scm ("bezier-pct-c0"), bezier_props)));
-  Real pct_c3 = gh_scm2double (gh_cdr (scm_assoc (ly_symbol2scm ("bezier-pct-c3"), bezier_props)));
-  Real pct_in_max =  gh_scm2double (gh_cdr (scm_assoc (ly_symbol2scm ("bezier-pct-in-max"), bezier_props)));
-  Real pct_out_max = gh_scm2double (gh_cdr (scm_assoc (ly_symbol2scm ("bezier-pct-out-max"), bezier_props)));
-  Real steps =  gh_scm2double (gh_cdr (scm_assoc (ly_symbol2scm ("bezier-area-steps"),bezier_props)));
+  Real pct_c0 = gh_scm2double (ly_cdr (scm_assoc (ly_symbol2scm ("bezier-pct-c0"), bezier_props)));
+  Real pct_c3 = gh_scm2double (ly_cdr (scm_assoc (ly_symbol2scm ("bezier-pct-c3"), bezier_props)));
+  Real pct_in_max =  gh_scm2double (ly_cdr (scm_assoc (ly_symbol2scm ("bezier-pct-in-max"), bezier_props)));
+  Real pct_out_max = gh_scm2double (ly_cdr (scm_assoc (ly_symbol2scm ("bezier-pct-out-max"), bezier_props)));
+  Real steps =  gh_scm2double (ly_cdr (scm_assoc (ly_symbol2scm ("bezier-area-steps"),bezier_props)));
 
   for (int i=0; i < steps; i++)
     {
index d48c91d7b64b8cc4f1a54eaa044548e1e88b28d6..f2035877bd5215d2db489a079ea11bcefd4d8d86 100644 (file)
@@ -69,7 +69,7 @@ Slur::de_uglyfy (Grob*me, Slur_bezier_bow* bb, Real default_height)
       Real f = default_height / length;
       SCM up = me->get_grob_property ("de-uglify-parameters");
       
-      Real c1 = gh_scm2double (gh_car (up));
+      Real c1 = gh_scm2double (ly_car (up));
       Real c2 = gh_scm2double (gh_cadr (up));
       Real c3 = gh_scm2double (gh_caddr (up)); 
       
@@ -178,7 +178,7 @@ Slur::set_extremities (Grob *me)
       if (!gh_symbol_p (index_cell (me->get_grob_property ("attachment"), dir)))
        {
          for (SCM s = me->get_grob_property ("extremity-rules");
-              s != SCM_EOL; s = gh_cdr (s))
+              s != SCM_EOL; s = ly_cdr (s))
            {
              SCM r = gh_call2 (gh_caar (s), me->self_scm (),
                                 gh_int2scm ((int)dir));
@@ -201,10 +201,10 @@ Real
 Slur::get_first_notecolumn_y (Grob *me, Direction dir)
 {
   Grob *col = dir == LEFT
-    ? unsmob_grob (gh_car (scm_reverse (me->get_grob_property
+    ? unsmob_grob (ly_car (scm_reverse (me->get_grob_property
  ("note-columns"))))
     : unsmob_grob
- (gh_car (me->get_grob_property ("note-columns")));
+ (ly_car (me->get_grob_property ("note-columns")));
   
   Grob *common[] =
   {
@@ -267,7 +267,7 @@ Slur::get_attachment (Grob *me, Direction dir,
       set_extremities (me);
       s = me->get_grob_property ("attachment");
     }
-  SCM a = dir == LEFT ? gh_car (s) : gh_cdr (s);
+  SCM a = dir == LEFT ? ly_car (s) : ly_cdr (s);
   Spanner*sp = dynamic_cast<Spanner*> (me);
   String str = ly_symbol2string (a);
   Real staff_space = Staff_symbol_referencer::staff_space ((Grob*)me);
@@ -327,7 +327,7 @@ Slur::get_attachment (Grob *me, Direction dir,
     Hmm, maybe after-line-breaking should set this to loose-end?  */
   else // if (str == "loose-end")
     {
-      SCM other_a = dir == LEFT ? gh_cdr (s) : gh_car (s);
+      SCM other_a = dir == LEFT ? ly_cdr (s) : ly_car (s);
       if (ly_symbol2string (other_a) != "loose-end")
        o = broken_trend_offset (me, dir);
     }
@@ -343,7 +343,7 @@ Slur::get_attachment (Grob *me, Direction dir,
 
   if (l != SCM_BOOL_F)
     {
-      Offset off = ly_scm2offset (gh_cdr (l)) * staff_space;
+      Offset off = ly_scm2offset (ly_cdr (l)) * staff_space;
       off[X_AXIS] *= dir;
       off[Y_AXIS] *= Directional_element_interface::get (me);
       o += off;
@@ -431,8 +431,8 @@ Slur::get_encompass_offset_arr (Grob *me)
   Link_array<Grob>  encompass_arr;
   while (gh_pair_p (eltlist))
     {
-      encompass_arr.push (unsmob_grob (gh_car (eltlist)));      
-      eltlist =gh_cdr (eltlist);
+      encompass_arr.push (unsmob_grob (ly_car (eltlist)));      
+      eltlist =ly_cdr (eltlist);
     }
   encompass_arr.reverse ();
 
@@ -545,8 +545,8 @@ Slur::set_control_points (Grob*me)
   SCM h_inf_scm = scm_assq (ly_symbol2scm ("height-limit"), details);
   SCM r_0_scm = scm_assq (ly_symbol2scm ("ratio"), details);
 
-  Real r_0 = gh_scm2double (gh_cdr (r_0_scm));
-  Real h_inf = staff_space * gh_scm2double (gh_cdr (h_inf_scm));
+  Real r_0 = gh_scm2double (ly_cdr (r_0_scm));
+  Real h_inf = staff_space * gh_scm2double (ly_cdr (h_inf_scm));
   
   Slur_bezier_bow bb (get_encompass_offset_arr (me),
                      Directional_element_interface::get (me),
@@ -565,8 +565,8 @@ Slur::set_control_points (Grob*me)
       bb.minimise_enclosed_area (sb, details);
       SCM sbf = scm_assq (ly_symbol2scm ("force-blowfit"), details);
       Real bff = 1.0;
-      if (gh_pair_p (sbf) && gh_number_p (gh_cdr (sbf)))
-         bff = gh_scm2double (gh_cdr (sbf));
+      if (gh_pair_p (sbf) && gh_number_p (ly_cdr (sbf)))
+         bff = gh_scm2double (ly_cdr (sbf));
 
       bb.curve_.control_[1][Y_AXIS] *= bff;
       bb.curve_.control_[2][Y_AXIS] *= bff;
@@ -622,9 +622,9 @@ Slur::get_curve (Grob*me)
   if (!scm_ilength (me->get_grob_property ("note-columns")))
     return b;
 
-  for (SCM s= me->get_grob_property ("control-points"); s != SCM_EOL; s = gh_cdr (s))
+  for (SCM s= me->get_grob_property ("control-points"); s != SCM_EOL; s = ly_cdr (s))
     {
-      b.control_[i] = ly_scm2offset (gh_car (s));
+      b.control_[i] = ly_scm2offset (ly_car (s));
       i++;
     }
 
index 26bf4e8066b9165b7c54c81f05605dd298bd0141..ec1e0430c008b26310594bacde440277dc59463d 100644 (file)
@@ -24,12 +24,12 @@ Spaceable_grob::add_rod (Grob *me , Grob * p, Real d)
 {
   SCM mins = get_minimum_distances (me);
   SCM newdist = gh_double2scm (d);
-  for (SCM s = mins; gh_pair_p (s); s = gh_cdr (s))
+  for (SCM s = mins; gh_pair_p (s); s = ly_cdr (s))
     {
-      SCM dist = gh_car (s);
-      if (gh_car (dist) == p->self_scm ())
+      SCM dist = ly_car (s);
+      if (ly_car (dist) == p->self_scm ())
        {
-         gh_set_cdr_x (dist, scm_max (gh_cdr (dist),
+         gh_set_cdr_x (dist, scm_max (ly_cdr (dist),
                                       newdist));
          return ;
        }
@@ -46,10 +46,10 @@ Spaceable_grob::add_spring (Grob*me, Grob * p, Real d, Real strength)
   
   
   SCM newdist= gh_double2scm (d);
-  for (SCM s = mins; gh_pair_p (s); s = gh_cdr (s))
+  for (SCM s = mins; gh_pair_p (s); s = ly_cdr (s))
     {
-      SCM dist = gh_car (s);
-      if (gh_car (dist) == p->self_scm ())
+      SCM dist = ly_car (s);
+      if (ly_car (dist) == p->self_scm ())
        {
          programming_error ("already have that spring");
          return ;
index 472fa6732bd82528b5ec2584caaeab60fe99c6b2..6a0a62806e6e3f06be69755586e51c7826fe392c 100644 (file)
@@ -181,7 +181,7 @@ Spacing_spanner::do_measure (Grob*me, Link_array<Grob> const & cols)
          Real left_distance = 0;
          if (gh_pair_p (hint))
            {
-             left_distance = gh_scm2double (gh_cdr (hint)); 
+             left_distance = gh_scm2double (ly_cdr (hint)); 
            }
           // 2nd condition should be (i+1 < col_count ()), ie. not the last column in score.  FIXME
          else if (!Paper_column::musical_b (lc) && i+1 < cols.size ()) 
@@ -218,7 +218,7 @@ Spacing_spanner::do_measure (Grob*me, Link_array<Grob> const & cols)
          Real right_dist = 0.0;
          if (gh_pair_p (next_hint))
            {
-             right_dist += - gh_scm2double (gh_car (next_hint));
+             right_dist += - gh_scm2double (ly_car (next_hint));
            }
          else
            {
@@ -247,7 +247,7 @@ Spacing_spanner::do_measure (Grob*me, Link_array<Grob> const & cols)
          
          if (gh_pair_p (next_stretch_hint))
            // see regtest spacing-tight
-           stretch_dist += - gh_scm2double (gh_car (next_stretch_hint));
+           stretch_dist += - gh_scm2double (ly_car (next_stretch_hint));
          else
            stretch_dist += right_dist;
 
@@ -524,8 +524,8 @@ Spacing_spanner::stem_dir_correction (Grob*me, Grob*l, Grob*r)
   if (scm_ilength (dl) != 1 || scm_ilength (dr) != 1)
     return 0.;
 
-  dl = gh_car (dl);
-  dr = gh_car (dr);
+  dl = ly_car (dl);
+  dr = ly_car (dr);
 
   assert (gh_number_p (dl) && gh_number_p (dr));
   int d1 = gh_scm2int (dl);
index 674debdd16200d69f1b3cdc8fd5846a8aa8d7b8b..75e3779ab1e196031c027a5d1a60c4b39edb1916 100644 (file)
@@ -82,11 +82,11 @@ Span_arpeggio_engraver::stop_translation_timestep ()
       for (int i=0; i < arpeggios_.size (); i ++)
        {
          for (SCM s = arpeggios_[i]->get_grob_property ("stems");
-              gh_pair_p (s); s = gh_cdr (s))
-           Group_interface::add_thing (span_arpeggio_, "stems", gh_car (s));
+              gh_pair_p (s); s = ly_cdr (s))
+           Group_interface::add_thing (span_arpeggio_, "stems", ly_car (s));
          for (SCM s = arpeggios_[i]->get_grob_property ("side-support-elements");
-              gh_pair_p (s); s = gh_cdr (s))
-           Group_interface::add_thing (span_arpeggio_, "side-support-elements", gh_car (s));
+              gh_pair_p (s); s = ly_cdr (s))
+           Group_interface::add_thing (span_arpeggio_, "side-support-elements", ly_car (s));
 
          /*
            we can't kill the children, since we don't want to the
index 61e1f097eace5faa59a43d9c574a17c12c7a8ad9..01020ca6260b85a50e372435e89270abc1bb80ca 100644 (file)
@@ -55,9 +55,9 @@ Span_bar::brew_molecule (SCM smobbed_me)
 
   // compute common refpoint of elements
   Grob *refp = me;
-  for (SCM elts = first_elt; gh_pair_p (elts); elts = gh_cdr (elts))
+  for (SCM elts = first_elt; gh_pair_p (elts); elts = ly_cdr (elts))
     {
-      SCM smobbed_staff_bar = gh_car (elts);
+      SCM smobbed_staff_bar = ly_car (elts);
       Grob *staff_bar = unsmob_grob (smobbed_staff_bar);
       refp = staff_bar->common_refpoint (refp, Y_AXIS);
     }
@@ -78,9 +78,9 @@ Span_bar::brew_molecule (SCM smobbed_me)
   Molecule span_bar_mol;
 
   Interval prev_extent;
-  for (SCM elts = first_elt; gh_pair_p (elts); elts = gh_cdr (elts))
+  for (SCM elts = first_elt; gh_pair_p (elts); elts = ly_cdr (elts))
     {
-      SCM smobbed_staff_bar = gh_car (elts);
+      SCM smobbed_staff_bar = ly_car (elts);
       Grob *staff_bar = unsmob_grob (smobbed_staff_bar);
       Interval ext = staff_bar->extent (refp, Y_AXIS);
       if (ext.empty_b ())
@@ -177,7 +177,7 @@ void
 Span_bar::evaluate_glyph (Grob*me)
 {
   SCM elts = me->get_grob_property ("elements");
-  Grob * b = unsmob_grob (gh_car (elts));
+  Grob * b = unsmob_grob (ly_car (elts));
   SCM glsym =ly_symbol2scm ("glyph");
   SCM gl =b ->get_grob_property (glsym);
   if (!gh_string_p (gl))
index 32ae0ed5c11acb46098603450ccbeb40f34baa2a..6f5504a556c8c729c33850678a97d180b47ab90a 100644 (file)
@@ -320,8 +320,8 @@ extend_spanner_over_item (Item *it, SCM extremal_pair)
   if (!it)
     return;
   Item * col = it->column_l ();
-  Item * i1 = dynamic_cast<Item*> (unsmob_grob (gh_car (extremal_pair)));
-  Item * i2 = dynamic_cast<Item*> (unsmob_grob (gh_cdr (extremal_pair)));
+  Item * i1 = dynamic_cast<Item*> (unsmob_grob (ly_car (extremal_pair)));
+  Item * i2 = dynamic_cast<Item*> (unsmob_grob (ly_cdr (extremal_pair)));
   int r = Paper_column::rank_i (col);
   if (!i1 || r < Paper_column::rank_i (i1->column_l ()))
     {
@@ -341,8 +341,8 @@ extend_spanner_over_elements (SCM value, SCM extremal_pair)
 {
   if (gh_pair_p (value))
     {
-      extend_spanner_over_elements (gh_car (value), extremal_pair);
-      extend_spanner_over_elements (gh_cdr (value), extremal_pair);
+      extend_spanner_over_elements (ly_car (value), extremal_pair);
+      extend_spanner_over_elements (ly_cdr (value), extremal_pair);
     }
   else if (unsmob_grob (value))
     {
@@ -375,8 +375,8 @@ extend_spanner_over_elements (Grob*s)
   SCM pair = gh_cons (s1,s2);
   extend_spanner_over_elements (sp->mutable_property_alist_, pair);
 
-  Grob *p1 =  unsmob_grob (gh_car (pair));
-  Grob* p2 = unsmob_grob (gh_cdr (pair));
+  Grob *p1 =  unsmob_grob (ly_car (pair));
+  Grob* p2 = unsmob_grob (ly_cdr (pair));
   sp->set_bound (LEFT,p1);
   sp->set_bound (RIGHT, p2);
 }
index 140e6876b6db803e77b1c2cadf8abb9a58a70377..d55e8d0738b7e9ef83c738cf6909bf098e61c546 100644 (file)
@@ -140,7 +140,7 @@ Stem::support_head (Grob*me)
        UGH.
        */
       
-      return unsmob_grob (gh_car (me->get_grob_property ("heads")));
+      return unsmob_grob (ly_car (me->get_grob_property ("heads")));
     }
   else
     return first_head (me);
@@ -176,9 +176,9 @@ Stem::extremal_heads (Grob*me)
   Drul_array<Grob *> exthead;
   exthead[LEFT] = exthead[RIGHT] =0;
   
-  for (SCM s = me->get_grob_property ("heads"); gh_pair_p (s); s = gh_cdr (s))
+  for (SCM s = me->get_grob_property ("heads"); gh_pair_p (s); s = ly_cdr (s))
     {
-      Grob * n = unsmob_grob (gh_car (s));
+      Grob * n = unsmob_grob (ly_car (s));
 
       
       int p = int (Staff_symbol_referencer::position_f (n));
@@ -206,9 +206,9 @@ Array<int>
 Stem::note_head_positions (Grob *me)
 {
   Array<int> ps ;
-  for (SCM s = me->get_grob_property ("heads"); gh_pair_p (s); s = gh_cdr (s))
+  for (SCM s = me->get_grob_property ("heads"); gh_pair_p (s); s = ly_cdr (s))
     {
-      Grob * n = unsmob_grob (gh_car (s));
+      Grob * n = unsmob_grob (ly_car (s));
       int p = int (Staff_symbol_referencer::position_f (n));
 
       ps.push (p);
@@ -277,8 +277,8 @@ Stem::get_default_stem_end_position (Grob*me)
   else
     {
       s = me->get_grob_property ("lengths");
-      for (SCM q = s; q != SCM_EOL; q = gh_cdr (q))
-       a.push (gh_scm2double (gh_car (q)));
+      for (SCM q = s; q != SCM_EOL; q = ly_cdr (q))
+       a.push (gh_scm2double (ly_car (q)));
                
       // stem uses half-spaces
       length_f = a[ ((flag_i (me) - 2) >? 0) <? (a.size () - 1)] * 2;
@@ -287,13 +287,13 @@ Stem::get_default_stem_end_position (Grob*me)
 
   a.clear ();
   s = me->get_grob_property ("stem-shorten");
-  for (SCM q = s; gh_pair_p (q); q = gh_cdr (q))
-    a.push (gh_scm2double (gh_car (q)));
+  for (SCM q = s; gh_pair_p (q); q = ly_cdr (q))
+    a.push (gh_scm2double (ly_car (q)));
 
 
   // stem uses half-spaces
 
-  // fixme: use gh_list_ref () iso. array[]
+  // fixme: use scm_listify_ref () iso. array[]
   Real shorten_f = a[ ((flag_i (me) - 2) >? 0) <? (a.size () - 1)] * 2;
 
   /* URGURGURG
@@ -707,16 +707,16 @@ Stem::calc_stem_info (Grob*me)
   
   s = me->get_grob_property ("beamed-minimum-lengths");
   a.clear ();
-  for (SCM q = s; q != SCM_EOL; q = gh_cdr (q))
-    a.push (gh_scm2double (gh_car (q)));
+  for (SCM q = s; q != SCM_EOL; q = ly_cdr (q))
+    a.push (gh_scm2double (ly_car (q)));
 
 
   Real minimum_length = a[multiplicity <? (a.size () - 1)] * staff_space;
   s = me->get_grob_property ("beamed-lengths");
 
   a.clear ();
-  for (SCM q = s; q != SCM_EOL; q = gh_cdr (q))
-    a.push (gh_scm2double (gh_car (q)));
+  for (SCM q = s; q != SCM_EOL; q = ly_cdr (q))
+    a.push (gh_scm2double (ly_car (q)));
 
   Real stem_length =  a[multiplicity <? (a.size () - 1)] * staff_space;
 
index 56bf35e1b407637fc769436ff45388357d9b0cb8..e4b36b5f1220f02122fa25d9ad7059e61ba4a8d9 100644 (file)
@@ -23,7 +23,7 @@ System_start_delimiter::staff_bracket (Grob*me,Real height)
 {
   Real arc_height = gh_scm2double (me->get_grob_property ("arch-height")) ;
   
-  SCM at = gh_list (ly_symbol2scm ("bracket"),
+  SCM at = scm_listify (ly_symbol2scm ("bracket"),
                    me->get_grob_property ("arch-angle"),
                    me->get_grob_property ("arch-width"),
                    gh_double2scm (arc_height),
@@ -143,14 +143,14 @@ System_start_delimiter::staff_brace (Grob*me, Real y)
             name.  This is better than using find_font directly,
             esp. because that triggers mktextfm for non-existent
             fonts. */
-         SCM alist = gh_list (gh_cons (ly_symbol2scm ("font-family"),
+         SCM alist = scm_listify (gh_cons (ly_symbol2scm ("font-family"),
                                        ly_symbol2scm ("braces")),
                               gh_cons (ly_symbol2scm ("font-relative-size"),
                                        gh_int2scm (i)),
                               SCM_UNDEFINED);
-         fm = Font_interface::get_font (me, gh_list (alist, SCM_UNDEFINED));
+         fm = Font_interface::get_font (me, scm_listify (alist, SCM_UNDEFINED));
          /* Hmm, if lookup fails, we get cmr10 anyway */
-         if (ly_scm2string (gh_car (fm->description_)) == "cmr10")
+         if (ly_scm2string (ly_car (fm->description_)) == "cmr10")
            break;
        }
       else
@@ -174,7 +174,7 @@ System_start_delimiter::staff_brace (Grob*me, Real y)
     }
   while (hi - lo > 1);
       
-  SCM at = gh_list (ly_symbol2scm ("char"), gh_int2scm (lo), SCM_UNDEFINED);
+  SCM at = scm_listify (ly_symbol2scm ("char"), gh_int2scm (lo), SCM_UNDEFINED);
   at = fontify_atom (fm, at);
   
   b = fm->get_char (lo);
index 5441963c0ef54485ee735b13a5d67f8319db0bc6..7d4882acfce46270d763004492e2049972b5a8e1 100644 (file)
@@ -41,9 +41,9 @@ Text_item::text2molecule (Grob *me, SCM text, SCM alist_chain)
   else if (gh_pair_p (text))
     {
       /* urg, why not just do  this in markup_text2molecule ? */
-      if (gh_string_p (gh_car (text)))
+      if (gh_string_p (ly_car (text)))
        return markup_text2molecule (me,
-                                    gh_append2 (gh_list (SCM_EOL,
+                                    gh_append2 (scm_listify (SCM_EOL,
                                                         SCM_UNDEFINED),
                                                 text),
                                     alist_chain);
@@ -52,7 +52,7 @@ Text_item::text2molecule (Grob *me, SCM text, SCM alist_chain)
        #'(("foo"))
        */
       else if (scm_ilength (text) <= 1)
-       return text2molecule (me, gh_car (text), alist_chain);
+       return text2molecule (me, ly_car (text), alist_chain);
       else
        return markup_text2molecule (me, text, alist_chain);
     }
@@ -64,15 +64,15 @@ Text_item::string2molecule (Grob *me, SCM text, SCM alist_chain)
 {
   SCM style = ly_assoc_chain (ly_symbol2scm ("font-style"),
                              alist_chain);
-  if (gh_pair_p (style) && gh_symbol_p (gh_cdr (style)))
-    alist_chain = Font_interface::add_style (me, gh_cdr (style), alist_chain);
+  if (gh_pair_p (style) && gh_symbol_p (ly_cdr (style)))
+    alist_chain = Font_interface::add_style (me, ly_cdr (style), alist_chain);
 
   Font_metric *fm = Font_interface::get_font (me, alist_chain);
   
   SCM lookup = ly_assoc_chain (ly_symbol2scm ("lookup"), alist_chain);
     
   Molecule mol;
-  if (gh_pair_p (lookup) && gh_cdr (lookup) ==ly_symbol2scm ("name"))
+  if (gh_pair_p (lookup) && ly_cdr (lookup) ==ly_symbol2scm ("name"))
     mol = lookup_character (me, fm, text);
   else
     mol = lookup_text (me, fm, text);
@@ -116,7 +116,7 @@ Text_item::lookup_text (Grob *me, Font_metric*fm, SCM text)
 #endif
   
 
-  SCM list = gh_list (ly_symbol2scm ("text"), text, SCM_UNDEFINED);
+  SCM list = scm_listify (ly_symbol2scm ("text"), text, SCM_UNDEFINED);
   list = fontify_atom (fm, list);
   
   return Molecule (fm->text_dimension (ly_scm2string (text)), list);
@@ -127,10 +127,10 @@ Text_item::markup_text2molecule (Grob *me, SCM markup_text,
                               SCM alist_chain)
 {
   SCM sheet = me->paper_l ()->style_sheet_;
-  SCM f = gh_cdr (scm_assoc (ly_symbol2scm ("markup-to-properties"), sheet));
+  SCM f = ly_cdr (scm_assoc (ly_symbol2scm ("markup-to-properties"), sheet));
   
-  SCM markup = gh_car (markup_text);
-  SCM text = gh_cdr (markup_text);
+  SCM markup = ly_car (markup_text);
+  SCM text = ly_cdr (markup_text);
 
   SCM p = gh_cons (gh_call2 (f, sheet, markup), alist_chain);
 
@@ -142,29 +142,29 @@ Text_item::markup_text2molecule (Grob *me, SCM markup_text,
   Axis axis = X_AXIS;
 
   SCM a = ly_assoc_chain (ly_symbol2scm ("axis"), p);
-  if (gh_pair_p (a) && isaxis_b (gh_cdr (a)))
-    axis = (Axis)gh_scm2int (gh_cdr (a));
+  if (gh_pair_p (a) && isaxis_b (ly_cdr (a)))
+    axis = (Axis)gh_scm2int (ly_cdr (a));
 
   Real baseline_skip = 0;
   SCM b = ly_assoc_chain (ly_symbol2scm ("baseline-skip"), p);
-  if (gh_pair_p (b) && gh_number_p (gh_cdr (b)))
-    baseline_skip = gh_scm2double (gh_cdr (b)) * staff_space;
+  if (gh_pair_p (b) && gh_number_p (ly_cdr (b)))
+    baseline_skip = gh_scm2double (ly_cdr (b)) * staff_space;
   
   Real kern[2] = {0,0};
 
   SCM k = ly_assoc_chain (ly_symbol2scm ("kern"), p);
-  if (gh_pair_p (k) && gh_number_p (gh_cdr (k)))
-    kern[axis] = gh_scm2double (gh_cdr (k)) * staff_space;
+  if (gh_pair_p (k) && gh_number_p (ly_cdr (k)))
+    kern[axis] = gh_scm2double (ly_cdr (k)) * staff_space;
                             
   Real raise = 0;
   SCM r = ly_assoc_chain (ly_symbol2scm ("raise"), p);
-  if (gh_pair_p (r) && gh_number_p (gh_cdr (r)))
-    raise = gh_scm2double (gh_cdr (r)) * staff_space;
+  if (gh_pair_p (r) && gh_number_p (ly_cdr (r)))
+    raise = gh_scm2double (ly_cdr (r)) * staff_space;
 
   Interval extent;
   bool extent_b = false;
   SCM e = ly_assoc_chain (ly_symbol2scm ("extent"), p);
-  if (gh_pair_p (e) && ly_number_pair_p (gh_cdr (e)))
+  if (gh_pair_p (e) && ly_number_pair_p (ly_cdr (e)))
     {
       extent = Interval (gh_scm2double (gh_cadr (e)) * staff_space,
                       gh_scm2double (gh_cddr (e)) * staff_space);
@@ -177,7 +177,7 @@ Text_item::markup_text2molecule (Grob *me, SCM markup_text,
   while (gh_pair_p (text))
     {
    
-      Molecule m = text2molecule (me, gh_car (text), p);
+      Molecule m = text2molecule (me, ly_car (text), p);
 
       /*
        TODO: look at padding?
@@ -200,17 +200,17 @@ Text_item::markup_text2molecule (Grob *me, SCM markup_text,
       */
        
       SCM next_p = SCM_EOL;
-      if (gh_pair_p (gh_car (text)))
-       next_p = gh_list (gh_call2 (f, sheet, gh_caar (text)), SCM_UNDEFINED);
+      if (gh_pair_p (ly_car (text)))
+       next_p = scm_listify (gh_call2 (f, sheet, gh_caar (text)), SCM_UNDEFINED);
       SCM next_k = ly_assoc_chain (ly_symbol2scm ("kern"), next_p);
       Real next_kern = kern[axis];
-      if (gh_pair_p (next_k) && gh_number_p (gh_cdr (next_k)))
-       next_kern = gh_scm2double (gh_cdr (next_k)) * staff_space;
+      if (gh_pair_p (next_k) && gh_number_p (ly_cdr (next_k)))
+       next_kern = gh_scm2double (ly_cdr (next_k)) * staff_space;
 
       SCM next_r = ly_assoc_chain (ly_symbol2scm ("raise"), next_p);
       Real next_raise = 0;
-      if (gh_pair_p (next_r) && gh_number_p (gh_cdr (next_r)))
-       next_raise = gh_scm2double (gh_cdr (next_r)) * staff_space;
+      if (gh_pair_p (next_r) && gh_number_p (ly_cdr (next_r)))
+       next_raise = gh_scm2double (ly_cdr (next_r)) * staff_space;
 
       o[Y_AXIS] = next_raise;
 
@@ -226,7 +226,7 @@ Text_item::markup_text2molecule (Grob *me, SCM markup_text,
              mol.add_at_edge (axis, axis == X_AXIS ? RIGHT : DOWN, m, next_kern);
            }
        }
-      text = gh_cdr (text);
+      text = ly_cdr (text);
     }
   
   if (extent_b)
@@ -235,7 +235,7 @@ Text_item::markup_text2molecule (Grob *me, SCM markup_text,
       /* Hmm, we're not allowed to change a Molecule's extent? */
       mol.dim_[axis] = extent;
       Molecule::ly_set_molecule_extent_x (mol.self_scm (), gh_int2scm (axis),
-                                         gh_cdr (e));
+                                         ly_cdr (e));
 #else
       // burp: unpredictable names, these...
       Box b = mol.extent_box ();
index 7d7cdd5af1b7c8bc307b99e6a3a25aaf29131ccd..b7b7bfc9c73388e100469e9d49c2523caaad942f 100644 (file)
@@ -110,8 +110,8 @@ Text_spanner::brew_molecule (SCM smob)
   SCM s = me->get_grob_property ("shorten");
   if (gh_pair_p (s))
     {
-      shorten[LEFT] = gh_scm2double (gh_car (s));
-      shorten[RIGHT] = gh_scm2double (gh_cdr (s));
+      shorten[LEFT] = gh_scm2double (ly_car (s));
+      shorten[RIGHT] = gh_scm2double (ly_cdr (s));
     }
 
   width -= shorten[LEFT] + shorten[RIGHT];
index 061650bbffd65a102061c95a8f7ec5023f969d55..592bcd9844888cc2b4d39e2efaf8c6537b2de613 100644 (file)
@@ -164,18 +164,18 @@ Tie_engraver::create_grobs ()
          if (!i)
            return;
          
-         SCM pair = gh_list_ref (head_list, gh_int2scm (i/2));
+         SCM pair = scm_listify_ref (head_list, gh_int2scm (i/2));
          
          Spanner * p = new Spanner (basic);
 
          Tie::set_interface (p);
-         Tie::set_head (p,LEFT, dynamic_cast<Item*> (unsmob_grob (gh_car (pair))));
-         Tie::set_head (p,RIGHT, dynamic_cast<Item*> (unsmob_grob (gh_cdr (pair))));
+         Tie::set_head (p,LEFT, dynamic_cast<Item*> (unsmob_grob (ly_car (pair))));
+         Tie::set_head (p,RIGHT, dynamic_cast<Item*> (unsmob_grob (ly_cdr (pair))));
          
          tie_p_arr_.push (p);
          announce_grob (p, req_l_);
        }
-      else for (SCM s = head_list; gh_pair_p (s); s = gh_cdr (s))
+      else for (SCM s = head_list; gh_pair_p (s); s = ly_cdr (s))
        {
          Grob * p = new Spanner (basic);
          Tie::set_interface (p);
index ae2be9fc11b8d24b5eab461d4f4d401084df96b3..bb011b973d0707439dbee616a8c98de153fce5fb 100644 (file)
@@ -180,8 +180,8 @@ Tie::get_control_points (SCM smob)
   SCM lim // groetjes aan de chirurgendochter.
     = scm_assq (ly_symbol2scm ("height-limit"),details);
   
-  Real h_inf = gh_scm2double (gh_cdr (lim)) *  staff_space;
-  Real r_0 = gh_scm2double (gh_cdr (scm_assq (ly_symbol2scm ("ratio"),details)));
+  Real h_inf = gh_scm2double (ly_cdr (lim)) *  staff_space;
+  Real r_0 = gh_scm2double (ly_cdr (scm_assq (ly_symbol2scm ("ratio"),details)));
 
   Bezier b  = slur_shape (width, h_inf, r_0);
   
@@ -299,9 +299,9 @@ Tie::brew_molecule (SCM smob)
 
   Bezier b;
   int i = 0;
-  for (SCM s= cp; s != SCM_EOL; s = gh_cdr (s))
+  for (SCM s= cp; s != SCM_EOL; s = ly_cdr (s))
     {
-      b.control_[i] = ly_scm2offset (gh_car (s));
+      b.control_[i] = ly_scm2offset (ly_car (s));
       i++;
     }
   
index a8ce824d564cfdb14fc7045d5c63b6dbd8bf40bf..c518f96ed6d0bdabc715f46380b690866628c2ce 100644 (file)
@@ -49,8 +49,8 @@ Time_signature_performer::create_audio_elements ()
   if (gh_pair_p (fr) && !gh_equal_p (fr, prev_fraction_))
     {
       prev_fraction_ = fr;
-      int b = gh_scm2int (gh_car (fr));
-      int o = gh_scm2int (gh_cdr (fr));
+      int b = gh_scm2int (ly_car (fr));
+      int o = gh_scm2int (ly_cdr (fr));
       
       audio_p_ = new Audio_time_signature (b,o);
       Audio_element_info info (audio_p_, 0);
index 8e516e8ccdb49bff1de649e01cbb073f93ed7aa3..2f96d04f7e0012069b73eb7db115de8f916cbe80 100644 (file)
@@ -28,8 +28,8 @@ Time_signature::brew_molecule (SCM smob)
   int d = 4;
   if (gh_pair_p (frac))
     {
-      n = gh_scm2int (gh_car (frac));
-      d = gh_scm2int (gh_cdr (frac));
+      n = gh_scm2int (ly_car (frac));
+      d = gh_scm2int (ly_cdr (frac));
     }
 
   
index aaec32d796b4551eb28ea7ae2744d0bba7138837..47dacdee8d50e49d8b6274b215885c38d1c463b6 100644 (file)
@@ -138,14 +138,14 @@ Translator_def::add_last_element (SCM s)
 void
 Translator_def::add_push_property (SCM props, SCM syms,  SCM vals)
 {
-  this->property_ops_ = gh_cons (gh_list (push_sym, props, syms, vals, SCM_UNDEFINED),
+  this->property_ops_ = gh_cons (scm_listify (push_sym, props, syms, vals, SCM_UNDEFINED),
                                 this->property_ops_);
 }
 
 void
 Translator_def::add_pop_property (SCM props, SCM syms)
 {
-  this->property_ops_ = gh_cons (gh_list (push_sym, props, syms, SCM_UNDEFINED),
+  this->property_ops_ = gh_cons (scm_listify (push_sym, props, syms, SCM_UNDEFINED),
                                 this->property_ops_);
 }
 
@@ -158,8 +158,8 @@ Translator_def::apply_pushpop_property (Translator_group* me,SCM syms, SCM eprop
 {
   if (gh_symbol_p (syms))
     dynamic_cast<Translator_group*> (me)->execute_single_pushpop_property (syms, eprop, val);
-  else for (SCM s = syms; gh_pair_p (s); s = gh_cdr (s))
-    dynamic_cast<Translator_group*> (me)->execute_single_pushpop_property (gh_car (s), eprop, val);
+  else for (SCM s = syms; gh_pair_p (s); s = ly_cdr (s))
+    dynamic_cast<Translator_group*> (me)->execute_single_pushpop_property (ly_car (s), eprop, val);
 }
 
 
@@ -170,9 +170,9 @@ Translator_def::path_to_acceptable_translator (SCM type_str, Music_output_def* o
   assert (gh_string_p (type_str));
   
   Link_array<Translator_def> accepted_arr;
-  for (SCM s = accepts_name_list_; gh_pair_p (s); s = gh_cdr (s))
+  for (SCM s = accepts_name_list_; gh_pair_p (s); s = ly_cdr (s))
     {
-      Translator_def *t = unsmob_translator_def (odef->find_translator_l (gh_car (s)));
+      Translator_def *t = unsmob_translator_def (odef->find_translator_l (ly_car (s)));
       if (!t)
        continue;
       accepted_arr.push (t);
@@ -217,9 +217,9 @@ static SCM
 trans_list (SCM namelist, Translator_group*tg)
 {
   SCM l = SCM_EOL;
-  for (SCM s = namelist; gh_pair_p (s) ; s = gh_cdr (s))
+  for (SCM s = namelist; gh_pair_p (s) ; s = ly_cdr (s))
     {
-      Translator * t = get_translator_l (ly_scm2string (gh_car (s)));
+      Translator * t = get_translator_l (ly_scm2string (ly_car (s)));
       if (!t)
        warning (_f ("can't find: `%s'", s));
       else
@@ -262,22 +262,22 @@ void
 Translator_def::apply_property_operations (Translator_group*tg)
 {
   SCM correct_order = scm_reverse (property_ops_); // pity of the mem.
-  for (SCM s = correct_order; gh_pair_p (s); s = gh_cdr (s))
+  for (SCM s = correct_order; gh_pair_p (s); s = ly_cdr (s))
     {
-      SCM entry = gh_car (s);
-      SCM type = gh_car (entry);
-      entry = gh_cdr (entry); 
+      SCM entry = ly_car (s);
+      SCM type = ly_car (entry);
+      entry = ly_cdr (entry); 
       
       if (type == push_sym)
        {
          SCM val = gh_cddr (entry);
-         val = gh_pair_p (val) ? gh_car (val) : SCM_UNDEFINED;
+         val = gh_pair_p (val) ? ly_car (val) : SCM_UNDEFINED;
 
-         apply_pushpop_property (tg, gh_car (entry), gh_cadr (entry), val);
+         apply_pushpop_property (tg, ly_car (entry), gh_cadr (entry), val);
        }
       else if (type == assign_sym)
        {
-         tg->set_property (gh_car (entry), gh_cadr (entry));
+         tg->set_property (ly_car (entry), gh_cadr (entry));
        }
     }
 }
@@ -299,7 +299,7 @@ Translator_def::make_scm ()
 void
 Translator_def::add_property_assign (SCM nm, SCM val)
 {
-  this->property_ops_ = gh_cons (gh_list (assign_sym, scm_string_to_symbol (nm), val, SCM_UNDEFINED),
+  this->property_ops_ = gh_cons (scm_listify (assign_sym, scm_string_to_symbol (nm), val, SCM_UNDEFINED),
                                 this->property_ops_);
 }
 
@@ -311,7 +311,7 @@ SCM
 Translator_def::default_child_context_name ()
 {
   SCM d = accepts_name_list_;
-  return gh_pair_p (d) ? gh_car (scm_last_pair (d)) : SCM_EOL;
+  return gh_pair_p (d) ? ly_car (scm_last_pair (d)) : SCM_EOL;
 }
 
 SCM
index b91088d5a0989babd468bb83472e1868445121de..763bdc8997fe92dce5ffa04d33f4e7e0acbf9ba6 100644 (file)
@@ -52,9 +52,9 @@ Translator_group::check_removal ()
   SCM next = SCM_EOL; 
   for (SCM p = trans_group_list_; gh_pair_p (p); p = next)
     {
-      next = gh_cdr (p);
+      next = ly_cdr (p);
 
-      Translator_group *trg =  dynamic_cast<Translator_group*> (unsmob_translator (gh_car (p)));
+      Translator_group *trg =  dynamic_cast<Translator_group*> (unsmob_translator (ly_car (p)));
 
       trg->check_removal ();
       if (trg->removable_b ())
@@ -98,9 +98,9 @@ Translator_group::find_existing_translator_l (String n, String id)
     return this;
 
   Translator_group* r = 0;
-  for (SCM p = trans_group_list_; !r && gh_pair_p (p); p = gh_cdr (p))
+  for (SCM p = trans_group_list_; !r && gh_pair_p (p); p = ly_cdr (p))
     {
-      Translator *  t = unsmob_translator (gh_car (p));
+      Translator *  t = unsmob_translator (ly_car (p));
       
       r = dynamic_cast<Translator_group*> (t)->find_existing_translator_l (n, id);
     }
@@ -153,9 +153,9 @@ Translator_group::try_music_on_nongroup_children (Music *m)
 {
   bool hebbes_b =false;
   
-  for (SCM p = simple_trans_list_; !hebbes_b && gh_pair_p (p); p = gh_cdr (p))
+  for (SCM p = simple_trans_list_; !hebbes_b && gh_pair_p (p); p = ly_cdr (p))
     {
-      hebbes_b = unsmob_translator (gh_car (p))->try_music (m);
+      hebbes_b = unsmob_translator (ly_car (p))->try_music (m);
     }
   return hebbes_b;
 }
@@ -244,8 +244,8 @@ Translator_group::get_default_interpreter ()
 static void
 static_each (SCM list, Method_pointer method)
 {
-  for (SCM p = list; gh_pair_p (p); p = gh_cdr (p))
- (unsmob_translator (gh_car (p))->*method) ();
+  for (SCM p = list; gh_pair_p (p); p = ly_cdr (p))
+ (unsmob_translator (ly_car (p))->*method) ();
   
 }
 
@@ -348,13 +348,13 @@ Translator_group::execute_single_pushpop_property (SCM prop, SCM eltprop, SCM va
          SCM newprops= SCM_EOL ;
          while (gh_pair_p (prev) && gh_caar (prev) != eltprop)
            {
-             newprops = gh_cons (gh_car (prev), newprops);
-             prev = gh_cdr (prev);
+             newprops = gh_cons (ly_car (prev), newprops);
+             prev = ly_cdr (prev);
            }
          
          if (gh_pair_p (prev))
            {
-             newprops = scm_reverse_x (newprops, gh_cdr (prev));
+             newprops = scm_reverse_x (newprops, ly_cdr (prev));
              set_property (prop, newprops);
            }
        }
index 03adb249f91a22bb4065e746183fab71e21248e4..a2e780f31da4e943d7ae08c8f9e9ab5385138282 100644 (file)
@@ -59,8 +59,8 @@ Translator::is_alias_b (String s) const
   bool b  = s == type_str_;
 
   for (SCM a = unsmob_translator_def (definition_)->type_aliases_;
-       !b && gh_pair_p (a); a = gh_cdr (a))
-    b = b || s == ly_scm2string (gh_car (a));
+       !b && gh_pair_p (a); a = ly_cdr (a))
+    b = b || s == ly_scm2string (ly_car (a));
 
   return b;
 }
@@ -162,7 +162,7 @@ Translator::mark_smob (SCM sm)
 int
 Translator::print_smob (SCM s, SCM port, scm_print_state *)
 {
-  Translator *sc = (Translator *) gh_cdr (s);
+  Translator *sc = (Translator *) ly_cdr (s);
      
   scm_puts ("#<Translator ", port);
   scm_puts ((char *)sc->name (), port);
index 04a48773ca98a3ca951ccf219794b96ba3391ae2..316d88e7edbda58775d9342b895a21e0fbf57f05 100644 (file)
@@ -113,7 +113,7 @@ Tuplet_bracket::brew_molecule (SCM smob)
       SCM thick = me->get_grob_property ("thick");
       SCM gap = me->get_grob_property ("number-gap");
          
-      SCM at =gh_list (ly_symbol2scm ("tuplet"),
+      SCM at =scm_listify (ly_symbol2scm ("tuplet"),
                       gh_double2scm (1.0),
                       gap,
                       gh_double2scm (w),
@@ -276,9 +276,9 @@ Tuplet_bracket::get_default_dir (Grob*me)
     }
 
   d = UP ;
-  for (SCM s = me->get_grob_property ("columns"); gh_pair_p (s); s = gh_cdr (s))
+  for (SCM s = me->get_grob_property ("columns"); gh_pair_p (s); s = ly_cdr (s))
     {
-      Grob * nc = unsmob_grob (gh_car (s));
+      Grob * nc = unsmob_grob (ly_car (s));
       if (Note_column::dir (nc) < 0) 
        {
          d = DOWN;
index 453d958b37b7647ae2286535a2272a5a0c9d14dc..0a74c470530369c7cfe8870324786c684b77621c 100644 (file)
@@ -85,7 +85,7 @@ Tuplet_engraver::create_grobs ()
       SCM proc = get_property ("tupletNumberFormatFunction");
       if (gh_procedure_p (proc))
        {
-         SCM t = gh_apply (proc, gh_list (time_scaled_music_arr_[i]->self_scm (), SCM_UNDEFINED));
+         SCM t = gh_apply (proc, scm_listify (time_scaled_music_arr_[i]->self_scm (), SCM_UNDEFINED));
          glep->set_grob_property ("text", t);
        }
       
index 73343eee83af721a4af3e01c9866b6a22f9d3017..61f8a5b2d826f3a960f4ecf122c91c3b87c10819 100644 (file)
@@ -145,7 +145,7 @@ Unfolded_repeat_iterator::next_element (bool side_effect)
      
       if (gh_pair_p (alternative_cons_))
        {
-         current_iter_p_ = get_iterator_p (unsmob_music (gh_car (alternative_cons_)));
+         current_iter_p_ = get_iterator_p (unsmob_music (ly_car (alternative_cons_)));
          do_main_b_ = false;
 
          if (volta_b_)
@@ -165,7 +165,7 @@ Unfolded_repeat_iterator::next_element (bool side_effect)
                }                 
              
              if (do_repcommands)
-               add_repeat_command (gh_list (ly_symbol2scm ("volta"),
+               add_repeat_command (scm_listify (ly_symbol2scm ("volta"),
                                             ly_str02scm (repstr.ch_C ()), SCM_UNDEFINED));
            }     
        }
@@ -192,14 +192,14 @@ Unfolded_repeat_iterator::next_element (bool side_effect)
        */
       if (alternative_cons_)
        {
-         here_mom_ += unsmob_music (gh_car (alternative_cons_))->length_mom ();
+         here_mom_ += unsmob_music (ly_car (alternative_cons_))->length_mom ();
 
          if (volta_b_ || 
              repmus->repeat_count () - done_count_  < alternative_count_i_)
-           alternative_cons_ = gh_cdr (alternative_cons_);
+           alternative_cons_ = ly_cdr (alternative_cons_);
          
          if (do_repcommands)
-           add_repeat_command (gh_list (ly_symbol2scm ("volta"), SCM_BOOL_F, SCM_UNDEFINED));
+           add_repeat_command (scm_listify (ly_symbol2scm ("volta"), SCM_BOOL_F, SCM_UNDEFINED));
 
          
          
@@ -223,14 +223,14 @@ Unfolded_repeat_iterator::next_element (bool side_effect)
          if (do_repcommands)
            {
              String repstr = to_str (done_count_ + 1) + ".";
-             add_repeat_command (gh_list (ly_symbol2scm ("volta"),
+             add_repeat_command (scm_listify (ly_symbol2scm ("volta"),
                                           ly_str02scm (repstr.ch_C ()), SCM_UNDEFINED));
              add_repeat_command (ly_symbol2scm ("end-repeat"));
            }
 
          
          if (volta_b_)
-           current_iter_p_ = get_iterator_p (unsmob_music (gh_car (alternative_cons_)));
+           current_iter_p_ = get_iterator_p (unsmob_music (ly_car (alternative_cons_)));
          else
            {
              current_iter_p_ = get_iterator_p (repmus->body ());
@@ -262,7 +262,7 @@ Unfolded_repeat_iterator::construct_children ()
     ? mus->alternatives ()->music_list ()
     : SCM_EOL;
 
-  for (SCM p = alternative_cons_; gh_pair_p (p); p = gh_cdr (p))
+  for (SCM p = alternative_cons_; gh_pair_p (p); p = ly_cdr (p))
     alternative_count_i_ ++;
 
   if (mus->body ())
@@ -272,7 +272,7 @@ Unfolded_repeat_iterator::construct_children ()
     }
   else if (gh_pair_p (alternative_cons_))
     {
-      current_iter_p_ = get_iterator_p (unsmob_music (gh_car (alternative_cons_)));
+      current_iter_p_ = get_iterator_p (unsmob_music (ly_car (alternative_cons_)));
       do_main_b_ = false;
     }
 
@@ -360,8 +360,8 @@ Unfolded_repeat_iterator::get_music (Moment until)const
       s = gh_append2 (nm, s);
       
       Moment m = 0;
-      for (SCM i = nm; gh_pair_p (i); i = gh_cdr (i))
-       m = m >? unsmob_music (gh_car (i))->length_mom ();
+      for (SCM i = nm; gh_pair_p (i); i = ly_cdr (i))
+       m = m >? unsmob_music (ly_car (i))->length_mom ();
 
       if (m > Moment (0))
        break ;
index 6feb88b12d4a4eb7d966a4164caa77fd7055872c..68d849c1c25896ab5a72965b59cded5679de386b 100644 (file)
@@ -57,10 +57,10 @@ Volta_engraver::process_music ()
   start_str_ = SCM_EOL;
   while (gh_pair_p (cs))
     {
-      SCM c = gh_car (cs);
+      SCM c = ly_car (cs);
 
-      if (gh_pair_p (c) && gh_car (c) == ly_symbol2scm ("volta")
-         && gh_pair_p (gh_cdr (c)))
+      if (gh_pair_p (c) && ly_car (c) == ly_symbol2scm ("volta")
+         && gh_pair_p (ly_cdr (c)))
        {
          if (gh_cadr (c) ==  SCM_BOOL_F)
            end = true;
@@ -68,7 +68,7 @@ Volta_engraver::process_music ()
            start_str_ = gh_cadr (c);
        }
       
-      cs = gh_cdr (cs);
+      cs = ly_cdr (cs);
     }
 
   if (volta_span_p_)
index 3ffe7b78da4301887bf7820a34b86ef5a146a31a..35bfb1a6192165c43ed5ae5cf6072ed51009bdc1 100644 (file)
@@ -56,7 +56,7 @@ Volta_spanner::brew_molecule (SCM smob)
   bool no_vertical_start = orig_span && !first_bracket;
   bool no_vertical_end = orig_span && !last_bracket;
   SCM bars = me->get_grob_property ("bars");
-  Grob * endbar =   unsmob_grob (gh_car (bars));
+  Grob * endbar =   unsmob_grob (ly_car (bars));
   SCM glyph = endbar->get_grob_property("glyph");
   String str = ly_scm2string(glyph);
   const char* cs = str.ch_C();
@@ -93,7 +93,7 @@ Volta_spanner::brew_molecule (SCM smob)
   /*
     ugh: should build from line segments.
    */
-  SCM at = (gh_list (ly_symbol2scm ("volta"),
+  SCM at = (scm_listify (ly_symbol2scm ("volta"),
                     gh_double2scm (h),
                     gh_double2scm (w),
                     gh_double2scm (t),
@@ -104,7 +104,7 @@ Volta_spanner::brew_molecule (SCM smob)
   Box b (Interval (0, w), Interval (0, h));
   Molecule mol (b, at);
   SCM text = me->get_grob_property ("text");
-  SCM properties = gh_list (me->mutable_property_alist_, me->immutable_property_alist_,SCM_UNDEFINED);
+  SCM properties = scm_listify (me->mutable_property_alist_, me->immutable_property_alist_,SCM_UNDEFINED);
   Molecule num = Text_item::text2molecule (me, text, properties);
 
   mol.add_at_edge (X_AXIS, LEFT, num, - num.extent (X_AXIS).length ()
index 729599c817571aafea364f7eaa4644deb53d24a3..545d1d0a42ed4c9364b1738d01ab15ac384a50d9 100644 (file)
@@ -107,22 +107,33 @@ message_t metaEvents[] = {
   0,0
 };
 
+void
+add_constants (PyObject *dict)
+{
+  message_t * p[] = {metaEvents, channelModeMessages, channelVoiceMessages ,0};
+  int i,j;
+  for ( j =0; p[j]; j++)
+    for ( i = 0; p[j][i].description; i++)
+      PyDict_SetItemString (dict, p[j][i].description, Py_BuildValue ("i", p[j][i].msg));
+}
+
 unsigned long int
-get_number (char * str, char * end_str, int length)
+get_number (unsigned char ** str, unsigned char * end_str, int length)
 {
   /* # MIDI uses big-endian for everything */
   long sum = 0;
   int i = 0;
   
   for (; i < length; i++)
-    sum = (sum << 8) + (unsigned char) str[i];
+    sum = (sum << 8) + (unsigned char) (*str)[i];
 
+  *str += length;
   debug_print ("%d:\n", sum);
   return sum;
 }
 
 unsigned long int
-get_variable_length_number (char **str, char * end_str)
+get_variable_length_number (unsigned char **str, unsigned char * end_str)
 {
   long sum = 0;
   int i = 0;
@@ -138,103 +149,76 @@ get_variable_length_number (char **str, char * end_str)
   return sum;
 }
 
-static PyObject *
-read_unimplemented_event (char **track, char *end, unsigned long time,
-                         unsigned char x, unsigned char z)
+PyObject *
+read_one_byte (unsigned char **track, unsigned char *end, 
+              unsigned char x)
 {
-  debug_print ("%x:%s", z, "unimplemented MIDI event\n");
-  *track += 2;
-  return Py_BuildValue ("(iii)", z, *((*track) -2), *((*track) -1));
+  PyObject *pyev = Py_BuildValue ("(i)", x);
+  debug_print ("%x:%s", x, "event\n");
+
+  return pyev;
 }
 
 PyObject *
-read_one_byte (char **track, char *end, unsigned long time,
-              unsigned char x, unsigned char z)
+read_two_bytes (unsigned char **track, unsigned char *end, 
+               unsigned char x)
 {
-  debug_print ("%x:%s", z, "event\n");
+  PyObject *pyev = Py_BuildValue ("(ii)", x, (*track)[0]);
   *track += 1;
-  return Py_BuildValue ("(ii)", z, *((*track) -1));
+  debug_print ("%x:%s", x, "event\n");
+  return pyev;
 }
 
 PyObject *
-read_two_bytes (char **track, char *end, unsigned long time,
-               unsigned char x, unsigned char z)
+read_three_bytes (unsigned char **track, unsigned char *end, 
+                 unsigned char x)
 {
-  debug_print ("%x:%s", z, "event\n");
-  *track += 2;
-  return Py_BuildValue ("(iii)", z, *((*track) -2), *((*track) -1));
-}
+  PyObject *pyev = Py_BuildValue ("(iii)", x, (*track)[0],
+                                 (*track)[1]);
 
-PyObject *
-read_three_bytes (char **track, char *end, unsigned long time,
-                 unsigned char x, unsigned char z)
-{
-  debug_print ("%x:%s", z, "event\n");
-  *track += 3;
-  return Py_BuildValue ("(iiii)", z, *((*track) -3), *((*track) -2), *((*track) -1));
+  *track += 2;
+  debug_print ("%x:%s", x, "event\n");
+  return pyev;
 }
 
 PyObject *
-read_string (char **track, char *end, unsigned long time,
-            unsigned char x, unsigned char z)
+read_string (unsigned char **track, unsigned char *end) 
 {
   unsigned long length = get_variable_length_number (track, end);
-  if (length < *track - end)
-    debug_print ("%s", "zero length string\n");
+  if (length > end - *track)
+    length = end - *track;
+
   *track += length;
-  debug_print ("%x:%s", length, "string\n");
-  return Py_BuildValue ("(is)", z, *((*track) -length));
+  return Py_BuildValue ("s", ((*track) -length));
 }
 
 typedef PyObject* (*Read_midi_event)
-     (char **track, char *end, unsigned long time,
-      unsigned char x, unsigned char z);
-
-Read_midi_event read_ff_byte [16] =
-{
-  read_three_bytes,  //  0
-  read_one_byte,     // 10
-  read_one_byte,  // 20
-  read_one_byte,  // 30
-  read_one_byte,  // 40
-  read_one_byte,  // 50
-  read_one_byte,  // 60
-  read_two_bytes, // 70
-  read_two_bytes, // 80
-  read_two_bytes, // 90
-  read_two_bytes, // a0
-  read_two_bytes, // b0
-  read_one_byte,  // c0
-  read_two_bytes, // d0
-  read_two_bytes, // e0
-  read_two_bytes, // e0
-};
+     (unsigned char **track, unsigned char *end, 
+      unsigned char x);
 
 
 static PyObject *
-read_f0_byte (char **track, char *end, unsigned long time,
-             unsigned char x, unsigned char z)
+read_f0_byte (unsigned char **track, unsigned char *end, 
+             unsigned char x)
              
 {
-  debug_print ("%x:%s", z, "event\n");
-  if (z == 0xff)
+  debug_print ("%x:%s", x, "event\n");
+  if (x == 0xff)
     {
-      unsigned char zz = *(*track)++;
-      debug_print ("%x:%s", zz, "f0-event\n");
-      if (zz == 0x01 && **track <= 0x07)
-       return read_string (track, end, time, x, zz);
-      else if (zz == 0x2f && **track == 0x00)
+      unsigned char z = (*track)[0 ];
+      *track += 1;
+      debug_print ("%x:%s", z, "f0-event\n");
+      
+      if (z == 0x2f && (*track)[0] == 0x00) /* end of track */
        {
-         (*track)++;
-         debug_print ("%s", "done\n");
+         *track += 1;
          return 0;
        }
       else
-       return read_unimplemented_event (track, end, time, x, zz);
-      exit (0);
+       return Py_BuildValue ("(iiO)", x, z, read_string (track, end));
     }
-  else
-    return read_string (track, end, time, x, z);
+
+  return Py_BuildValue ("(iO)", x, read_string (track, end));
 }
 
 Read_midi_event read_midi_event [16] =
@@ -245,36 +229,42 @@ Read_midi_event read_midi_event [16] =
   read_one_byte,  // 30
   read_one_byte,  // 40
   read_one_byte,  // 50
-  read_one_byte,  // 60
-  read_two_bytes, // 70
-  read_two_bytes, // 80
-  read_two_bytes, // 90
-  read_two_bytes, // a0
-  read_two_bytes, // b0
-  read_one_byte,  // c0
-  read_two_bytes, // d0
-  read_two_bytes, // e0
+  read_one_byte,  // 60 data entry.
+  read_two_bytes, // 70 all notes off
+  read_three_bytes, // 80 note off
+  read_three_bytes, // 90 note on
+  read_three_bytes, // a0 poly aftertouch
+  read_three_bytes, // b0 control
+  read_two_bytes,  // c0 prog change
+  read_two_bytes, // d0 ch aftertouch
+  read_three_bytes, // e0 pitchwheel range 
   read_f0_byte,   // f0
 };
-            
+
+
 static PyObject *
-read_event (char **track, char *end, unsigned long time,
+read_event (unsigned char **track, unsigned char *end, PyObject *time,
            unsigned char *running_status)
 {
   int rsb_skip = ((**track & 0x80)) ? 1 :0;
 
   unsigned char x = (rsb_skip) ? (*track)[0]: *running_status;
-  // unsigned char y = x & 0xf0;
-  unsigned char z = (*track)[1 + rsb_skip];
-  
-  debug_print ("%x:%s", z, "event\n");
-  *track += 2 + rsb_skip;
 
-  return (*read_midi_event[z >> 4]) (track, end, time, x, z);
+  PyObject * bare_event = 0;
+  debug_print ("%x:%s", x, "event\n");
+  *running_status = x;
+  *track += rsb_skip;
+  
+  //  printf ("%x %x %d next %x\n", x, (*track)[0], rsb_skip, (*track)[1]);
+  bare_event = (*read_midi_event[x >> 4]) (track, end, x);
+  if (bare_event)
+    return Py_BuildValue ("(OO)", time, bare_event);
+  else
+    return NULL;
 }
 
 static PyObject *
-midi_parse_track (char **track, char *track_end)
+midi_parse_track (unsigned char **track, unsigned char *track_end)
 {
   unsigned int time = 0;
   unsigned char running_status;
@@ -291,8 +281,8 @@ midi_parse_track (char **track, char *track_end)
   assert (!strcmp (*track, "MTrk"));
   *track += 4;
 
-  track_len = get_number (*track, *track + 4, 4);
-  *track += 4;
+  track_len = get_number (track, *track + 4, 4);
+
 
   debug_print ("track_len: %u\n", track_len);
   debug_print ("track_size: %u\n", track_size);
@@ -305,14 +295,24 @@ midi_parse_track (char **track, char *track_end)
 
   track_end = *track + track_len;
 
-  while (*track < track_end)
-    {
-      long dt = get_variable_length_number(track, track_end);
-      time += dt;
-      PyList_Append (pytrack, read_event (track, track_end, time,
-                                         &running_status));
-    }
-
+  {  
+    PyObject *pytime = PyInt_FromLong (0L);
+    while (*track < track_end)
+      {
+       long dt = get_variable_length_number(track, track_end);
+       PyObject *pyev = 0;
+
+       time += dt;
+       if (dt)
+         pytime = PyInt_FromLong (time);
+
+       pyev = read_event (track, track_end, pytime,
+                          &running_status);
+       if (pyev)
+         PyList_Append (pytrack, pyev);
+      }
+  }
+  
   *track = track_end;
   return pytrack;
 }
@@ -321,7 +321,7 @@ midi_parse_track (char **track, char *track_end)
 static PyObject *
 pymidi_parse_track (PyObject *self, PyObject *args)
 {
-  char *track, *track_end;
+  unsigned char *track, *track_end;
   unsigned long track_size, track_len;
 
   PyObject * sobj = PyTuple_GetItem (args, 0);
@@ -339,7 +339,7 @@ pymidi_parse_track (PyObject *self, PyObject *args)
 }
 
 static PyObject *
-midi_parse (char **midi, char *midi_end)
+midi_parse (unsigned char **midi,unsigned  char *midi_end)
 {
   PyObject *pymidi = 0;
   unsigned long header_len;
@@ -350,23 +350,20 @@ midi_parse (char **midi, char *midi_end)
   debug_print ("%s", "\n");
 
   /* Header */
-  header_len = get_number (*midi, *midi + 4, 4);
-  *midi += 4;
+  header_len = get_number (midi, *midi + 4, 4);
+
   
   if (header_len < 6)
     return midi_error ("header too short");
     
-  format = get_number (*midi, *midi + 2, 2);
-  *midi += 2;
-  
-  tracks = get_number (*midi, *midi + 2, 2);
-  *midi += 2;
+  format = get_number (midi, *midi + 2, 2);
+  tracks = get_number (midi, *midi + 2, 2);
 
   if (tracks > 32)
     return midi_error ("too many tracks");
   
-  division = get_number (*midi, *midi + 2, 2) * 4;
-  *midi += 2;
+  division = get_number (midi, *midi + 2, 2) * 4;
+
 
   if (division < 0)
     /* return midi_error ("can't handle non-metrical time"); */
@@ -374,19 +371,20 @@ midi_parse (char **midi, char *midi_end)
   *midi += header_len - 6;
 
   pymidi = PyList_New (0);
-  PyList_Append (pymidi, Py_BuildValue ("(iii)", format, tracks, division));
 
   /* Tracks */
   for (i = 0; i < tracks; i++)
     PyList_Append (pymidi, midi_parse_track (midi, midi_end));
 
+  pymidi = Py_BuildValue ("(OO)", Py_BuildValue ("(ii)", format, division),
+                         pymidi);
   return pymidi;
 }
 
 static PyObject *
 pymidi_parse (PyObject *self, PyObject *args)
 {
-  char *midi, *midi_end;
+  unsigned char *midi, *midi_end;
   unsigned long midi_size, midi_len;
   
   PyObject *sobj = PyTuple_GetItem (args, 0);
@@ -421,6 +419,7 @@ initmidi ()
   
   Midi_error = PyString_FromString ("midi.error");
   PyDict_SetItemString (d, "error", Midi_error);
+  add_constants (d);
   Midi_warning = PyString_FromString ("midi.warning");
   PyDict_SetItemString (d, "warning", Midi_warning);
 }
diff --git a/scripts/midi2ly.py b/scripts/midi2ly.py
new file mode 100644 (file)
index 0000000..26476d4
--- /dev/null
@@ -0,0 +1,206 @@
+#!@PYTHON@
+
+import midi
+import sys
+
+scale_steps =[0,2,4,5,7,9,11]
+
+def split_channels (track):
+       chs = {}
+       for i in range(16):
+               chs[i] = []
+               
+       for e in track:
+               data = list (e[1])              
+               c =  data[0] & 0x0f
+               e = (e[0], tuple ([data[0] & 0xf0] + data[1:]))
+               chs[c].append (e)
+
+       for i in range (16):
+               if chs[i] == []:
+                       del chs[i]
+
+
+       for v in chs.values ():
+               ns = notes_on_channel(v)
+               ns = unthread_notes (ns)
+               map (dump_thread, ns)
+               
+       return chs
+
+
+class Note:
+       def __init__(self, duration, pitch, velocity):
+               self.velocity = velocity
+               self.pitch = pitch
+               self.duration = duration
+
+       def duration_compare(a,b):
+               if a.duration < b.duration :
+                       return -1
+               elif a.duration > b.duration:
+                       return 1
+               else:
+                       return 0
+       
+def notes_on_channel (channel):
+       pitches = {}
+
+       nch= []
+       for e in channel:
+               t = e[0]
+
+               if e[1][0] == midi.NOTE_ON:
+                       if not pitches.has_key (e[1][1]):
+                               pitches[e[1][1]] = (t, e[1][2])
+               elif e[1][0] == midi.NOTE_OFF:
+                       try:
+                               (lt, vel) = pitches[e[1][1]]
+                               del pitches[e[1][1]]
+                               
+                               nch.append ((t, Note (t-lt, e[1][1], vel)))
+                               
+                       except KeyError:
+                               pass
+               else:
+                       pass
+       
+       return nch
+
+def unthread_notes (channel):
+       threads = []
+       while channel:
+               thread = []
+               end_busy_t = 0
+               start_busy_t = 0
+               todo = []
+               for e in channel:
+                       t = e[0]
+                       if (t == start_busy_t and e[1].duration + t == end_busy_t) \
+                           or t >= end_busy_t:
+                               thread.append (e)
+                               start_busy_t = t
+                               end_busy_t = t + e[1].duration
+                       else:
+                               todo.append(e)
+               threads.append (thread)
+               channel = todo
+
+       return threads
+
+def gcd (a,b):
+       if b == 0:
+               return a
+       c = a
+       while c: 
+               c = a % b
+               a = b
+               b = c
+       return a
+       
+def dump_skip (dt):
+       wholes = dt / (4*384)
+       dt = dt % (4*384);
+       quarters = dt / 384
+
+       # etc.
+       if (wholes):
+               print 's1*%d' % wholes 
+       if quarters:
+               print 's4*%d' % quarters 
+
+
+
+def dump_duration (dur):
+       g = gcd (dur, 384)
+       sys.stdout.write ('4')
+       (p,q) = (dur / g, 384 / g)
+       if (p == 1 and q == 1) :
+               pass
+       else:
+               if p <> 1:      
+                       sys.stdout.write ('*%d'% p)
+               if q <> 1:
+                       sys.stdout.write ('*%d'% q)
+       
+
+def dump_note (note):
+       p = note.pitch
+       oct = p / 12
+       step = p % 12
+
+       i = 0
+       while  i < len (scale_steps):
+               if scale_steps[i] > step:
+                       break
+               i = i+1
+               
+       i = i-1
+       str = chr (i + ord ('a'))
+       if scale_steps[i] <> step:
+               str = str + 'is'
+
+       sys.stdout.write (' %s' % str);
+       dump_duration (note.duration)
+
+def dump_chord (ch):
+       if len(ch) == 1:
+               dump_note (ch[0])
+       else:
+               sys.stdout.write ("<")
+               map (dump_note, ch)
+               sys.stdout.write ('>')
+
+def dump_thread (thread):
+       last_e = None
+       chs = []
+       ch = []
+
+       for e in thread:
+               if last_e and last_e[0] == e[0]:
+                       ch.append (e[1])
+               else:
+                       if ch:
+                               chs.append ( (last_e[0], ch))
+                               
+                       ch = [e[1]]
+                       
+               last_e = e
+
+       if ch: chs.append ((last_e[0] ,ch))
+       t = 0
+       last_t = 0
+
+       for ch in chs:
+               t = ch[0]
+               if t - last_t:
+                       dump_skip (t-last_t)
+                       
+               dump_chord (ch[1])
+               last_t = t + ch[1][0].duration
+
+def dump_notes (channel):
+       on_hold = []
+       for e in channel:
+               if e[0] <> last_t:
+                       dump_chord (on_hold)
+                       on_hold = []
+                       last_t = e[0]
+
+               on_hold.append (e)
+               
+
+
+       
+def convert_midi (f):
+       str = open (f).read ()
+       midi_dump = midi.parse (str)
+
+       channels = []
+
+       for t in midi_dump[1]:
+               channels.append (split_channels (t))
+
+
+for f in sys.argv[1:]:
+    convert_midi (f)