LEFT | RIGHT |
(no file at all) | |
1 /* | 1 /* |
2 This file is part of LilyPond, the GNU music typesetter. | 2 This file is part of LilyPond, the GNU music typesetter. |
3 | 3 |
4 Copyright (C) 2012--2020 Mike Solomon <mike@mikesolomon.org> | 4 Copyright (C) 2012--2020 Mike Solomon <mike@mikesolomon.org> |
5 | 5 |
6 LilyPond is free software: you can redistribute it and/or modify | 6 LilyPond is free software: you can redistribute it and/or modify |
7 it under the terms of the GNU General Public License as published by | 7 it under the terms of the GNU General Public License as published by |
8 the Free Software Foundation, either version 3 of the License, or | 8 the Free Software Foundation, either version 3 of the License, or |
9 (at your option) any later version. | 9 (at your option) any later version. |
10 | 10 |
(...skipping 30 matching lines...) Expand all Loading... |
41 void | 41 void |
42 Rhythmic_music_iterator::process (Moment m) | 42 Rhythmic_music_iterator::process (Moment m) |
43 { | 43 { |
44 if (last_processed_mom_ < Moment (0)) | 44 if (last_processed_mom_ < Moment (0)) |
45 { | 45 { |
46 | 46 |
47 descend_to_bottom_context (); | 47 descend_to_bottom_context (); |
48 | 48 |
49 Context *c = get_outlet (); | 49 Context *c = get_outlet (); |
50 Stream_event *ev = get_music ()->to_event (); | 50 Stream_event *ev = get_music ()->to_event (); |
51 SCM arts = ev->get_property ("articulations"); | 51 SCM arts = get_property (ev, "articulations"); |
52 | 52 |
53 if (scm_is_pair (arts)) | 53 if (scm_is_pair (arts)) |
54 { | 54 { |
55 // There is no point in broadcasting articulations like | 55 // There is no point in broadcasting articulations like |
56 // harmonic events that nobody listens to. Those work | 56 // harmonic events that nobody listens to. Those work |
57 // exclusively as articulations. | 57 // exclusively as articulations. |
58 SCM listened = SCM_EOL; | 58 SCM listened = SCM_EOL; |
59 SCM unlistened = SCM_EOL; | 59 SCM unlistened = SCM_EOL; |
60 for (; scm_is_pair (arts); arts = scm_cdr (arts)) | 60 for (; scm_is_pair (arts); arts = scm_cdr (arts)) |
61 { | 61 { |
62 SCM art = scm_car (arts); | 62 SCM art = scm_car (arts); |
63 | 63 |
64 if (c->event_source ()->is_listened_class | 64 if (c->event_source ()->is_listened_class |
65 (unsmob<Stream_event> (art)->get_property ("class"))) | 65 (get_property (unsmob<Stream_event> (art), "class"))) |
66 listened = scm_cons (art, listened); | 66 listened = scm_cons (art, listened); |
67 else | 67 else |
68 unlistened = scm_cons (art, unlistened); | 68 unlistened = scm_cons (art, unlistened); |
69 } | 69 } |
70 ev->set_property ("articulations", scm_reverse_x (unlistened, SCM_EOL)
); | 70 set_property (ev, "articulations", scm_reverse_x (unlistened, SCM_EOL)
); |
71 c->event_source ()->broadcast (ev); | 71 c->event_source ()->broadcast (ev); |
72 arts = scm_reverse_x (listened, SCM_EOL); | 72 arts = scm_reverse_x (listened, SCM_EOL); |
73 for (; scm_is_pair (arts); arts = scm_cdr (arts)) | 73 for (; scm_is_pair (arts); arts = scm_cdr (arts)) |
74 c->event_source ()->broadcast (unsmob<Stream_event> (scm_car (arts))
); | 74 c->event_source ()->broadcast (unsmob<Stream_event> (scm_car (arts))
); |
75 } | 75 } |
76 else | 76 else |
77 c->event_source ()->broadcast (ev); | 77 c->event_source ()->broadcast (ev); |
78 | 78 |
79 ev->unprotect (); | 79 ev->unprotect (); |
80 } | 80 } |
81 Simple_music_iterator::process (m); | 81 Simple_music_iterator::process (m); |
82 } | 82 } |
83 | 83 |
84 IMPLEMENT_CTOR_CALLBACK (Rhythmic_music_iterator); | 84 IMPLEMENT_CTOR_CALLBACK (Rhythmic_music_iterator); |
LEFT | RIGHT |