lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: make web fails


From: Han-Wen Nienhuys
Subject: Re: make web fails
Date: Sun, 04 Jun 2006 17:40:04 +0200
User-agent: Thunderbird 1.5.0.2 (X11/20060501)

Erik Sandberg schreef:
On Saturday 03 June 2006 14:39, Han-Wen Nienhuys wrote:
Erik Sandberg schreef:

Good point. In that case, you'll need to override
Time_scaled_iterator::process() to watch now_mom().main_part_ to insert
the events "just in time".


Patch is attached.

ChangeLog entry:

* lily/lyric-combine-music-iterator.cc: Send events for tupletSpannerDuration

        * lily/sequential-iterator.cc: Remove const from get_music_list



 SCM
-Time_scaled_music_iterator::get_music_list () const
+Time_scaled_music_iterator::get_music_list ()
 {
   Music *mus = get_music ();
   Input *origin = mus->origin ();
@@ -28,18 +88,26 @@
   /* Create tuplet start/stop span events before/after the music */
   SCM tuplet_symbol = ly_symbol2scm ("TupletEvent");
   SCM start_event = scm_call_2 (ly_lily_module_constant ("make-span-event"), 
tuplet_symbol, scm_from_int (START));
-  Music *start = unsmob_music (start_event);
-  start->set_spot (*origin);
-  start->set_property ("numerator", mus->get_property ("numerator"));
-  start->set_property ("denominator", mus->get_property ("denominator"));
+  start_ = unsmob_music (start_event);
+  start_->set_spot (*origin);
+  start_->set_property ("numerator", mus->get_property ("numerator"));
+  start_->set_property ("denominator", mus->get_property ("denominator"));
   start_event = scm_call_1 (ly_lily_module_constant ("make-event-chord"), 
scm_list_1 (start_event));
   unsmob_music (start_event)->set_spot (*origin);
SCM stop_event = scm_call_2 (ly_lily_module_constant ("make-span-event"), tuplet_symbol, scm_from_int (STOP));
-  unsmob_music (stop_event)->set_spot (*origin);
+  stop_ = unsmob_music (stop_event);
+  stop_->set_spot (*origin);
   stop_event = scm_call_1 (ly_lily_module_constant ("make-event-chord"), 
scm_list_1 (stop_event));
   unsmob_music (stop_event)->set_spot (*origin);
+ Moment *mp = unsmob_moment (get_outlet ()->get_property ("tupletSpannerDuration"));
+
+  if (mp)
+    {
+      spanner_duration_ = mp->main_part_;
+      next_split_mom_ = spanner_duration_;
+    }
   return scm_list_3 (start_event, child->self_scm (), stop_event);

I don't understand why you have to do the non-const initializations in get_music_list(). Isn'tthere a way to do that in construct_children, and leave the constness?


--

Han-Wen Nienhuys - address@hidden - http://www.xs4all.nl/~hanwen

LilyPond Software Design
 -- Code for Music Notation
http://www.lilypond-design.com





reply via email to

[Prev in Thread] Current Thread [Next in Thread]