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) 1999--2019 Han-Wen Nienhuys <hanwen@xs4all.nl> | 4 Copyright (C) 1999--2019 Han-Wen Nienhuys <hanwen@xs4all.nl> |
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 21 matching lines...) Expand all Loading... |
32 SCM | 32 SCM |
33 Repeated_music::alternatives (Music *me) | 33 Repeated_music::alternatives (Music *me) |
34 { | 34 { |
35 return me->get_property ("elements"); | 35 return me->get_property ("elements"); |
36 } | 36 } |
37 | 37 |
38 Moment | 38 Moment |
39 Repeated_music::alternatives_get_length (Music *me, bool fold) | 39 Repeated_music::alternatives_get_length (Music *me, bool fold) |
40 { | 40 { |
41 SCM alternative_list = alternatives (me); | 41 SCM alternative_list = alternatives (me); |
42 int len = scm_ilength (alternative_list); | 42 long len = scm_ilength (alternative_list); |
43 if (len <= 0) | 43 if (len <= 0) |
44 return 0; | 44 return 0; |
45 | 45 |
46 if (fold) | 46 if (fold) |
47 return Music_sequence::maximum_length (alternative_list); | 47 return Music_sequence::maximum_length (alternative_list); |
48 | 48 |
49 Moment m = 0; | 49 Moment m = 0; |
50 int done = 0; | 50 int done = 0; |
51 int count = robust_scm2int (me->get_property ("repeat-count"), 0); | 51 int count = robust_scm2int (me->get_property ("repeat-count"), 0); |
52 | 52 |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 Repeated_music::first_start (SCM m) | 137 Repeated_music::first_start (SCM m) |
138 { | 138 { |
139 Music *me = unsmob<Music> (m); | 139 Music *me = unsmob<Music> (m); |
140 Music *body = unsmob<Music> (me->get_property ("element")); | 140 Music *body = unsmob<Music> (me->get_property ("element")); |
141 | 141 |
142 Moment rv = (body) ? body->start_mom () | 142 Moment rv = (body) ? body->start_mom () |
143 : Music_sequence::first_start (me->get_property ("elements")); | 143 : Music_sequence::first_start (me->get_property ("elements")); |
144 | 144 |
145 return rv.smobbed_copy (); | 145 return rv.smobbed_copy (); |
146 } | 146 } |
LEFT | RIGHT |