X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Finclude%2Fmusic-sequence.hh;h=94784ca45ac08325fe7f46488e4875e56bff1495;hb=a90376b98617925571f9822484bde8d26fa70aed;hp=736d4abf98a988a84511c28e41daf437f4a2130a;hpb=9661ba1fb275f3e14f8a69f2cee2f02a2f893e48;p=lilypond.git diff --git a/lily/include/music-sequence.hh b/lily/include/music-sequence.hh index 736d4abf98..94784ca45a 100644 --- a/lily/include/music-sequence.hh +++ b/lily/include/music-sequence.hh @@ -1,40 +1,39 @@ +/* + music-sequence.hh -- declare Music_sequence - -/* - music-sequence.hh -- declare - source file of the GNU LilyPond music typesetter - - (c) 2000 Han-Wen Nienhuys - - */ + + (c) 2000--2007 Han-Wen Nienhuys +*/ #ifndef MUSIC_SEQUENCE_HH #define MUSIC_SEQUENCE_HH -#include "music.hh" -/** - Music can be a list of other "Music" elements - */ -class Music_sequence : public Music + +#include "pitch.hh" +#include "moment.hh" +#include "lily-guile.hh" + +struct Music_sequence { public: - Music_sequence (SCM h); - - SCM music_list () const; - void append_music (Music *); - VIRTUAL_COPY_CONS(Music); - - Musical_pitch do_relative_octave (Musical_pitch p, bool b); - virtual void transpose (Musical_pitch ); - void truncate (int k); - virtual void compress (Moment); - int length_i () const; - Moment cumulative_length () const; - Moment maximum_length () const; - -protected: - virtual Musical_pitch to_relative_octave (Musical_pitch); - virtual void do_print() const; + DECLARE_SCHEME_CALLBACK (cumulative_length_callback, (SCM)); + DECLARE_SCHEME_CALLBACK (maximum_length_callback, (SCM)); + DECLARE_SCHEME_CALLBACK (minimum_start_callback, (SCM)); + DECLARE_SCHEME_CALLBACK (first_start_callback, (SCM)); + DECLARE_SCHEME_CALLBACK (simultaneous_relative_callback, (SCM, SCM)); + DECLARE_SCHEME_CALLBACK (event_chord_relative_callback, (SCM, SCM)); + Pitch do_relative_octave (Pitch p, bool b); + + static Moment cumulative_length (SCM); + static Moment maximum_length (SCM); + static Moment first_start (SCM list); + static Moment minimum_start (SCM list); }; + +SCM ly_transpose_key_alist (SCM l, SCM pit); +Pitch music_list_to_relative (SCM l, Pitch p, bool ret_first); +void transpose_music_list (SCM, Pitch); +void compress_music_list (SCM, Moment); + #endif