source file of the GNU LilyPond music typesetter
- (c) 2004--2005 Han-Wen Nienhuys
+ (c) 2004--2006 Han-Wen Nienhuys
*/
#include "context.hh"
-#include "event.hh"
+#include "music.hh"
#include "music-sequence.hh"
#include "lily-guile.hh"
#include "warn.hh"
/*
TODO: this is getting of hand...
*/
- Interpretation_context_handle one_;
- Interpretation_context_handle two_;
- Interpretation_context_handle null_;
- Interpretation_context_handle shared_;
- Interpretation_context_handle solo_;
+ Context_handle one_;
+ Context_handle two_;
+ Context_handle null_;
+ Context_handle shared_;
+ Context_handle solo_;
void substitute_both (Context *to1,
Context *to2);
second_iter_->quit ();
null_.set_context (0);
- one_ .set_context (0);
+ one_.set_context (0);
two_.set_context (0);
shared_.set_context (0);
solo_.set_context (0);
-
}
Part_combine_iterator::Part_combine_iterator ()
{
if (first_iter_)
first_iter_->substitute_outlet (f, t);
-
}
Moment
Moment p;
p.set_infinite (1);
if (first_iter_->ok ())
- p = p <? first_iter_->pending_moment ();
+ p = min (p, first_iter_->pending_moment ());
if (second_iter_->ok ())
- p = p <? second_iter_->pending_moment ();
+ p = min (p, second_iter_->pending_moment ());
return p;
}
if (!event)
event = make_music_by_name (ly_symbol2scm ("SoloOneEvent"));
- first_iter_-> try_music_in_children (event);
+ first_iter_->try_music_in_children (event);
}
playing_state_ = SOLO1;
}
{
Context *tos[] = {to1, to2};
Music_iterator *mis[] = {first_iter_, second_iter_};
- Interpretation_context_handle *hs[]
+ Context_handle *hs[]
= {
&null_,
&one_, &two_,
if (!event)
event = make_music_by_name (ly_symbol2scm ("SoloTwoEvent"));
- second_iter_-> try_music_in_children (event);
+ second_iter_->try_music_in_children (event);
playing_state_ = SOLO2;
}
}
= get_outlet ()->find_create_context (ly_symbol2scm ("Voice"),
"solo", props);
- solo_ .set_context (solo_tr);
+ solo_.set_context (solo_tr);
Context *null
= get_outlet ()->find_create_context (ly_symbol2scm ("Devnull"),
"", SCM_EOL);
if (!null)
- programming_error ("No Devnull found?");
+ programming_error ("no Devnull found");
null_.set_context (null);
{
SCM sym = ly_symbol2scm (*p);
execute_pushpop_property (one, sym,
- ly_symbol2scm ("direction"), scm_int2num (1));
+ ly_symbol2scm ("direction"), scm_from_int (1));
execute_pushpop_property (two, sym,
- ly_symbol2scm ("direction"), scm_int2num (-1));
+ ly_symbol2scm ("direction"), scm_from_int (-1));
}
-
}
void
solo2 ();
else if (scm_is_symbol (tag))
{
- String s = "Unknown split directive: "
- + (scm_is_symbol (tag) ? ly_symbol2string (tag) : String ("not a symbol"));
+ string s = "Unknown split directive: "
+ + (scm_is_symbol (tag) ? ly_symbol2string (tag) : string ("not a symbol"));
programming_error (s);
}
}
if (second_iter_->ok ())
{
second_iter_->process (m);
- if (first_iter_->try_music_in_children (busy_playing_event))
+ if (second_iter_->try_music_in_children (busy_playing_event))
last_playing_ = SOLO2;
}
}