]> git.donarmstrong.com Git - lilypond.git/commitdiff
release: 1.3.105 release/1.3.105
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Wed, 8 Nov 2000 22:57:02 +0000 (23:57 +0100)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Wed, 8 Nov 2000 22:57:02 +0000 (23:57 +0100)
============

* Bit of temporary makefile hacking to stay in sync with makeinfo patch.

* Separate interface description (test phase).

* Makeinfo --html split fix: http://appel.lilypond.org/fred/software/texinfo-4.0.jcn2.diff

* Use headers for makeinfo html output.

* Made some --scrdir build fixes.

1.3.104.

79 files changed:
CHANGES
Documentation/user/GNUmakefile
VERSION
input/test/ancient-font.ly [new file with mode: 0644]
lily/arpeggio.cc
lily/bar.cc
lily/beam-engraver.cc
lily/beam.cc
lily/breathing-sign.cc
lily/chord-name.cc
lily/clef-engraver.cc
lily/clef-item.cc
lily/command-request.cc
lily/crescendo.cc
lily/custos.cc
lily/dots.cc
lily/dynamic-engraver.cc
lily/font-interface.cc
lily/grace-engraver-group.cc
lily/hyphen-spanner.cc
lily/include/command-request.hh
lily/include/font-interface.hh
lily/include/lily-guile.hh
lily/include/molecule.hh
lily/include/music-iterator-ctor.hh [new file with mode: 0644]
lily/include/music-iterator.hh
lily/include/musical-request.hh
lily/include/part-combine-music.hh
lily/include/request.hh
lily/include/score-element-callback.hh [deleted file]
lily/include/score-element.hh
lily/key-item.cc
lily/lily-guile.cc
lily/line-of-score.cc
lily/local-key-engraver.cc
lily/local-key-item.cc
lily/lyric-extender.cc
lily/molecule.cc
lily/multi-measure-rest-engraver.cc
lily/multi-measure-rest.cc
lily/music-iterator-ctor.cc [new file with mode: 0644]
lily/musical-request.cc
lily/note-head.cc
lily/parser.yy
lily/part-combine-music-iterator.cc
lily/part-combine-music.cc
lily/piano-pedal-engraver.cc
lily/piano-pedal-performer.cc
lily/rest.cc
lily/score-element.cc
lily/score-engraver.cc
lily/script-engraver.cc
lily/script.cc
lily/slur-engraver.cc
lily/slur.cc
lily/span-dynamic-performer.cc
lily/staff-symbol.cc
lily/stem-engraver.cc
lily/stem-tremolo.cc
lily/stem.cc
lily/sustain-pedal.cc
lily/symbol-cache.cc
lily/system-start-delimiter.cc
lily/tempo-performer.cc
lily/text-item.cc
lily/text-spanner-engraver.cc
lily/text-spanner.cc
lily/tie.cc
lily/time-signature-performer.cc
lily/time-signature.cc
lily/timing-translator.cc
lily/tuplet-spanner.cc
lily/voice-devnull-engraver.cc
lily/volta-spanner.cc
make/out/lilypond.lsm
make/out/lilypond.spec
scm/font.scm
scm/generate-documentation.scm
stepmake/stepmake/generic-vars.make

diff --git a/CHANGES b/CHANGES
index 80429e41fda8236e2b8dc59fcdc3de9c53d8f5ca..c72d0969f56ff677f67cdc6bd480c84f10062f5c 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -3,29 +3,33 @@
 
 * Bit of temporary makefile hacking to stay in sync with makeinfo patch.
 
-1.3.104.jcn2
-============
-
 * Separate interface description (test phase).
 
 * Makeinfo --html split fix: http://appel.lilypond.org/fred/software/texinfo-4.0.jcn2.diff
 
 * Use headers for makeinfo html output.
 
-1.3.104.jcn1
-============
-
 * Made some --scrdir build fixes.
 
-1.3.103.jcn5
-============
+1.3.104.uu1
+===========
+
+* Smobified molecule, and cache molecule (ie. generate each molecule
+only once).  Lily should be faster now. (approx. 6 % ?)
+
+* Coded properties-to-font-name in C++. Measured speedup: 14% (wtk1-fugue2)
+
+* Use music properties for Request data.
+
+1.3.104
+=======
 
 * Documentation build fix: don't run LilyPond when generating plain info doc.
 
 * Resurrected info documentation and made cross links between manual
 and generated doco, some small fixes.
 
-* Made small Time signature style fix.
+* Made small time signature style fix.
 
 * Generate texinfo iso html documentation.
 
@@ -2937,8 +2941,3 @@ pl 15.jcn4
        - direct #... to scm parser  (Thanks to Gary Houston)
 
 
-
-# Local variables:
-# mode: change-log
-# left-margin: 0
-# End:
index 83c498529284524a3c51e7d18d2ddd92b780a153..70af27845cdb86f2ef726425aa26c6357500eda1 100644 (file)
@@ -31,7 +31,7 @@ ps: $(PS_FILES)
 
 info: $(INFO_FILES)
 
-default: info
+default: 
 
 local-WWW: $(HTML_FILES)   $(datafiles) $(PS_GZ_FILES) backdoc-WWW
        $(SHELL) $(buildscript-dir)/install-info-html.sh $(outdir) lilypond lilypond-internals
diff --git a/VERSION b/VERSION
index f376e6be7483be97cd1394d0cfbf15d2989a1563..2e7b9bcdf65c3ef29159f8e182b92898b827647f 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1,8 +1,8 @@
 PACKAGE_NAME=LilyPond
 MAJOR_VERSION=1
 MINOR_VERSION=3
-PATCH_LEVEL=104
-MY_PATCH_LEVEL=jcn3
+PATCH_LEVEL=105
+MY_PATCH_LEVEL=
 
 # use the above to send patches: MY_PATCH_LEVEL is always empty for a
 # released version.
diff --git a/input/test/ancient-font.ly b/input/test/ancient-font.ly
new file mode 100644 (file)
index 0000000..f71d198
--- /dev/null
@@ -0,0 +1,102 @@
+\header {
+    title      = "ancient font test";
+    date       = "2000";
+}
+
+\version "1.3.59";
+
+\include "paper26.ly"
+
+global = \notes {
+    \property Score.timing = 1
+    \property Staff.TimeSignature \push #'style = #"old"
+    \time 2/2;
+}
+
+upperVoice = \context Staff = upperVoice <
+    \global
+    \property Staff.numberOfStaffLines = 4
+    \notes \transpose c' {
+       \property Staff.Custos \push #'style = #'"vaticana"
+       \clef "vaticana_fa2";
+       c1 d e f g
+       \clef "vaticana_do2";
+       a b c' \bar "|";
+       b a g f
+       \clef "vaticana_fa1";
+       e d c\breve \bar "|";
+
+       \property Staff.Custos \push #'style = #"medicaea"
+       \clef "medicaea_fa2";
+       c1 d e f g
+       \clef "medicaea_do2";
+       a b c' \bar "|";
+       b a g f
+       \clef "medicaea_fa1";
+       e d c\breve \bar "|";
+
+       \property Staff.Custos \push #'style = #'"hufnagel"
+       \clef "hufnagel_fa2";
+       c1 d e f g
+       \clef "hufnagel_do2";
+       a b c' \bar "|";
+       b a g f
+       \clef "hufnagel_fa1";
+       e d c\breve \bar "||";
+    }
+>
+
+lowerVoice = \context Staff = lowerNotes <
+    \global
+    \property Staff.numberOfStaffLines = 5
+    \notes \transpose c'' {
+       \property Staff.Custos \push #'style = #'"mensural"
+       \clef "mensural1_c2";
+       c1 d e f g
+       \clef "mensural1_c2";
+       a b c' \bar "|";
+       b a g f
+       \clef "mensural2_c2";
+       e d c\breve \bar "|";
+
+       \clef "mensural2_c2";
+       c1 d e f g
+       \clef "mensural3_c2";
+       a b c' \bar "|";
+       b a g f
+       \clef "mensural3_c2";
+       e d c\breve \bar "|";
+
+       \clef "mensural_f";
+       c1 d e f g
+       \clef "mensural_f";
+       a b c' \bar "|";
+       b a g f
+       \clef "mensural_f";
+       e d c\breve \bar "|";
+
+       \clef "hufnagel";
+       c,1 d, e, f, g,
+       \clef "hufnagel";
+       a, b, c \bar "||";
+    }
+>
+
+\score {
+    \context ChoirStaff <
+       \upperVoice
+       \lowerVoice
+    >
+    \paper {
+%      \paper_twentysix
+       linewidth = 17.25\cm;
+       textheight = 26.0\cm;
+       indent = 0.0;
+       \translator {
+           \StaffContext
+           \consists "Custos_engraver";
+%          custosStyle = "mensural";
+       }
+    }
+}
+
index 1c2d79d14dc11fbbeeb2fb6db4b4a8aa18f54560..39cc20ba499181378be67fea9c8458e67642f66b 100644 (file)
@@ -78,7 +78,7 @@ Arpeggio::brew_molecule (SCM smob)
     }
   mol.translate_axis (heads[LEFT], Y_AXIS);
 
-  return mol.create_scheme (); 
+  return mol.smobbed_copy () ;
 }
 
 /*
index 9da7babb50209a9a450a1ce63c436ffaab9be55f..fa3862786dd29075688a9c3e6b987d7c9fb9a002 100644 (file)
@@ -38,7 +38,7 @@ Bar::brew_molecule (SCM smob)
       if (sz < 0)
        return SCM_EOL;
       
-      return compound_barline (me, str, sz).create_scheme ();
+      return compound_barline (me, str, sz).smobbed_copy ();
     }
   return SCM_EOL;
 }
index 8b01712e9a71299b9a4fb1005abce061010de7f1..d79b545e410da95cb13ddf79d4bab8980b2fa9a7 100644 (file)
@@ -66,7 +66,8 @@ Beam_engraver::do_try_music (Music *m)
 {
   if (Span_req * c = dynamic_cast<Span_req*>(m))
     {
-      if (c->span_type_str_ == "abort")
+      if (scm_equal_p (c->get_mus_property ("span-type"),
+                      ly_str02scm ("abort")) == SCM_BOOL_T)
        {
          reqs_drul_[START] = 0;
          reqs_drul_[STOP] = 0;
@@ -74,7 +75,8 @@ Beam_engraver::do_try_music (Music *m)
            beam_p_->suicide ();
          beam_p_ = 0;
        }
-      else if (c->span_type_str_ == "beam")
+      else if (scm_equal_p (c->get_mus_property ("span-type"),
+                      ly_str02scm ("beam")) == SCM_BOOL_T)
        {
       
          Direction d =c->get_span_dir ();
index 776ea32631c28c31092bf5692a2cbcb988f5704c..f94c018083f6e3c8617c5649e13a09bca4c45f08 100644 (file)
@@ -806,7 +806,7 @@ Beam::brew_molecule (SCM smob)
   mol.translate_axis (x0 
     - dynamic_cast<Spanner*> (me)->get_bound (LEFT)->relative_coordinate (0, X_AXIS), X_AXIS);
 
-  return mol.create_scheme ();
+  return mol.smobbed_copy ();
 }
 
 int
index a00d8c4712d0abbd6b7033752f80429df4b85d31..935151e514ada5ee3a05a70ab207e9c7b12ee7bb 100644 (file)
@@ -31,7 +31,7 @@ Breathing_sign::brew_molecule (SCM smob)
   Interval i1(0, space / 6), i2(-space / 2, space / 2);
   Box b(i1, i2);
 
-  return Lookup::filledbox(b).create_scheme ();
+  return Lookup::filledbox(b).smobbed_copy ();
 }
 
 MAKE_SCHEME_CALLBACK(Breathing_sign,offset_callback,2);
index 4e6f87cdc4428c6a5d864bb2375c796f707c7e1d..163371807d89d4672b98d82126603e92aacc35e1 100644 (file)
@@ -72,5 +72,5 @@ Chord_name::brew_molecule (SCM smob)
                       Staff_symbol_referencer::staff_space (me));
     }
 
-  return mol.create_scheme ();
+  return mol.smobbed_copy ();
 }
index 53d9bd62d4cc964e0f4bf8e82c98b2dd24fc99fa..83eb544afe64ebca957910a826afa3d4cdc79ce4 100644 (file)
@@ -171,7 +171,8 @@ Clef_engraver::do_try_music (Music * r_l)
   if (Clef_change_req *cl = dynamic_cast <Clef_change_req *> (r_l))
     {
       clef_req_l_ = cl;
-      if (!set_type (cl->clef_str_))
+      String t = ly_scm2string (cl->get_mus_property ("clef-type"));
+      if (!set_type (t))
        cl->origin ()->warning (_ ("unknown clef type"));
 
       return true;
index a96275bb60e3b04352a843b86043351a6b8c37b1..1f6ac5627ab8c18f47a28c0e79ce9df86597a662 100644 (file)
@@ -76,7 +76,7 @@ Clef::brew_molecule (SCM smob)
   SCM glyph = sc->get_elt_property ("glyph");
   if (gh_string_p (glyph))
     {
-      return Font_interface::get_default_font (sc)->find_by_name (String (ly_scm2string (glyph))).create_scheme ();
+      return Font_interface::get_default_font (sc)->find_by_name (String (ly_scm2string (glyph))).smobbed_copy ();
     }
   else
     {
index 8ea0ef54dd175a2b63e1f3f7e40702d9137d5f14..2f5f83b3f8ee5caf89d11ba4f9ba39c533fa8bce 100644 (file)
@@ -24,9 +24,9 @@ Barcheck_req::do_equal_b (Request const *r) const
 }
 
 
-Clef_change_req::Clef_change_req (String s)
+Clef_change_req::Clef_change_req ()
 {
-  clef_str_ = s;
+
 }
 
 
@@ -36,20 +36,20 @@ Time_signature_change_req::do_equal_b (Request const *r) const
   Time_signature_change_req  const* m
     = dynamic_cast <Time_signature_change_req  const*> (r);
 
+#if 0
   return m && m->beats_i_ == beats_i_
     && one_beat_i_ == m->one_beat_i_;
+#endif
+  return m;
 }
 
 Time_signature_change_req::Time_signature_change_req ()
 {
-  beats_i_ = 0;
-  one_beat_i_ =0;
 }
 
 
 Tempo_req::Tempo_req ()
 {
-  metronome_i_ = 60;
   dur_. durlog_i_ = 2;
 }
 
@@ -60,7 +60,8 @@ Tempo_req::do_equal_b (Request const *r) const
 {
   Tempo_req const *t = dynamic_cast <Tempo_req const*> (r);
 
-  return t&& t->dur_.length_mom ()== dur_.length_mom () && metronome_i_ == t->metronome_i_;
+  return t&& t->dur_.length_mom ()== dur_.length_mom ();
+  // && metronome_i_ == t->metronome_i_;
 }
 
 
index 4ef0ef6ce529f3d24a35ff16736a7ec9e70e3888..9bfbf02eff6c8aaff9edc2fca3730cedb13d7d98 100644 (file)
@@ -71,7 +71,7 @@ Crescendo::brew_molecule (SCM smob)
   Molecule mol (b, hairpin);
   mol.translate_axis (broken_left, X_AXIS);
 
-  return mol.create_scheme ();
+  return mol.smobbed_copy ();
 }
 
 
index 24091d66465732780be8df0df09c86207e08de77..91d726e2f7587f741874bd0680de7015de7777f8 100644 (file)
@@ -165,8 +165,7 @@ Custos::brew_molecule (SCM smob)
       else
         {
          add_streepjes(me, (int)pos, interspaces, &molecule);
-         SCM result = molecule.create_scheme();
-         return result;
+         return  molecule.smobbed_copy();
        }
     }
   else
index 78a6d41f7ede9b060f1a0cbf125f6c0004613c2b..31facd5fbd09df708a37371bd46c472e7be60341 100644 (file)
@@ -65,7 +65,7 @@ Dots::brew_molecule (SCM d)
          mol.add_at_edge (X_AXIS, RIGHT, d, dw);
        }
     }
-  return mol.create_scheme ();
+  return mol.smobbed_copy ();
 }
 
 
index 4a9e01eab7daa9b9285a2b336f70b31d478b9898..ee1aea2fbf1ed1ba71d483bb2cfb1d33be132c92 100644 (file)
@@ -98,7 +98,8 @@ Dynamic_engraver::do_try_music (Music * m)
     }
   else if (Span_req* s =  dynamic_cast <Span_req*> (m))
     {
-      if (s->span_type_str_ == "abort")
+      String t = ly_scm2string (s->get_mus_property ("span-type"));
+      if (t== "abort")
        {
          accepted_spanreqs_drul_[LEFT] = 0;
          accepted_spanreqs_drul_[RIGHT] = 0;
@@ -109,8 +110,8 @@ Dynamic_engraver::do_try_music (Music * m)
            cresc_p_->suicide ();
          cresc_p_ = 0;
        }
-      else if ((s->span_type_str_ == "crescendo"
-          || s->span_type_str_ == "decrescendo"))
+      else if (t == "crescendo"
+          || t == "decrescendo")
        {
          accepted_spanreqs_drul_[s->get_span_dir()] = s;
          return true;
@@ -230,13 +231,18 @@ Dynamic_engraver::do_process_music ()
          /*
            TODO: Use symbols.
           */
-         SCM s = get_property ((accepted_spanreqs_drul_[START]->span_type_str_ + "Spanner").ch_C());
 
+         String start_type = ly_scm2string (accepted_spanreqs_drul_[START]->get_mus_property ("span-type"));
+
+         /*
+           ugh. Use push/pop?
+          */
+         SCM s = get_property ((start_type + "Spanner").ch_C());
          if (!gh_string_p (s) || ly_scm2string (s) == "hairpin")
            {
              cresc_p_  = new Spanner (get_property ("Crescendo"));
              cresc_p_->set_elt_property ("grow-direction",
-                                         gh_int2scm ((accepted_spanreqs_drul_[START]->span_type_str_ == "crescendo")
+                                         gh_int2scm ((start_type == "crescendo")
                                                      ? BIGGER : SMALLER));
              
            }
@@ -249,15 +255,15 @@ Dynamic_engraver::do_process_music ()
            {
              cresc_p_  = new Spanner (get_property ("TextSpanner"));
              cresc_p_->set_elt_property ("type", s);
-             daddy_trans_l_->set_property (accepted_spanreqs_drul_[START]->span_type_str_
+             daddy_trans_l_->set_property (start_type
                                            + "Spanner", SCM_UNDEFINED);
-             s = get_property ((accepted_spanreqs_drul_[START]->span_type_str_ + "Text").ch_C());
+             s = get_property ((start_type + "Text").ch_C());
              if (gh_string_p (s))
                {
                  cresc_p_->set_elt_property ("edge-text",
                                              gh_cons (s, ly_str02scm ("")));
-                 daddy_trans_l_->set_property (accepted_spanreqs_drul_[START]->span_type_str_
-                                               + "Text", SCM_UNDEFINED);
+                 daddy_trans_l_->set_property (start_type + "Text",
+                                               SCM_UNDEFINED);
                }
            }
        
index dc6bd81d57117680f793c74021d18815d90095b1..452a956ee693e4c058d438264b67b94998d57ce2 100644 (file)
@@ -12,6 +12,7 @@
 #include "font-interface.hh"
 #include "score-element.hh"
 #include "paper-def.hh"
+#include "warn.hh"
 
 
 SCM
@@ -77,3 +78,127 @@ Font_interface::add_style (Score_element* me, SCM style, SCM chain)
     }
   return chain;
 }
+
+/*
+SCM routines:  
+
+Interpreting music...
+MIDI output to wtk1-fugue2.midi...
+Track ... 
+
+real   0m31.862s
+user   0m29.110s
+sys    0m0.260s
+
+real   0m26.964s
+user   0m24.850s
+sys    0m0.280s
+
+
+so a 14% speedup.
+
+*/
+
+static SCM name_sym, shape_sym, family_sym, series_sym, rel_sz_sym, pt_sz_sym;
+
+
+static void
+init_syms ()
+{
+  name_sym = scm_permanent_object (ly_symbol2scm ("font-name"));
+  shape_sym  = scm_permanent_object (ly_symbol2scm ("font-shape"));
+  family_sym = scm_permanent_object (ly_symbol2scm ("font-family"));
+  series_sym = scm_permanent_object (ly_symbol2scm ("font-series"));
+  rel_sz_sym = scm_permanent_object (ly_symbol2scm ("font-relative-size"));
+  pt_sz_sym = scm_permanent_object (ly_symbol2scm ("font-point-size"));
+}
+
+
+ADD_SCM_INIT_FUNC(Font_interface_syms,init_syms);
+
+
+MAKE_SCHEME_CALLBACK(Font_interface,properties_to_font_name,2);
+SCM
+Font_interface::properties_to_font_name (SCM fonts, SCM alist_chain)
+{
+  SCM name = ly_assoc_chain (name_sym, alist_chain);
+
+  SCM shape = SCM_BOOL_F;
+  SCM family = SCM_BOOL_F;
+  SCM series = SCM_BOOL_F;
+
+  
+  SCM point_sz = ly_assoc_chain (pt_sz_sym, alist_chain);
+  SCM rel_sz = SCM_BOOL_F;
+
+  if (!gh_pair_p (name))
+    {
+       shape = ly_assoc_chain (shape_sym, alist_chain);
+       family = ly_assoc_chain (family_sym, alist_chain);
+       series = ly_assoc_chain (series_sym, alist_chain);
+
+       if (gh_pair_p (shape))
+        shape = gh_cdr (shape);
+       if (gh_pair_p (family))
+        family = gh_cdr (family);
+       if (gh_pair_p (series))
+        series = gh_cdr (series);
+    }
+  else
+    name = gh_cdr (name);
+
+
+  if (gh_pair_p (point_sz))
+    point_sz = gh_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);
+    }
+
+  for (SCM s = fonts ; gh_pair_p (s); s = gh_cdr (s))
+    {
+      SCM qlist = gh_caar (s);
+
+      if (name != SCM_BOOL_F)
+       {
+         if (scm_list_ref (qlist, gh_int2scm (4)) != name)
+           continue;
+       }
+      else
+       {
+         if (series != SCM_BOOL_F
+             && scm_list_ref (qlist, gh_int2scm (1)) != series)
+           continue;
+         if (shape != SCM_BOOL_F
+             && scm_list_ref (qlist, gh_int2scm (2)) != shape)
+           continue;
+         if (family != SCM_BOOL_F
+             && scm_list_ref (qlist, gh_int2scm (3)) != family)
+           continue;
+       }
+  
+      if (point_sz != SCM_BOOL_F)
+       {
+         if (scm_list_ref (qlist, gh_int2scm (4)) != name)
+           continue;
+       }
+      else
+       {
+         if (rel_sz != SCM_BOOL_F
+             && gh_car (qlist) != rel_sz)
+           continue;
+       }
+
+      
+      SCM qname = gh_cdar (s);
+      return qname;
+    }
+
+  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 ());
+
+  return gh_str02scm ("cmr10");
+  
+}
index ae3a2f5a3e1b1992a96f69d27166cd25853ec4b8..db566fe4bbfa70b0315eb7a493f6f52496f5060c 100644 (file)
@@ -109,7 +109,8 @@ Grace_engraver_group::pass_to_top_b (Music *m) const
 {
   if (Span_req * sp = dynamic_cast<Span_req*> (m))
     {
-      if (sp->span_type_str_ == "slur")
+      if (scm_equal_p (sp->get_mus_property ("span-type"), ly_str02scm ("slur"))
+         == SCM_BOOL_T)
        //      return true;
        return false;
     }
index 7827102e919c343a28d3bf68a09d63dbb7b8b701..aa0673eb71d854b6d808ec5c3b694a291bcb7edc 100644 (file)
@@ -83,7 +83,7 @@ Hyphen_spanner::brew_molecule (SCM smob)
   mol.translate_axis (bounds.center ()
                      -sp->relative_coordinate (common, X_AXIS),
                      X_AXIS);
-  return mol.create_scheme ();
+  return mol.smobbed_copy ();
 }
   
 void
index 078e02dd2f07e109ff913db02fa5fb0852662c46..862ef287a322da6f60351d9280642955abc17a40 100644 (file)
 #include "musical-pitch.hh"
 #include "protected-scm.hh"
 
+/*
+  Real penalty_f_;
+ */
 class Break_req : public Request {
 public:
-  Real penalty_f_;
+
   Break_req ();
 protected:
   VIRTUAL_COPY_CONS(Music);
@@ -39,12 +42,14 @@ public:
   VIRTUAL_COPY_CONS(Music);
 };
 
-
+/*
+    int metronome_i_;
+ */
 class Tempo_req : public Timing_req
 {
 public:
   Duration dur_;
-  int metronome_i_;
+
 
   Tempo_req();
 protected:
@@ -56,15 +61,16 @@ protected:
 
 /**
   todo: allow C time_signature
+
+  int beats_i_;
+  int one_beat_i_;
+  
  */
 class Time_signature_change_req  : public Timing_req  {
 public:
-  int beats_i_;
-  int one_beat_i_;
-
   Time_signature_change_req();
-protected:
 
+protected:
   bool do_equal_b (Request const *) const;
   VIRTUAL_COPY_CONS(Music);
 };
@@ -106,10 +112,14 @@ protected:
   bool do_equal_b (Request const * )const; 
 };
 
+/*
+  String clef_str_;
+ */
+
 class Clef_change_req  : public Request  {
 public:
-  String clef_str_;
-  Clef_change_req (String);
+  
+  Clef_change_req ();
 protected:
 
   VIRTUAL_COPY_CONS(Music);
index 935d866743f7d6e454d66008e03e1f2d92015685..399511d10351528e3ae9c3c172bf3b539701cf57 100644 (file)
@@ -19,6 +19,7 @@ struct Font_interface
   static Font_metric * get_font (Score_element*, SCM alist_chain);
   static Font_metric * get_default_font (Score_element*);
   static SCM add_style (Score_element*, SCM style, SCM alist_chain);
+  DECLARE_SCHEME_CALLBACK(properties_to_font_name, (SCM,SCM));
 };
 
 #endif /* FONT_INTERFACE_HH */
index d69322d91b62958bd31f6388f3054117b08b1433..8c4cf5d1cd581fa05ffefd5d4df66dae18538763 100644 (file)
@@ -38,7 +38,7 @@ String ly_scm2string (SCM s);
 String ly_symbol2string (SCM);
 SCM ly_offset2scm (Offset);
 Offset ly_scm2offset (SCM);
-
+SCM ly_assoc_chain (SCM key, SCM achain);
 Interval ly_scm2interval (SCM);
 SCM ly_interval2scm (Interval);
 
index e61a64c8b9c89de83bd13a0d66d5fa6cc8461a17..99ab0a1f32b7c97f79f9b5d1867a2c4deaab3f87 100644 (file)
@@ -14,6 +14,7 @@
 #include "axes.hh"
 #include "direction.hh"
 #include "lily-guile.hh"
+#include "smobs.hh"
 
 /** a group of individually translated symbols. You can add molecules
     to the top, to the right, etc.
     Empty molecules have empty dimensions.  If add_at_edge is used to
     init the molecule, we assume that
     DIMENSIONS = (Interval(0,0),Interval(0,0)
-
-    TODO: go full smob with Molecule.
-    
 */
 class Molecule {
-  /// can't alloc on heap.
-  void * operator new (size_t s); 
   Box dim_;
   SCM expr_;
 
-public:
-
-  SCM get_expr () const;
   
+  DECLARE_SIMPLE_SMOBS(Molecule,);  
+public:
   Molecule (Box, SCM s);
   Molecule();
 
+
+  SCM smobbed_copy () const;
+  SCM get_expr () const;
+
   /**
      Set dimensions to empty, or to (Interval(0,0),Interval(0,0) */
   void set_empty (bool);
@@ -81,6 +80,8 @@ public:
   bool empty_b() const;
 };
 
+
+Molecule *unsmob_molecule (SCM);
 SCM fontify_atom (Font_metric*, SCM atom);
 
 Molecule create_molecule (SCM brew_molecule);
diff --git a/lily/include/music-iterator-ctor.hh b/lily/include/music-iterator-ctor.hh
new file mode 100644 (file)
index 0000000..56fc3c0
--- /dev/null
@@ -0,0 +1,21 @@
+/*   
+  score-element-callback.hh -- declare Score_element callbacks
+  
+  source file of the GNU LilyPond music typesetter
+  
+  (c) 2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  
+ */
+
+#ifndef SCORE_ELEMENT_CALLBACK_HH
+#define SCORE_ELEMENT_CALLBACK_HH
+
+#include "lily-proto.hh"
+#include "lily-guile.hh"
+
+typedef void * (*Cpp_function) (SCM param);
+SCM smobify_cpp_function (Cpp_function cb);
+
+
+#endif /* SCORE_ELEMENT_CALLBACK_HH */
+
index 43d39505d7687b9d3dfb6e432b0eb04da4e46bbe..30dae48a33ecc2b58045b7b705c78d449a93b6c7 100644 (file)
@@ -105,4 +105,10 @@ private:
   Interpretation_context_handle handle_;
 };
 
+
+  
+
+
+
 #endif // MUSIC_ITERATOR_HH
index 8ecb9a55a22bcb0797068b6b20912bee44102b8e..55aaebe5d613657e2a7f2c1f521ecf3a12a60541 100644 (file)
@@ -23,7 +23,6 @@ class Rhythmic_req  : public virtual Request  {
 public:
   Duration duration_;
 
-
   bool do_equal_b (Request const*) const;
   void compress (Moment);
   virtual Moment length_mom () const;
@@ -40,8 +39,9 @@ public:
 struct Tremolo_req : public Request {
   VIRTUAL_COPY_CONS (Music);
   Tremolo_req ();
-  int type_i_;
 
+  void set_type (int);
+  int get_type () const;
 };
 
 
@@ -58,7 +58,7 @@ protected:
 class Articulation_req : public Script_req
 {
 public:
-  String articulation_str_;
+  String get_articulation_str();
 protected:
   virtual bool do_equal_b (Request const*) const;
 
@@ -106,14 +106,17 @@ struct Bass_req : public Melodic_req
   VIRTUAL_COPY_CONS (Music);
 };
 
-/// Put a note of specified type, height, and with accidental on the staff.
-class Note_req  : public Rhythmic_req, virtual public Melodic_req  {
-public:
-    
-  /// force/supress printing of accidental.
+/*
+   Put a note of specified type, height, and with accidental on the staff.
+    /// force/supress printing of accidental.
   bool forceacc_b_;
   /// Cautionary, i.e. parenthesized accidental.
   bool cautionary_b_;
+
+ */
+class Note_req  : public Rhythmic_req, virtual public Melodic_req  {
+public:
+    
   Note_req();
 protected:
 
index 1c91b340f29887e58dd26a4161dba7c8a87ab6d0..cccfaaa1d3700f312b7d0f260df598c34f1805ee 100644 (file)
@@ -17,7 +17,7 @@ class Part_combine_music : public Music
 {
 public:
   VIRTUAL_COPY_CONS (Music);
-  Part_combine_music (String, Music*, Music*);
+  Part_combine_music (SCM what_str, Music*, Music*);
 
   Music * first_l () const;
   Music * second_l () const;
@@ -27,8 +27,6 @@ public:
   virtual Moment length_mom () const;
   virtual Musical_pitch to_relative_octave (Musical_pitch);
   virtual void compress (Moment);
-
-  String what_str_;
 };
 
 #endif /* PART_COMBINE_MUSIC_HH */
index f5ab252a5284ffc640a302a3b2ea378d543c96fd..e05332a7c9233a778c9beacf4a5d57c1212b9562 100644 (file)
@@ -53,7 +53,8 @@ public:
 */
 class Span_req  : public virtual Request  {
 public:
-  String span_type_str_;
+  String get_span_type_str () const;
+  void set_span_type_str (String);
   void set_span_dir (Direction d);
   Direction get_span_dir () const;  
   
diff --git a/lily/include/score-element-callback.hh b/lily/include/score-element-callback.hh
deleted file mode 100644 (file)
index fe58851..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-/*   
-  score-element-callback.hh -- declare Score_element callbacks
-  
-  source file of the GNU LilyPond music typesetter
-  
-  (c) 2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-  
- */
-
-#ifndef SCORE_ELEMENT_CALLBACK_HH
-#define SCORE_ELEMENT_CALLBACK_HH
-
-#include "lily-proto.hh"
-#include "lily-guile.hh"
-
-typedef SCM (* Score_element_callback) (Score_element * ,  SCM extra_params);
-SCM smobify_callback (Score_element_callback cb);
-
-
-#endif /* SCORE_ELEMENT_CALLBACK_HH */
-
index 59e4a49e5290406cc754b203a60b0b35d4952086..424a182932976f093dffb25dee832f73a39b55f7 100644 (file)
@@ -100,7 +100,7 @@ public:
   virtual void discretionary_processing ();
   virtual SCM do_derived_mark ();
 
-  Molecule get_molecule () const;
+  Molecule get_molecule () const;
   void suicide ();
   
   DECLARE_SCHEME_CALLBACK(preset_extent, (SCM smob, SCM axis));
index 2bc9024dfe955b9057e1659597417d10af599579..9fc51e1161a1da006614ab52bf039eb41c2f96a1 100644 (file)
@@ -130,7 +130,7 @@ Key_item::brew_molecule (SCM smob)
         }
     }
 
-  return mol.create_scheme();
+  return mol.smobbed_copy();
 }
 
 
index 87ad033329578da9aad0643d6a48bcbf6625e1aa..7f56dbcf3e73575c67ca34829d0a0a7dea100cdd 100644 (file)
@@ -437,3 +437,19 @@ ly_deep_copy (SCM l)
 }
 
 
+
+
+SCM
+ly_assoc_chain (SCM key, SCM achain)
+{
+  if (gh_pair_p (achain))
+    {
+      SCM handle = scm_assoc (key, gh_car (achain));
+      if (gh_pair_p (handle))
+       return handle;
+      else
+       return ly_assoc_chain (key, gh_cdr (achain));
+    }
+  else
+    return SCM_BOOL_F;
+}
index 14a37b1d234251c55b1234cf8ae0cc3f7ad94771..bb79f780a075a7ec68009d4c42bd3a0b24089743 100644 (file)
@@ -305,8 +305,9 @@ Line_of_score::post_processing (bool last_line)
 
     (ugh. This is not very memory efficient.)  */
   for (SCM s = get_elt_property ("all-elements"); gh_pair_p (s); s = gh_cdr (s))
-    unsmob_element (gh_car (s))->get_molecule ();
-  
+    {
+      unsmob_element (gh_car (s))->get_molecule ();
+    }
   /*
     font defs;
    */
@@ -327,8 +328,10 @@ Line_of_score::post_processing (bool last_line)
    */ 
   for (SCM s = get_elt_property ("all-elements"); gh_pair_p (s); s = gh_cdr (s))
     {
-      Score_element * sc =  unsmob_element (gh_car (s));
-      Molecule m = sc->get_molecule ();
+      Score_element *sc = unsmob_element (gh_car (s));
+      Molecule *m = sc->get_molecule ();
+      if (!m)
+       continue;
       
       Offset o (sc->relative_coordinate (this, X_AXIS),
                sc->relative_coordinate (this, Y_AXIS));
@@ -337,10 +340,10 @@ Line_of_score::post_processing (bool last_line)
       if (gh_pair_p (e))
        {
          o[X_AXIS] += gh_scm2double (gh_car (e));
-         o[Y_AXIS] +=  gh_scm2double (gh_cdr (e));      
+         o[Y_AXIS] += gh_scm2double (gh_cdr (e));      
        }
 
-      output_molecule (m.get_expr (), o);
+      output_molecule (m->get_expr (), o);
     }
   if (last_line)
     {
index 685f6c0f37254121c8afb055b76e87ab21e97e7d..115a5d3a60fcbd24faf229f668b31a04d4f5ab8b 100644 (file)
@@ -98,7 +98,8 @@ Local_key_engraver::process_acknowledged ()
          bool different = prev_acc != a;
          
          bool tie_changes = tied_l_arr_.find_l (support_l) && different;
-         if ((note_l->forceacc_b_ || different) && !tie_changes)
+         if ((to_boolean (note_l->get_mus_property ("force-accidental"))
+             || different) && !tie_changes)
            {
              if (!key_item_p_) 
                {
@@ -117,7 +118,7 @@ Local_key_engraver::process_acknowledged ()
                && abs(prev_acc) == 2;
 
              Local_key_item::add_pitch (key_item_p_, note_l->pitch_,
-                                        note_l->cautionary_b_,
+                                        to_boolean (note_l->get_mus_property ("cautionary")),
                                         extra_natural);
              Side_position::add_support (key_item_p_,support_l);
            }
index 69314d50fd74864b0e0879b0a44f070dea3e2347..1b37fb22a3d8c80e36f57f0b42b43d6b32249e93 100644 (file)
@@ -159,7 +159,7 @@ Local_key_item::brew_molecule (SCM smob)
       } while ( flip (&d)!= LEFT);
     }
 
-  return mol.create_scheme();
+  return mol.smobbed_copy();
 }
 
 bool
index cd207ce9cab7505cbac703bbca386f355b83a222..7de58843b4a0b321ac29cc292fa95acfcde7daab 100644 (file)
@@ -43,7 +43,7 @@ Lyric_extender::brew_molecule (SCM smob)
   Real h = sl * gh_scm2double (sp->get_elt_property  ("height"));
   Molecule  mol (Lookup::filledbox ( Box (Interval (0,w), Interval (0,h))));
   mol.translate (Offset (leftext, 0));
-  return mol.create_scheme();
+  return mol.smobbed_copy();
 }
 
 void
index fa83fc6a6c49bc4dd0259c1d979bbfa07bfeb8a9..e135b6b3fc07efd113c30d3b27602001c5e161fd 100644 (file)
 #include "debug.hh"
 #include "killing-cons.tcc"
 
+#include "ly-smobs.icc"
+
+
+SCM
+Molecule::smobbed_copy () const
+{
+  Molecule * m = new Molecule(*this);
+
+  return m->smobbed_self ();
+}
+
 Interval
 Molecule::extent(Axis a) const
 {
@@ -143,34 +154,38 @@ Molecule::get_expr () const
   return expr_;
 }
 
-Molecule
-create_molecule (SCM scm_mol)
-{
-  if (!gh_pair_p (scm_mol))
-    return Molecule ();
 
-  SCM exp = gh_car (scm_mol);
-  scm_mol = gh_cdr (scm_mol);
-  Box b ;
-  if (gh_pair_p (scm_mol))
-    {
-      Interval i1 = ly_scm2interval (gh_car (scm_mol));
-      Interval i2 = ly_scm2interval (gh_cdr (scm_mol));  
-      b = Box (i1,i2);
-    }
-  return Molecule (b, exp);
+
+Box
+Molecule::extent_box () const
+{
+  return dim_;
 }
+IMPLEMENT_SIMPLE_SMOBS(Molecule);
 
-SCM
-Molecule::create_scheme () const
+
+int
+Molecule::print_smob (SCM s, SCM port, scm_print_state *)
 {
-  return gh_cons (expr_,
-                 gh_cons (ly_interval2scm (dim_[X_AXIS]),
-                          ly_interval2scm (dim_[Y_AXIS])));
+  Molecule  *r = (Molecule *) gh_cdr (s);
+     
+  scm_puts ("#<Molecule ", port);
+  /*  String str(r->str());
+  scm_puts ((char *)str.ch_C(), port);*/
+  scm_puts (" >", port);
+  
+  return 1;
 }
 
-Box
-Molecule::extent_box () const
+  
+SCM
+Molecule::mark_smob (SCM s)
 {
-  return dim_;
+  Molecule  *r = (Molecule *) gh_cdr (s);
+  
+  return r->expr_;
 }
+
+IMPLEMENT_TYPE_P(Molecule, "molecule?");
+IMPLEMENT_DEFAULT_EQUAL_P(Molecule);
+IMPLEMENT_UNSMOB(Molecule, molecule);
index f8d23f7906c2306262731a1d5d4f7dfbec49f1d1..228ab780c957f61fbab70b1fb3f14fe4152317c5 100644 (file)
@@ -73,7 +73,9 @@ Multi_measure_rest_engraver::do_try_music (Music* req_l)
 {
   if (Span_req * sp = dynamic_cast<Span_req*> (req_l))
     {
-      if (sp->span_type_str_ == "rest")
+      
+      if (scm_equal_p (sp->get_mus_property ("span-type"),
+                      ly_str02scm ("rest")))
        {
          if (sp->get_span_dir() == STOP)
            {
index 16c6a56e578fd098bced3bec8faf6aacae1676d7..c6e143d3299e3ce666e8b48592761628810bd637 100644 (file)
@@ -150,7 +150,7 @@ Multi_measure_rest::brew_molecule (SCM smob)
       mol.add_molecule (s);
     }
   mol.translate_axis (x_off, X_AXIS);
-  return mol.create_scheme();
+  return mol.smobbed_copy();
 }
 
 /*
diff --git a/lily/music-iterator-ctor.cc b/lily/music-iterator-ctor.cc
new file mode 100644 (file)
index 0000000..0af9158
--- /dev/null
@@ -0,0 +1,54 @@
+/*   
+  score-element-callback.cc --  implement Callback smob.
+  
+  source file of the GNU LilyPond music typesetter
+  
+  (c) 2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  
+ */
+
+#include "music-iterator-ctor.hh"
+
+static long callback_tag;
+
+static
+SCM mark_smob (SCM)
+{
+  return SCM_EOL;
+}
+
+static int
+print_smob (SCM, SCM port, scm_print_state *)
+{
+  scm_puts ("#<encapsulated C++ function>", port);
+  return 1;
+}
+
+static
+scm_sizet free_smob (SCM)
+{
+  return 0;
+}
+
+static
+void start_callback_smobs()
+{
+  callback_tag = scm_make_smob_type_mfpe ("callback", 0,
+                                         mark_smob, free_smob,
+                                         print_smob, 0);
+}
+
+SCM
+smobify_callback (Cpp_function cb )
+{
+  SCM z;
+  
+  SCM_NEWCELL(z);
+  SCM_SETCDR (z, (SCM)cb);
+  SCM_SETCAR (z, (SCM)callback_tag);
+
+  return z;
+}
+  
+ADD_SCM_INIT_FUNC(callback, start_callback_smobs);
+
index 6cadceb906db71c07e61bd0c80469ffa37e55973..0e7ad15a80894af38fd00ffed4d7ee07ae0aebc6 100644 (file)
@@ -14,7 +14,6 @@
 
 Tremolo_req::Tremolo_req ()
 {
-  type_i_ = 0;
 }
 
 
@@ -83,8 +82,6 @@ Note_req::do_equal_b (Request const* r) const
 
 Note_req::Note_req ()
 {
-  cautionary_b_ = false;
-  forceacc_b_ = false;
 }
 
 
@@ -117,7 +114,7 @@ Articulation_req::do_equal_b (Request const* r) const
 {
   Articulation_req const* a = dynamic_cast<Articulation_req const*> (r);
   
-  return a &&  articulation_str_ == a->articulation_str_;
+  return a; //  &&  articulation_str_ == a->articulation_str_;
 }
 
 
index 3bfe6ad551fd4a5db17be1456fc22df3f4861361..2d9b47806ed2e8287a201608eb5b3f4aab9af684 100644 (file)
@@ -101,7 +101,7 @@ Note_head::brew_molecule (SCM smob)
          out.add_molecule (s);
        }
     }
-  return out.create_scheme();
+  return out.smobbed_copy();
 }
 
 bool
index e3026961200be8a7eab8801f0b8be6db1b402709..76d6d7e1696848d414a0d474d7138c3c455b2acb 100644 (file)
@@ -593,7 +593,8 @@ music_output_def_body:
                        junk this ? there already is tempo stuff in
                        music.
                */
-               dynamic_cast<Midi_def*> ($$)->set_tempo ($2->dur_.length_mom (), $2->metronome_i_);
+               int m = gh_scm2int ( $2->get_mus_property ("metronome-count")); 
+               dynamic_cast<Midi_def*> ($$)->set_tempo ($2->dur_.length_mom (), m);
        }
        | music_output_def_body error {
 
@@ -605,7 +606,7 @@ tempo_request:
                $$ = new Tempo_req;
                $$->dur_ = *$2;
                delete $2;
-               $$-> metronome_i_ = $4;
+               $$-> set_mus_property ("metronome-count", gh_int2scm ( $4));
        }
        ;
 
@@ -823,7 +824,7 @@ re_rhythmed_music:
 
 part_combined_music:
        PARTCOMBINE STRING Music Music {
-               Part_combine_music * p = new Part_combine_music (ly_scm2string ($2), $3, $4);
+               Part_combine_music * p = new Part_combine_music ($2, $3, $4);
                $$ = p;
        }
        ;
@@ -946,14 +947,14 @@ shorthand_command_req:
        | '['           {
                Span_req*b= new Span_req;
                b->set_span_dir(START);
-               b->span_type_str_ = "beam";
+               b->set_mus_property ("span-type", ly_str02scm ("beam"));
                $$ =b;
        }
        | ']'           {
-            Span_req*b= new Span_req;
-            b->set_span_dir( STOP);
-            b->span_type_str_ = "beam";
-            $$ = b;
+               Span_req*b= new Span_req;
+               b->set_span_dir( STOP);
+               b->set_mus_property ("span-type", ly_str02scm ("beam"));
+               $$ = b;
        }
        | BREATHE {
                $$ = new Breathing_sign_req;
@@ -969,7 +970,7 @@ verbose_command_req:
        | COMMANDSPANREQUEST bare_int STRING {
                Span_req * sp_p = new Span_req;
                sp_p-> set_span_dir ( Direction($2));
-               sp_p->span_type_str_ = ly_scm2string ($3);
+               sp_p->set_mus_property ("span-type",$3);
                sp_p->set_spot (THIS->here_input ());
                $$ = sp_p;
        }
@@ -991,13 +992,13 @@ verbose_command_req:
 
        | TIME_T bare_unsigned '/' bare_unsigned        {
                Time_signature_change_req *m = new Time_signature_change_req;
-               m->beats_i_ = $2;
-               m->one_beat_i_=$4;
+               m->set_mus_property ("beats", gh_int2scm ( $2));
+               m->set_mus_property ("one-beat", gh_int2scm ($4));
                $$ = m;
        }
        | PENALTY bare_int      {
                Break_req * b = new Break_req;
-               b->penalty_f_ = $2 / 100.0;
+               b->set_mus_property ("penalty", gh_double2scm ( $2 / 100.0));
                b->set_spot (THIS->here_input ());
                $$ = b;
        }
@@ -1011,7 +1012,8 @@ verbose_command_req:
                $$ = $1;
        }
        | CLEF STRING {
-               $$ = new Clef_change_req (ly_scm2string ($2));
+               $$ = new Clef_change_req;
+               $$->set_mus_property ("clef-type", $2);
 
        }
        | KEY {
@@ -1051,7 +1053,7 @@ request_that_take_dir:
                SCM s = THIS->lexer_p_->lookup_identifier ("dash-" + ly_scm2string ($1));
                Articulation_req *a = new Articulation_req;
                if (gh_string_p (s))
-                       a->articulation_str_ = ly_scm2string (s);
+                       a->set_mus_property ("articulation-type", s);
                else THIS->parser_error (_ ("Expecting string as script definition"));
                $$ = a;
        }
@@ -1091,19 +1093,19 @@ verbose_request:
        | SPANREQUEST bare_int STRING {
                Span_req * sp_p = new Span_req;
                sp_p->set_span_dir( Direction($2));
-               sp_p->span_type_str_ = ly_scm2string ($3);
+               sp_p->set_mus_property ("span-type", $3);
                sp_p->set_spot (THIS->here_input ());
                $$ = sp_p;
        }
        | tremolo_type  {
                Tremolo_req* a = new Tremolo_req;
                a->set_spot (THIS->here_input ());
-               a->type_i_ = $1;
+               a->set_mus_property ("tremolo-type", gh_int2scm ($1));
                $$ = a;
        }
        | SCRIPT STRING         { 
                Articulation_req * a = new Articulation_req;
-               a->articulation_str_ = ly_scm2string ($2);
+               a->set_mus_property ("articulation-type", $2);
                a->set_spot (THIS->here_input ());
                $$ = a;
        }
@@ -1213,17 +1215,17 @@ close_request_parens:
        '('     {
                Span_req* s= new Span_req;
                $$ = s;
-               s->span_type_str_ = "slur";
+               s->set_mus_property ("span-type", ly_str02scm( "slur"));
        }
        | E_SMALLER {
                Span_req*s =new Span_req;
                $$ = s;
-               s->span_type_str_ = "crescendo";
+               s->set_mus_property ("span-type", ly_str02scm ( "crescendo"));
        }
        | E_BIGGER {
                Span_req*s =new Span_req;
                $$ = s;
-               s->span_type_str_ = "decrescendo";
+               s->set_mus_property ("span-type", ly_str02scm ("decrescendo"));
        }
        ;
 
@@ -1231,20 +1233,21 @@ close_request_parens:
 open_request:
        open_request_parens {
                $$ = $1;
-               dynamic_cast<Span_req*> ($$)->set_span_dir ( STOP);
+               dynamic_cast<Span_req*> ($$)->set_span_dir (STOP);
        }
        ;
 
 open_request_parens:
        E_EXCLAMATION   {
                Span_req *s =  new Span_req;
-               s->span_type_str_ = "crescendo";
+               s->set_mus_property ("span-type", ly_str02scm ( "crescendo"));
+
                $$ = s;
        }
        | ')'   {
                Span_req* s= new Span_req;
                $$ = s;
-               s->span_type_str_ = "slur";
+               s->set_mus_property ("span-type", ly_str02scm( "slur"));
        }
        ;
 
@@ -1383,8 +1386,10 @@ simple_element:
                n->pitch_ = *$1;
                n->duration_ = *$4;
 
-               n->cautionary_b_ = $3 % 2;
-               n->forceacc_b_ = $2 % 2 || n->cautionary_b_;
+               if ($3 % 2)
+                       n->set_mus_property ("cautionary", SCM_BOOL_T);
+               if ( $2 % 2 || $3 % 2)
+                       n->set_mus_property ("force-accidental", SCM_BOOL_T);
 
 
                Simultaneous_music*v = new Request_chord (gh_list (n->self_scm (), SCM_UNDEFINED));
@@ -1428,7 +1433,9 @@ simple_element:
                Span_req *sp2 = new Span_req;
                sp1-> set_span_dir ( START);
                sp2-> set_span_dir ( STOP);
-               sp1->span_type_str_ = sp2->span_type_str_ = "rest";
+               SCM r = ly_str02scm ("rest");
+               sp1->set_mus_property ("span-type", r);
+               sp2->set_mus_property ("span-type", r);
 
                Request_chord * rqc1 = new Request_chord (gh_list (sp1->self_scm (), SCM_UNDEFINED));
                Request_chord * rqc2 = new Request_chord (gh_list (sk->self_scm (), SCM_UNDEFINED));;
index 498f0fc831fe7f3309031437046c6d6a91ac07c9..68e41dce09a59ed6470a76388f092bb58849da8c 100644 (file)
@@ -128,7 +128,11 @@ Part_combine_music_iterator::get_state (Moment)
 {
   int state = UNKNOWN;
   Part_combine_music const *p = dynamic_cast<Part_combine_music const* > (music_l_);
-  Translator_group *first_translator = first_iter_p_->report_to_l ()->find_create_translator_l (p->what_str_, "one" + suffix_);
+
+  String w = ly_scm2string (p->get_mus_property ("what"));
+    
+  
+  Translator_group *first_translator = first_iter_p_->report_to_l ()->find_create_translator_l (w, "one" + suffix_);
 
   SCM s = first_translator->get_property (ly_symbol2scm ("changeMoment"));
   if (!gh_pair_p (s))
@@ -284,6 +288,8 @@ Part_combine_music_iterator::get_state (Moment)
   return state;
 }
 
+static Span_req* abort_req = NULL;
+
 void
 Part_combine_music_iterator::process (Moment m)
 {
@@ -328,29 +334,25 @@ Part_combine_music_iterator::process (Moment m)
   /*
     When combining, abort all running spanners
    */
+
+  if (!abort_req)
+    {
+      abort_req = new Span_req;
+      abort_req->set_mus_property ("span-type", ly_str02scm ("abort"));
+    }
+  
   if (combine_b && combine_b != previously_combined_b)
     {
-#if 0
-      // Urg: Error in unknown function during GC: rogue pointer in heap
-      // Who deletes this 'pointer'?
-      Span_req abort;
-      abort.span_type_str_ = "abort";
       if (second_iter_p_ && second_iter_p_->ok ())
-       second_translator->try_music (&abort);
-#else
-      Span_req* abort = new Span_req;
-      abort->span_type_str_ = "abort";
-      if (second_iter_p_ && second_iter_p_->ok ())
-       second_iter_p_->try_music (abort);
-#endif
+       second_iter_p_->try_music (abort_req);
      }
-
+  String w = ly_scm2string (p->get_mus_property ("what"));
   if (combine_b != previously_combined_b)
-    change_to (second_iter_p_, p->what_str_, (combine_b ? "one" : "two")
+    change_to (second_iter_p_, w, (combine_b ? "one" : "two")
               + suffix_);
 
-  Translator_group *first_translator = first_iter_p_->report_to_l ()->find_create_translator_l (p->what_str_, "one" + suffix_);
-  Translator_group *second_translator = second_iter_p_->report_to_l ()->find_create_translator_l (p->what_str_, "two" + suffix_);
+  Translator_group *first_translator = first_iter_p_->report_to_l ()->find_create_translator_l (w, "one" + suffix_);
+  Translator_group *second_translator = second_iter_p_->report_to_l ()->find_create_translator_l (w, "two" + suffix_);
 
   /*
     hmm
index 155f2de24cd102cf7e66ec4cb21671191c3f01c8..1375f8d06fddf8fdc16e949bee6b2557a99ad224 100644 (file)
 #include "part-combine-music.hh"
 #include "musical-pitch.hh"
 
-Part_combine_music::Part_combine_music (String what, Music * f, Music * s)
+Part_combine_music::Part_combine_music (SCM  what, Music * f, Music * s)
 {
-  what_str_ = what;
+  assert (gh_string_p (what));
+  set_mus_property ("what", what);
   set_mus_property ("one", f->self_scm ());
   set_mus_property ("two", s->self_scm ());  
 
index 667b3fc497b6dc11e75d608b6d92c9c71b76e1a8..a510a141ff5835205df2d15eff4e7b0d2645d34c 100644 (file)
@@ -118,7 +118,8 @@ Piano_pedal_engraver::do_try_music (Music *m)
     {
       for (Pedal_info*p = info_list_; p->name_; p ++)
        {
-         if (s->span_type_str_ == p->name_)
+         if (scm_equal_p (s->get_mus_property ("span-type"),
+                          ly_str02scm (p->name_))==SCM_BOOL_T)
            {
              p->req_l_drul_[s->get_span_dir()] = s;
              return true;
index 9bd045aed87b11af6750441ebefe268173c8a63c..a3c8fb482939688686cbf16b7335e218d40fc159 100644 (file)
@@ -132,7 +132,8 @@ Piano_pedal_performer::do_try_music (Music* r)
     {
       for (Pedal_info*p = info_alist_; p->name_; p ++)
        {
-         if (s->span_type_str_ == String (p->name_))
+         if (scm_equal_p (s->get_mus_property ("span-type"),
+                          ly_str02scm (p->name_)) == SCM_BOOL_T)
            {
              p->req_l_drul_[s->get_span_dir()] = s;
              return true;
index da9caf8f4ade57368e139b0663b05c3d5f60aa6e..a6a945cd78c21013745e009a2a5ab0abad68208e 100644 (file)
@@ -64,7 +64,7 @@ Rest::brew_molecule (SCM smob)
   String idx =  ("rests-") + to_str (gh_scm2int (balltype))
     + (ledger_b ? "o" : "") + style;
 
-  return Font_interface::get_default_font (me)->find_by_name (idx).create_scheme();
+  return Font_interface::get_default_font (me)->find_by_name (idx).smobbed_copy();
 }
 
 
index fbd44eb4f4e7a4b65d36826d72edd829f82c6fac..5928d8b874d3fe17725a2bfedc22d3a478b57ff6 100644 (file)
@@ -182,8 +182,11 @@ Score_element::molecule_extent (SCM element_smob, SCM scm_axis)
   Score_element *s = unsmob_element (element_smob);
   Axis a = (Axis) gh_scm2int (scm_axis);
 
-  Molecule m = s->get_molecule ();
-  return ly_interval2scm ( m.extent(a));
+  Molecule *m = s->get_molecule ();
+  Interval e ;
+  if (m)
+    e = m->extent(a);
+  return ly_interval2scm ( e);
 }
 
 MAKE_SCHEME_CALLBACK(Score_element,preset_extent,2);
@@ -248,16 +251,23 @@ Score_element::calculate_dependencies (int final, int busy, SCM funcname)
 
 }
 
-Molecule
+Molecule *
 Score_element::get_molecule ()  const
 {
+  SCM mol = get_elt_property ("molecule");
+  if (unsmob_molecule (mol))
+    return unsmob_molecule (mol);
+  
   SCM proc = get_elt_property ("molecule-callback");
 
-  SCM mol = SCM_EOL;
+  mol = SCM_EOL;
   if (gh_procedure_p (proc)) 
     mol = gh_apply (proc, gh_list (this->self_scm (), SCM_UNDEFINED));
 
-    
+  
+  /*
+    TODO: add option for not copying origin info. 
+   */
   SCM origin =get_elt_property ("origin");
   if (!unsmob_input (origin))
     origin =ly_symbol2scm ("no-origin");
@@ -268,15 +278,19 @@ Score_element::get_molecule ()  const
        mol = gh_cons (gh_list (origin, gh_car (mol), SCM_UNDEFINED), gh_cdr (mol));
     }
 
+  Molecule *m = unsmob_molecule (mol);
 
-  Molecule m (create_molecule (mol));
-
+  
   /*
     transparent retains dimensions of element.
    */
-  if (to_boolean (get_elt_property ("transparent")))
-    m = Molecule (m.extent_box (), SCM_EOL);
+  if (m && to_boolean (get_elt_property ("transparent")))
+    mol = Molecule (m->extent_box (), SCM_EOL).smobbed_copy ();
 
+  Score_element *me = (Score_element*)this;
+  me->set_elt_property ("molecule", mol);
+  
+  m = unsmob_molecule (mol);  
   return m;
 }
 
index 187f1b689ab08c8d4c4bbd5a8f1b601d465c8f4d..67801e884c1060aacf83ce30a521a446bdd8692c 100644 (file)
@@ -236,8 +236,11 @@ Score_engraver::do_try_music (Music*r)
            ? gh_scm2double(pen)
            : 0.0;
 
-         total_penalty += b->penalty_f_;
-         if (b->penalty_f_ > 10000.0) //  ugh. arbitrary.
+         SCM rpen = b->get_mus_property ("penalty");
+         if (gh_number_p (rpen))
+           total_penalty +=  gh_scm2double (rpen);
+         
+         if (total_penalty > 10000.0) //  ugh. arbitrary.
            forbid_breaks ();
 
          command_column_l_->set_elt_property ("penalty",
index 8474f757226c986eca56a096a2bc23be62bdcf76..7490bb68f99bd4a8729b5223452c8134271bd94f 100644 (file)
@@ -58,12 +58,13 @@ Script_engraver::do_process_music()
       Articulation_req* l=script_req_l_arr_[i];
 
       SCM alist = get_property ("scriptDefinitions");
-      SCM list = scm_assoc (ly_str02scm (l->articulation_str_.ch_C ()), alist);
+      SCM list = scm_assoc (l->get_mus_property ("articulation-type"), alist);
 
       if (list == SCM_BOOL_F)
        {
-         l->origin ()->warning (_f ("Don't know how to interpret articulation `%s'",
-                       l->articulation_str_.ch_C ()));
+         String a = ly_scm2string (l->get_mus_property ("articulation-type"));
+         l->origin ()->warning (_f ("Don't know how to interpret articulation `%s'", a.ch_C()));
+                       
          continue;
        }
       // todo -> use result of articulation-to-scriptdef directly as basic prop list.
index 9670115c55ebf922c7a903825fe73d6d310edd4d..432515c89a0960c7a9dad407d5a7c92c8a8338d8 100644 (file)
@@ -56,12 +56,14 @@ SCM
 Script::brew_molecule (SCM smob)
 {
   Score_element *me= unsmob_element (smob);
-//   Direction dir = DOWN;
-//   SCM d = me->get_elt_property ("direction");
-//   if (isdir_b (d))
-//     dir = to_dir (d);
+#if 0
+   Direction dir = DOWN;
+   SCM d = me->get_elt_property ("direction");
+   if (isdir_b (d))
+     dir = to_dir (d);
+#endif
   Direction dir = Side_position::get_direction(me);
-  return get_molecule (me, dir).create_scheme();
+  return get_molecule (me, dir).smobbed_copy();
 }
 
 bool
index d59cbbe23318ccb6229b960a557fd739b1548c77..d159020b82e1e47a7c16dd1f154788e65aa777f4 100644 (file)
@@ -46,7 +46,8 @@ Slur_engraver::do_try_music (Music *req_l)
 {
   if (Span_req *sl = dynamic_cast <Span_req *> (req_l))
     {
-      if (sl->span_type_str_ == "abort")
+      String t =  ly_scm2string (sl->get_mus_property ("span-type"));
+      if (t == "abort")
        {
          for (int i = 0; i < slur_l_stack_.size (); i++)
            {
@@ -61,7 +62,7 @@ Slur_engraver::do_try_music (Music *req_l)
          requests_arr_.clear ();
          new_slur_req_l_arr_.clear ();
        }
-      else if (sl->span_type_str_ == "slur")
+      else if (t == "slur")
        {
          /*
            Let's not start more than one slur per moment.
index b7b0c687695c594ba27a696fbb9dd4d5e77459b1..887df0ea65f0d8bb8c2c250078ab99e472ca8f81 100644 (file)
@@ -526,7 +526,7 @@ Slur::brew_molecule (SCM smob)
   else
     a = Lookup::slur (one, Directional_element_interface::get (me) * thick, thick);
 
-  return a.create_scheme();
+  return a.smobbed_copy();
 }
 
 void
index ccf0d0823465c4e1067235aeab16cfa62d50ebb7..1775f2681afe7c93582405f782553babdbe7e6ff 100644 (file)
@@ -98,8 +98,8 @@ Span_dynamic_performer::do_process_music ()
 
   if (span_req_l_drul_[START])
     {
-      dir_ = span_req_l_drul_[START]->span_type_str_ == "crescendo"
-       ? RIGHT : LEFT;
+      String t = ly_scm2string (span_req_l_drul_[START]->get_mus_property ("span-type"));
+      dir_ = (t == "crescendo")        ? RIGHT : LEFT;
       span_start_req_l_ = span_req_l_drul_[START];
       
       dynamic_tuple_arr_.clear ();
@@ -180,8 +180,8 @@ Span_dynamic_performer::do_try_music (Music* r)
 {
   if (Span_req * s = dynamic_cast<Span_req*>(r))
     {
-      if (s-> span_type_str_ == "crescendo"
-         || s->span_type_str_ == "decrescendo")
+      String t =  ly_scm2string (s->get_mus_property ("span-type"));      
+      if (t == "crescendo" || t == "decrescendo")
        {
          span_req_l_drul_[s->get_span_dir()] = s;
          return true;
index e7754b799b40284ba29feb9bf1a37e1e37007d5a..f8ebefe16faf2f840a5acfaf4bd2ae27cc431728 100644 (file)
@@ -48,7 +48,7 @@ Staff_symbol::brew_molecule (SCM smob)
       m.add_molecule (a);
     }
 
-  return m.create_scheme();
+  return m.smobbed_copy ();
 }
 
 int
index f348697f559827866db1e1e5073778badde126aa..caebede28bb60e1a2e91e6947fbae7a01f6e5337 100644 (file)
@@ -80,7 +80,8 @@ Stem_engraver::acknowledge_element(Score_element_info i)
 
                the first and last (quarter) note bothe get one tremolo flag.
               */
-             int requested_type = tremolo_req_l_->type_i_;
+             int requested_type = gh_scm2int (tremolo_req_l_->get_mus_property ("tremolo-type"));
+             
              SCM f = get_property ("tremoloFlags");
              if (!requested_type && gh_number_p (f))
                requested_type = gh_scm2int (f);
index 0f3e0143756c9d3e58b57a98a43fc3786390293e..45fe3dba7d5596478f8a1511bfb8aceeae2e414f 100644 (file)
@@ -138,7 +138,7 @@ Stem_tremolo::brew_molecule (SCM smob)
                             whole_note_correction, dy));
     }
   
-  return mol.create_scheme();
+  return mol.smobbed_copy ();
 }
 
 
index eaf2cb5a6f9c9f69f81a882610546141f6fd5537..94ddf6ca933bb6579353d0cb467a08648fe70364 100644 (file)
@@ -478,7 +478,7 @@ Stem::brew_molecule (SCM smob)
       mol.add_molecule (fl);
     }
 
-  return mol.create_scheme();
+  return mol.smobbed_copy ();
 }
 
 MAKE_SCHEME_CALLBACK(Stem,off_callback,2);
index 29df9ec87bc780224354ac6dfa2014bf1925b093..39e6499a1728db892e191fe4de681779737f5c27 100644 (file)
@@ -43,7 +43,7 @@ Sustain_pedal::brew_molecule (SCM smob)
   Molecule mol;
   SCM glyph = e->get_elt_property ("text");
   if (!gh_string_p (glyph))
-    return mol.create_scheme();
+    return mol.smobbed_copy ();
   String text = ly_scm2string (glyph);
 
   for (int i = 0; i < text.length_i (); i++)
@@ -61,6 +61,6 @@ Sustain_pedal::brew_molecule (SCM smob)
        mol.add_at_edge (X_AXIS, RIGHT, m, 0);
     }
     
-  return mol.create_scheme ();
+  return mol.smobbed_copy ();
 }
 
index ed801f2fefbb15a967eedb4dbe264bf66d961a13..dc0d329d24c5016bfdcaab9d578a1397e5a144c0 100644 (file)
@@ -60,15 +60,15 @@ symbol (const char*s)
 
   global with binsearch.
 
-
        real    0m19.352s
        user    0m18.710s
        sys     0m0.230s
+
   local binsearch
 
    user 18.8
 
-   local with binsearch, and other optimizations.
+  local with binsearch, and other optimizations.
 
    17.7
 */
index 544492852a2034bf69fde9e6ffea0f3e86da3994..fa961c081a7bee89678a6afc649c019b4e3e4b40 100644 (file)
@@ -111,7 +111,7 @@ System_start_delimiter::brew_molecule (SCM smob)
   
   
   m.translate_axis (ext.center (), Y_AXIS);
-  return m.create_scheme ();
+  return m.smobbed_copy ();
 }
 
 Molecule
index e4066580ca7da4d61d7e0262b7d145b858706a45..1f38e3a80950242fba35eb4ed38b4c5919a23bd7 100644 (file)
@@ -28,9 +28,12 @@ Tempo_performer::do_process_music ()
 {
   if (tempo_req_l_)
     {
+
+      SCM met = tempo_req_l_->get_mus_property ("metronome-count");
       audio_p_ = new Audio_tempo (tempo_req_l_->dur_.length_mom () /
                                  Moment (1, 4) 
-                                 * Moment(tempo_req_l_->metronome_i_));
+                                 * Moment(gh_scm2int (met)));
+
       Audio_element_info info (audio_p_, tempo_req_l_);
       announce_element (info);
       tempo_req_l_ = 0;
index b7cabd16a911797bc02e9b53532513c1019162df..6e159dd3f08c73004471989accf89bcc1f314603 100644 (file)
@@ -67,21 +67,6 @@ Text_item::text2molecule (Score_element *me, SCM text, SCM alist_chain)
     }
   return Molecule ();
 }
-
-SCM
-ly_assoc_chain (SCM key, SCM achain)
-{
-  if (gh_pair_p (achain))
-    {
-      SCM handle = scm_assoc (key, gh_car (achain));
-      if (gh_pair_p (handle))
-       return handle;
-      else
-       return ly_assoc_chain (key, gh_cdr (achain));
-    }
-  else
-    return SCM_BOOL_F;
-}
             
 Molecule
 Text_item::string2molecule (Score_element *me, SCM text, SCM alist_chain)
@@ -210,6 +195,6 @@ Text_item::brew_molecule (SCM smob)
       mol.add_at_edge (X_AXIS, RIGHT, m, gh_scm2double (space)
                       * Staff_symbol_referencer::staff_space (me));
     }
-  return mol.create_scheme (); 
+  return mol.smobbed_copy (); 
 }
 
index fe89e752bc6630db731e334c4307bc895be76451..2b04b01a7d61798673adb36a2054eda73e1cdeb0 100644 (file)
@@ -65,7 +65,8 @@ Text_spanner_engraver::do_try_music (Music *m)
 {
   if (Span_req *s =  dynamic_cast <Span_req*> (m))
     {
-      if (s->span_type_str_ == "abort")
+      String t =  ly_scm2string (s->get_mus_property ("span-type"));            
+      if (t == "abort")
        {
          req_drul_[LEFT] = 0;
          req_drul_[RIGHT] = 0;
@@ -73,7 +74,7 @@ Text_spanner_engraver::do_try_music (Music *m)
            span_->suicide ();
          span_ = 0;
        }
-      else if (s->span_type_str_ == "text")
+      else if (t == "text")
        {
          req_drul_[s->get_span_dir()] = s;
          return true;
index dafd1b975e0f1427c76c0fae190e0243e93f940d..313c0db21b8bae44e86593e4b78ad9523fbf316b 100644 (file)
@@ -189,7 +189,7 @@ Text_spanner::brew_molecule (SCM smob)
     m.add_at_edge (X_AXIS, RIGHT, edge[RIGHT], 0);
   m.translate_axis (broken_left, X_AXIS);
 
-  return m.create_scheme ();
+  return m.smobbed_copy ();
 }
 
 
index 80363adcecefb022f13e272cf536df951c764de2..403b991a3261d9b19a14df49d872fb6c0606ecff 100644 (file)
@@ -327,7 +327,7 @@ Tie::brew_molecule (SCM smob)
   
    Molecule a = Lookup::slur (b, Directional_element_interface::get (me) * thick, thick);
    
-   return a.create_scheme ();
+   return a.smobbed_copy ();
 }
 
 
index 709087e42b416b475487d10c86cff9e1b21cab7b..4c2076fd00fd9c4273338c23e634f401aeaaa76b 100644 (file)
@@ -28,7 +28,10 @@ Time_signature_performer::do_process_music ()
 {
   if (time_signature_req_l_)
     {
-      audio_p_ = new Audio_time_signature (time_signature_req_l_->beats_i_, time_signature_req_l_->one_beat_i_);
+      int b = gh_scm2int (time_signature_req_l_->get_mus_property ("beats"));
+      int o = gh_scm2int (time_signature_req_l_->get_mus_property ("one-beat"));      
+      
+      audio_p_ = new Audio_time_signature (b,o);
       Audio_element_info info (audio_p_, time_signature_req_l_);
       announce_element (info);
       time_signature_req_l_ = 0;
index e6afe98bd224321c2b328c201673f6be3aa20da1..04725d8adc3c5bfb1caac90bce31d1175092717e 100644 (file)
@@ -15,7 +15,9 @@
 #include "font-interface.hh"
 
 MAKE_SCHEME_CALLBACK(Time_signature,brew_molecule,1);
-
+/*
+  TODO: make different functions for special and normal timesigs.
+ */
 SCM
 Time_signature::brew_molecule (SCM smob) 
 {
@@ -36,15 +38,15 @@ Time_signature::brew_molecule (SCM smob)
       String style (ly_scm2string (st));
       if (style[0]=='1')
        {
-         return time_signature (me, n, 0).create_scheme();
+         return time_signature (me, n, 0).smobbed_copy ();
        }
       else
        {
-         return special_time_signature (me, style, n, d).create_scheme();
+         return special_time_signature (me, style, n, d).smobbed_copy ();
        }
     }
   else
-    return time_signature (me, n,d).create_scheme();
+    return time_signature (me, n,d).smobbed_copy ();
 }
 
 Molecule
index b69a614ea046223aeccc86d24bc6123e0779e580..35455683e739ba0b3a9a6d07f32422af7d54036b 100644 (file)
@@ -45,8 +45,13 @@ Timing_translator::do_try_music (Music*r)
        */
       if (Time_signature_change_req *c
          = dynamic_cast <Time_signature_change_req *> (t))
-       set_time_signature (c->beats_i_, c->one_beat_i_);
-    
+       {
+         int b = gh_scm2int (c->get_mus_property ("beats"));
+         int o = gh_scm2int (c->get_mus_property ("one-beat"));      
+         
+         set_time_signature (b, o);
+
+       }
       timing_req_l_arr_.push(t);
       return true;
     }
index 312bb37b9658894cf1f1cb9e6de82d5e916f9d6b..af67ac641c8e22ea16d96f7b9a275e8ffd14e327 100644 (file)
@@ -108,7 +108,7 @@ Tuplet_spanner::brew_molecule (SCM smob)
          mol.add_molecule (Molecule (b, at));
        }
     }
-  return mol.create_scheme();
+  return mol.smobbed_copy ();
 }
 
 
index 93e17d18db96610c277a063c0654cb5448472af3..f334a4c07d7ccdbf5cb15a6136efdabd89d977c1 100644 (file)
@@ -42,7 +42,8 @@ Voice_devnull_engraver::do_try_music (Music *m)
        {
          if (Span_req *s = dynamic_cast <Span_req *> (m))
            {
-             if (s->span_type_str_ == *p)
+             if (scm_equal_p (s->get_mus_property ("span-type"),
+                              ly_str02scm ( *p)) == SCM_BOOL_T)
                {
                  return true;
                }
index 0de67ae6d679a301f634afae50d833764a28ec77..981d1e7629d19162c6fb89dbb7b0c697a6fd6a99 100644 (file)
@@ -92,7 +92,7 @@ Volta_spanner::brew_molecule (SCM smob)
   mol.add_at_edge (X_AXIS, LEFT, num, - num.extent (X_AXIS).length ()
                   - 1.0);
   mol.translate_axis (left, X_AXIS);
-  return mol.create_scheme();
+  return mol.smobbed_copy ();
 }
 
 
index f00a595d06d863465289a579f8efd696fef703b2..eae217f289c028362e378789168ab2909cea1db6 100644 (file)
@@ -1,15 +1,15 @@
 Begin3
 Title: LilyPond
-Version: 1.3.104
-Entered-date: 06NOV00
+Version: 1.3.105
+Entered-date: 09NOV00
 Description: 
 Keywords: music notation typesetting midi fonts engraving
 Author: hanwen@cs.uu.nl (Han-Wen Nienhuys)
        janneke@gnu.org (Jan Nieuwenhuizen)
 Maintained-by: hanwen@stack.nl (Han-Wen Nienhuys)
 Primary-site: sunsite.unc.edu /pub/Linux/apps/sound/convert
-       1000k lilypond-1.3.104.tar.gz 
+       1000k lilypond-1.3.105.tar.gz 
 Original-site: ftp.cs.uu.nl /pub/GNU/LilyPond/development/
-       1000k lilypond-1.3.104.tar.gz 
+       1000k lilypond-1.3.105.tar.gz 
 Copying-policy: GPL
 End
index b3161eaf2360c8571e00027fda8c49fcb08926c1..e8516e9d82ab0aa5a90bdbe66038ed236b17745e 100644 (file)
@@ -1,11 +1,11 @@
 %define info yes
 
 Name: lilypond
-Version: 1.3.104
+Version: 1.3.105
 Release: 1
 License: GPL
 Group: Applications/Publishing
-Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.3.104.tar.gz
+Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.3.105.tar.gz
 Summary: A program for printing sheet music.
 URL: http://www.cs.uu.nl/~hanwen/lilypond
 # Icon: lilypond-icon.gif
index 3d90f422dc5df2fcc33197cf0a31b8867c8f1f0d..e436fb48663c67feb20f216f0252ef2cdd654c10 100644 (file)
@@ -50,6 +50,9 @@
        font-descr-alist)
       )
 
+;; should really have name/pt size at the front of the list.
+;;
+;; (also tried to vary the order of this list, with little effect)
 (define paper20-style-sheet-alist
   '(
     ((3 medium upright number feta-nummer 13) . "feta-nummer13")
        (Large . ((font-series . bold) (font-family . roman) (font-relative-size . 2)))
        (dynamic . ((font-series . bold) (font-family . dynamic) (font-relative-size . 0)))
        ))
-    (properties-to-font . ,properties-to-font-name)
+    (properties-to-font .
+
+                       ,Font_interface::properties_to_font_name)
+                       ; ,properties-to-font-name)
 
     ;; FIXME: this is a not-so-cool idea to use ALIGN
     ;; RAISE, LOOKUP, since they are not proper elt-properties,
index 0af8fa789a7acfa66ede1bff7e5624b80d9e1f93..09a8a72ee6b4d34c8338ec07f3f2619a70192cbf 100644 (file)
 (define no-copies #f)
 
 (let* ((doc (string-append
-            (document-paper "LilyPond interpretation contexts")
-            (document-all-engravers "LilyPond engravers")
-            (document-all-elements "LilyPond backend")
-            (document-all-interfaces "LilyPond interfaces")))
+            (document-paper "LilyPond interpretation contexts")
+            (document-all-engravers "LilyPond engravers")
+            (document-all-elements "LilyPond backend")
+            (document-all-interfaces "LilyPond interfaces"))
+       )
        (name "lilypond-internals")
        (outname (string-append name ".texi"))
        (out (open-output-file outname)))
-    
+
   (writing-wip outname)
   (display 
    (string-append
@@ -49,9 +50,9 @@
        ("LilyPond engravers" . "Engravers create Elements")
        ("LilyPond backend" . "Detailed description of all Elements")
        ("LilyPond interfaces" . "Element Interfaces")))
-     
+    
     doc
     "\n@bye")
-    out))
+   out))
 
 (newline (current-error-port))
index 4bebe73e922919738688b6391d30f78f2693be8c..e8e6cc6162694155764083fa63b5645b4d55a7da 100644 (file)
@@ -139,7 +139,8 @@ endif
 DO_STRIP=true
 LOOP=$(foreach i,  $(SUBDIRS), $(MAKE) PACKAGE=$(PACKAGE) -C $(i) $@ &&) true
 
-ETAGS_FLAGS=-CT
+# different redhat releases need different flags for etags. Just use defaults.
+ETAGS_FLAGS= # -CT
 CTAGS_FLAGS=-h
 
 include $(stepdir)/files.make