2 grace-performer-group.cc -- implement Grace_performer_group
4 source file of the GNU LilyPond music playter
6 (c) 1999 Jan Nieuwenhuizen <janneke@gnu.org>
9 #include "grace-performer-group.hh"
10 #include "lily-guile.hh"
12 #include "audio-element.hh"
14 ADD_THIS_TRANSLATOR (Grace_performer_group
);
17 Grace_performer_group::start ()
21 We're really finished with this context. Get rid of everything.
24 Grace_performer_group::finish ()
26 calling_self_b_
= true;
27 removal_processing (); // ugr. We'd want to have this done by our parents.g
28 for (int i
=0; i
< announce_to_top_
.size (); i
++)
30 Performer::announce_element (announce_to_top_
[i
]);
33 for (int i
=0; i
< play_us_
.size (); i
++)
35 Performer::play_element (play_us_
[i
]);
38 calling_self_b_
= false;
42 Grace_performer_group::do_removal_processing ()
44 Performer_group_performer::do_removal_processing ();
48 Grace_performer_group::announce_element (Audio_element_info info
)
50 announce_info_arr_
.push (info
);
51 // do not propagate to top
52 announce_to_top_
.push (info
);
54 //inf.elem_l_->set_elt_property ("grace", SCM_BOOL_T);
55 info
.elem_l_
->grace_b_
= true;
59 Grace_performer_group::play_element (Audio_element
*e
)
65 Grace_performer_group::Grace_performer_group()
67 calling_self_b_
= false;
71 Grace_performer_group::process ()
73 calling_self_b_
= true;
76 pre_move_processing();
78 calling_self_b_
= false;
83 Grace_performer_group::each (Method_pointer method
)
86 Performer_group_performer::each (method
);
91 Grace_performer_group::each (Const_method_pointer method
) const
94 Performer_group_performer::each (method
);
98 don't let the commands trickle up.
101 Grace_performer_group::do_try_music (Music
*m
)
103 bool hebbes_b
=false;
105 Link_array
<Translator
> nongroups (nongroup_l_arr ());
107 for (int i
=0; !hebbes_b
&& i
< nongroups
.size() ; i
++)
108 hebbes_b
=nongroups
[i
]->try_music (m
);