]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-1.3.115
authorfred <fred>
Wed, 27 Mar 2002 00:34:17 +0000 (00:34 +0000)
committerfred <fred>
Wed, 27 Mar 2002 00:34:17 +0000 (00:34 +0000)
13 files changed:
lily/include/grace-music.hh
lily/include/part-combine-music.hh
lily/include/relative-music.hh
lily/include/repeated-music.hh
lily/include/time-scaled-music.hh
lily/include/transposed-music.hh
lily/part-combine-music.cc
lily/relative-octave-music.cc
lily/repeated-music.cc
lily/request.cc
lily/time-scaled-music.cc
lily/translator-group.cc
lily/transposed-music.cc

index ed9ab73d9f7b498efaaca12fc673d1f5491c0e72..cc015b5c85c629274ef316cd4e0f5042534b8246 100644 (file)
@@ -16,7 +16,7 @@ class Grace_music : public Music_wrapper
 {
 public:
   VIRTUAL_COPY_CONS(Music);
-  Grace_music (Music*);
+  Grace_music (SCM);
 protected:
   virtual void compress (Moment);
   virtual Moment length_mom () const;
index ed0b560a9f8910758c7ef8715c72cd91b635a47e..4314b864717fd6bd398582e8a6d8486c58608bce 100644 (file)
@@ -17,7 +17,7 @@ class Part_combine_music : public Music
 {
 public:
   VIRTUAL_COPY_CONS (Music);
-  Part_combine_music (SCM what_str, Music*, Music*);
+  Part_combine_music (SCM l);
 
   Music * first_l () const;
   Music * second_l () const;
index 071b34152b420e6652cba95b80d18e69fcb65baf..5a07fbc8a1946932d307e73261667241d0f99b0b 100644 (file)
 class Relative_octave_music : public Music_wrapper
 {
 public:
-  Pitch last_pitch_;
-
-
-  Relative_octave_music (Music*, Pitch);
+  Relative_octave_music (SCM l);
   
   VIRTUAL_COPY_CONS(Music);
   virtual Pitch to_relative_octave (Pitch);
index b2deaee08fa4446f23769b0a9aff0c97aebfcf8b..b7ebb339d8c06ef1fa95dcf2af65b8179f29667a 100644 (file)
@@ -70,8 +70,7 @@ public:
   virtual void compress (Moment factor);
   VIRTUAL_COPY_CONS(Music);
 
-  Repeated_music (Music*, int , Music_sequence*);
-  Repeated_music (Repeated_music const&);
+  Repeated_music (SCM);
 };
 
 
index 21d8e70d87185753f3381fcc6c877a3daa7ac3a5..d184f395d1381ad38e1109c637bb530c26f18c02 100644 (file)
 class Time_scaled_music : public Music_wrapper
 {
 public:
-  int num_i_;
-  int den_i_;
-
-  Time_scaled_music (int, int, Music *);
+  Time_scaled_music (SCM);
   
   VIRTUAL_COPY_CONS(Music);
 };
index 55ff38ff8dcfb26358c5b9f979683cd59765ac0b..641c8a915be895d79beb68b11cd6963680a608f2 100644 (file)
@@ -16,7 +16,7 @@
 class Transposed_music : public Music_wrapper
 {
 public:
-  Transposed_music (Music*, Pitch);
+  Transposed_music (SCM);
   
   VIRTUAL_COPY_CONS(Music);
   virtual Pitch to_relative_octave (Pitch);
index 27617f77e8e66e590c05d690473310fb63407e3d..7059eca24c49d2515b3edb4e907735ee17ce58d4 100644 (file)
 #include "part-combine-music-iterator.hh"
 #include "pitch.hh"
 
-Part_combine_music::Part_combine_music (SCM  what, Music * f, Music * s)
+Part_combine_music::Part_combine_music (SCM l)
+  : Music (l)
 {
-  assert (gh_string_p (what));
-  set_mus_property ("what", what);
-  set_mus_property ("one", f->self_scm ());
-  set_mus_property ("two", s->self_scm ());  
-
-  scm_unprotect_object (f->self_scm());
-  scm_unprotect_object (s->self_scm());  
-
   set_mus_property ("iterator-ctor",
                    Part_combine_music_iterator::constructor_cxx_function);
 }
index 33a85917bc5e524c2131a9535b97cdeb60050a85..ae6773a6b28b4ed2807eb063d2ecac9962f6f9c6 100644 (file)
@@ -17,10 +17,9 @@ Relative_octave_music::to_relative_octave (Pitch)
 }
 
 
-Relative_octave_music::Relative_octave_music(Music*p,Pitch def)
-  : Music_wrapper (p)
+Relative_octave_music::Relative_octave_music(SCM l)
+  : Music_wrapper (l)
 {
-  set_mus_property ("last-pitch", element ()->to_relative_octave (def).smobbed_copy ());
   set_mus_property ("type", ly_symbol2scm ("relative-octave-music"));  
 }
 
index fec8d7be73845d6da7907e3e6652bcebd16a489a..9ff853a9a64bb443cddec9076bf9c80dc18fafa6 100644 (file)
@@ -24,29 +24,12 @@ Repeated_music::alternatives ()const
   return dynamic_cast<Music_sequence*>  (unsmob_music (get_mus_property ("alternatives")));
 }
 
-Repeated_music::Repeated_music(Music *beg, int times, Music_sequence * alts)
+Repeated_music::Repeated_music(SCM l)
+  : Music (l)
 {
-  if (beg)
-    {
-      set_mus_property ("body", beg->self_scm ());
-      scm_unprotect_object (beg->self_scm ());
-    }
-  set_mus_property ("repeat-count", gh_int2scm (times));
-
-  if (alts)
-    {
-      alts->truncate (times);
-      set_mus_property ("alternatives", alts->self_scm ());
-      scm_unprotect_object (alts->self_scm ());  
-    }
   set_mus_property ("type", ly_symbol2scm ("repeated-music"));
 }
 
-Repeated_music::Repeated_music (Repeated_music const &s)
-  : Music (s)
-{
-}
-
 
 Pitch
 Repeated_music::to_relative_octave (Pitch p)
index d10693e898f88a1896afaed6dc7fcfe97a572521..e9f6427cd13a5a585206fd83768f0d9a87c07513 100644 (file)
@@ -25,6 +25,7 @@ Request::do_equal_b (Request const*) const
   
 
 Request::Request ()
+  : Music (SCM_EOL)
 {
   set_mus_property ("type", ly_symbol2scm ("request"));
 }
index 74559e404a882f6b3723e7b827531f02974cca2c..ed3961b27e3d875ed11998063709900703bc075c 100644 (file)
 #include "time-scaled-music.hh"
 #include "time-scaled-music-iterator.hh"
 
-Time_scaled_music::Time_scaled_music (int n, int d,Music *mp)
-  : Music_wrapper (mp)
+Time_scaled_music::Time_scaled_music (SCM l)
+  : Music_wrapper (l)
 {
-  set_mus_property ("numerator", gh_int2scm (n));
-  set_mus_property ("denominator", gh_int2scm (d));
   set_mus_property ("iterator-ctor",
                    Time_scaled_music_iterator::constructor_cxx_function);
   
-  compress (Moment (n,d));
 }
 
 
index 5b16536e949dfa34b9adf518ae30faa78acb25c3..4bf75074a0af581446c34edda713c1ce2ec2758c 100644 (file)
@@ -426,3 +426,41 @@ type_check_assignment (SCM val, SCM sym,  SCM type_symbol)
     }
   return ok;
 }
+
+SCM
+ly_get_trans_property (SCM context, SCM name)
+{
+  Translator *t = unsmob_translator (context);
+  Translator_group* tr=   dynamic_cast<Translator_group*> (t);
+  if (!t || !tr)
+    {
+      warning ("ly-get-trans-property: expecting a Translator_group argument");
+      return SCM_EOL;
+    }
+  return tr->get_property (name);
+  
+}
+SCM
+ly_set_trans_property (SCM context, SCM name, SCM val)
+{
+
+  Translator *t = unsmob_translator (context);
+  Translator_group* tr=   dynamic_cast<Translator_group*> (t);
+  if (tr)
+    {
+      tr->set_property (name, val);
+    }
+  return SCM_UNSPECIFIED;
+}
+
+
+
+
+void
+add_trans_scm_funcs ()
+{
+  scm_make_gsubr ("ly-get-trans-property", 2, 0, 0, (Scheme_function_unknown)ly_get_trans_property);
+  scm_make_gsubr ("ly-get-trans-property", 3, 0, 0, (Scheme_function_unknown)ly_get_trans_property);
+}
+
+ADD_SCM_INIT_FUNC(trans_scm, add_trans_scm_funcs);
index 166f68c9688e17ff75fa3603cb6cc12e201411c5..a059b2b5bdf1c5a4a5522c775ce9c86eb0373bac 100644 (file)
 #include "transposed-music.hh"
 #include "debug.hh"
 
-Transposed_music::Transposed_music (Music *p, Pitch pit)
-  : Music_wrapper (p)
+Transposed_music::Transposed_music (SCM l)
+  : Music_wrapper (l)
 {
-  p->transpose (pit);
   set_mus_property ("type", ly_symbol2scm ("transposed-music"));
 }