2 repeated-music.hh -- declare Repeated_music
4 source file of the GNU LilyPond music typesetter
6 (c) 1999--2003 Han-Wen Nienhuys <hanwen@cs.uu.nl>
10 #ifndef RepEATED_MUSIC_HH
11 #define RepEATED_MUSIC_HH
19 A repeat, when played has the form of BODY A BODY B BODY C.
21 In this examples, the list {A B C} is put in ALTERNATIVES_P_. BODY
22 is put in REPEAT_BODY_P_. Either the body or the alternative may
25 There are three modes of representing this music:
31 is called "folded". Mostly used for lyrics.
36 is called volta. This is common notation
40 is called unfolded. Useful for MIDI.
42 If the number of repeats is smaller than the number of alternatives, then
43 the excess alternatives are ignored for all timing purposes.
45 If the number of repeats is bigger than the number of alternatives, then
46 the first alternative is assumed to be repeated.
49 class Repeated_music
: public Music
52 Music
* body () const;
53 SCM
alternatives () const;
55 /// how often do we repeat?
56 int repeat_count ( ) const;
57 virtual Pitch
to_relative_octave (Pitch
);
59 Moment
body_get_length () const;
60 Moment
alternatives_get_length (bool fold
) const;
61 Moment
alternatives_volta_get_length () const;
63 DECLARE_SCHEME_CALLBACK (unfolded_music_length
, (SCM
));
64 DECLARE_SCHEME_CALLBACK (volta_music_length
, (SCM
));
65 DECLARE_SCHEME_CALLBACK (folded_music_length
, (SCM
));
66 DECLARE_SCHEME_CALLBACK (minimum_start
, (SCM
));
67 DECLARE_SCHEME_CALLBACK (first_start
, (SCM
));
69 VIRTUAL_COPY_CONS (Music
);
75 #endif /* RepEATED_MUSIC_HH */