- {
- // There is no point in broadcasting articulations like
- // harmonic events that nobody listens to. Those work
- // exclusively as articulations.
- SCM listened = SCM_EOL;
- SCM unlistened = SCM_EOL;
- for (; scm_is_pair (arts); arts = scm_cdr (arts))
- {
- if (scm_is_true
- (scm_call_2
- (ly_lily_module_constant ("any"),
- ly_lily_module_constant ("ly:is-listened-event-class"),
- scm_call_1
- (ly_lily_module_constant ("ly:make-event-class"),
- unsmob_stream_event (scm_car (arts))
- ->get_property ("class")))))
- listened = scm_cons (scm_car (arts), listened);
- else
- unlistened = scm_cons (scm_car (arts), unlistened);
- }
- ev->set_property ("articulations", scm_reverse_x (unlistened, SCM_EOL));
- c->event_source ()->broadcast (ev);
- arts = scm_reverse_x (listened, SCM_EOL);
- for (; scm_is_pair (arts); arts = scm_cdr (arts))
- c->event_source ()->broadcast (unsmob_stream_event (scm_car (arts)));
- }
+ {
+ // There is no point in broadcasting articulations like
+ // harmonic events that nobody listens to. Those work
+ // exclusively as articulations.
+ SCM listened = SCM_EOL;
+ SCM unlistened = SCM_EOL;
+ for (; scm_is_pair (arts); arts = scm_cdr (arts))
+ {
+ SCM art = scm_car (arts);
+
+ if (c->event_source ()->is_listened_class
+ (unsmob<Stream_event> (art)->get_property ("class")))
+ listened = scm_cons (art, listened);
+ else
+ unlistened = scm_cons (art, unlistened);
+ }
+ ev->set_property ("articulations", scm_reverse_x (unlistened, SCM_EOL));
+ c->event_source ()->broadcast (ev);
+ arts = scm_reverse_x (listened, SCM_EOL);
+ for (; scm_is_pair (arts); arts = scm_cdr (arts))
+ c->event_source ()->broadcast (unsmob<Stream_event> (scm_car (arts)));
+ }