OLD | NEW |
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) 1998--2019 Jan Nieuwenhuizen <janneke@gnu.org> | 4 Copyright (C) 1998--2019 Jan Nieuwenhuizen <janneke@gnu.org> |
5 Han-Wen Nienhuys <hanwen@xs4all.nl> | 5 Han-Wen Nienhuys <hanwen@xs4all.nl> |
6 | 6 |
7 LilyPond is free software: you can redistribute it and/or modify | 7 LilyPond is free software: you can redistribute it and/or modify |
8 it under the terms of the GNU General Public License as published by | 8 it under the terms of the GNU General Public License as published by |
9 the Free Software Foundation, either version 3 of the License, or | 9 the Free Software Foundation, either version 3 of the License, or |
10 (at your option) any later version. | 10 (at your option) any later version. |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 mmrest_->self_scm ())); | 135 mmrest_->self_scm ())); |
136 | 136 |
137 if (articulation_events_.size ()) | 137 if (articulation_events_.size ()) |
138 { | 138 { |
139 for (vsize i = 0; i < articulation_events_.size (); i++) | 139 for (vsize i = 0; i < articulation_events_.size (); i++) |
140 { | 140 { |
141 Stream_event *e = articulation_events_[i]; | 141 Stream_event *e = articulation_events_[i]; |
142 Spanner *sp = make_spanner ("MultiMeasureRestScript", e->self_scm ()); | 142 Spanner *sp = make_spanner ("MultiMeasureRestScript", e->self_scm ()); |
143 make_script_from_event (sp, context (), | 143 make_script_from_event (sp, context (), |
144 e->get_property ("articulation-type"), | 144 e->get_property ("articulation-type"), |
145 i); | 145 int(i)); |
146 SCM dir = e->get_property ("direction"); | 146 SCM dir = e->get_property ("direction"); |
147 if (is_direction (dir)) | 147 if (is_direction (dir)) |
148 sp->set_property ("direction", dir); | 148 sp->set_property ("direction", dir); |
149 | 149 |
150 text_.push_back (sp); | 150 text_.push_back (sp); |
151 } | 151 } |
152 | 152 |
153 } | 153 } |
154 | 154 |
155 if (text_events_.size ()) | 155 if (text_events_.size ()) |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
232 Moment (0)).main_part_ == Rational (0)); | 232 Moment (0)).main_part_ == Rational (0)); |
233 | 233 |
234 if (measure_end || first_time_) | 234 if (measure_end || first_time_) |
235 { | 235 { |
236 last_command_item_ = unsmob<Item> (get_property ("currentCommandColumn")); | 236 last_command_item_ = unsmob<Item> (get_property ("currentCommandColumn")); |
237 | 237 |
238 // Finalize the current grobs. | 238 // Finalize the current grobs. |
239 if (grobs_initialized ()) | 239 if (grobs_initialized ()) |
240 { | 240 { |
241 int curr_measure = scm_to_int (get_property ("internalBarNumber")); | 241 int curr_measure = scm_to_int (get_property ("internalBarNumber")); |
242 set_measure_count (curr_measure - start_measure_); | 242 int count = curr_measure - start_measure_; |
| 243 set_measure_count (count); |
243 if (last_command_item_) | 244 if (last_command_item_) |
244 add_bound_item_to_grobs (last_command_item_); | 245 add_bound_item_to_grobs (last_command_item_); |
245 reset_grobs (); | 246 reset_grobs (); |
| 247 |
| 248 if (scm_to_bool (get_property("createMultiMeasureRestReminders"))) { |
| 249 Item *reminder = make_item ("MultiMeasureRestReminder", SCM_EOL); |
| 250 reminder->set_property ("measure-count", scm_from_int (count)); |
| 251 } |
246 } | 252 } |
247 } | 253 } |
248 | 254 |
249 // Create new grobs if a rest event is (still) active. | 255 // Create new grobs if a rest event is (still) active. |
250 if (!grobs_initialized () && rest_ev_) | 256 if (!grobs_initialized () && rest_ev_) |
251 { | 257 { |
252 initialize_grobs (); | 258 initialize_grobs (); |
253 text_events_.clear (); | 259 text_events_.clear (); |
254 articulation_events_.clear (); | 260 articulation_events_.clear (); |
255 | 261 |
(...skipping 28 matching lines...) Expand all Loading... |
284 /* doc */ | 290 /* doc */ |
285 "Engrave multi-measure rests that are produced with" | 291 "Engrave multi-measure rests that are produced with" |
286 " @samp{R}. It reads @code{measurePosition} and" | 292 " @samp{R}. It reads @code{measurePosition} and" |
287 " @code{internalBarNumber} to determine what number to print" | 293 " @code{internalBarNumber} to determine what number to print" |
288 " over the @ref{MultiMeasureRest}.", | 294 " over the @ref{MultiMeasureRest}.", |
289 | 295 |
290 /* create */ | 296 /* create */ |
291 "MultiMeasureRest " | 297 "MultiMeasureRest " |
292 "MultiMeasureRestNumber " | 298 "MultiMeasureRestNumber " |
293 "MultiMeasureRestText " | 299 "MultiMeasureRestText " |
| 300 "MultiMeasureRestReminder " |
294 "MultiMeasureRestScript ", | 301 "MultiMeasureRestScript ", |
295 | 302 |
296 /* read */ | 303 /* read */ |
297 "internalBarNumber " | 304 "internalBarNumber " |
298 "restNumberThreshold " | 305 "restNumberThreshold " |
299 "currentCommandColumn " | 306 "currentCommandColumn " |
300 "measurePosition " | 307 "measurePosition " |
| 308 "createMultiMeasureRestReminders ", |
301 "whichBar ", | 309 "whichBar ", |
302 | 310 |
303 /* write */ | 311 /* write */ |
304 "" | 312 "" |
305 ); | 313 ); |
OLD | NEW |