2 repeated-music.hh -- declare Repeated_music
4 source file of the GNU LilyPond music typesetter
6 (c) 1999--2007 Han-Wen Nienhuys <hanwen@xs4all.nl>
9 #ifndef REPEATED_MUSIC_HH
10 #define REPEATED_MUSIC_HH
17 A repeat, when played has the form of BODY A BODY B BODY C.
19 In this examples, the list {A B C} is put in ALTERNATIVES_P_. BODY
20 is put in REPEAT_BODY_P_. Either the body or the alternative may
23 There are three modes of representing this music:
29 is called "folded". Mostly used for lyrics.
34 is called volta. This is common notation
38 is called unfolded. Useful for MIDI.
40 If the number of repeats is smaller than the number of alternatives, then
41 the excess alternatives are ignored for all timing purposes.
43 If the number of repeats is bigger than the number of alternatives, then
44 the first alternative is assumed to be repeated.
49 static Music *body (Music *);
50 static SCM alternatives (Music *);
52 /* How often do we repeat? */
53 static int repeat_count (Music *);
54 DECLARE_SCHEME_CALLBACK (relative_callback, (SCM, SCM));
56 static Moment body_get_length (Music *);
57 static Moment alternatives_get_length (Music *, bool fold);
58 static Moment alternatives_volta_get_length (Music *);
60 DECLARE_SCHEME_CALLBACK (unfolded_music_length, (SCM));
61 DECLARE_SCHEME_CALLBACK (volta_music_length, (SCM));
62 DECLARE_SCHEME_CALLBACK (folded_music_length, (SCM));
63 DECLARE_SCHEME_CALLBACK (minimum_start, (SCM));
64 DECLARE_SCHEME_CALLBACK (first_start, (SCM));
67 #endif /* REPEATED_MUSIC_HH */