X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Finclude%2Fmusic-sequence.hh;h=ad47f72bdc72c8fb6e5b6eb0590f45fc51044406;hb=47db9a3883d726ca53e2133a3b2298f78dd6a32e;hp=699098fab43319e46215c0df11ca7914f91795e5;hpb=ebd181bdf74b864a670d12a0a8cc8392595f3408;p=lilypond.git diff --git a/lily/include/music-sequence.hh b/lily/include/music-sequence.hh index 699098fab4..ad47f72bdc 100644 --- a/lily/include/music-sequence.hh +++ b/lily/include/music-sequence.hh @@ -1,42 +1,51 @@ +/* + This file is part of LilyPond, the GNU music typesetter. + Copyright (C) 2000--2015 Han-Wen Nienhuys -/* - music-sequence.hh -- declare - - source file of the GNU LilyPond music typesetter - - (c) 2000--2001 Han-Wen Nienhuys - - */ + LilyPond is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + LilyPond is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with LilyPond. If not, see . +*/ #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); - Music_sequence (); - SCM music_list () const; - void append_music (Music *); - VIRTUAL_COPY_CONS (Music); - + DECLARE_SCHEME_CALLBACK (cumulative_length_callback, (SCM)); + DECLARE_SCHEME_CALLBACK (maximum_length_callback, (SCM)); + DECLARE_SCHEME_CALLBACK (event_chord_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 void transpose_list (SCM , Pitch); - static void compress_list (SCM, Moment); - - virtual void transpose (Pitch ); - virtual void compress (Moment); - - static Moment cumulative_length (SCM) ; - static Moment maximum_length (SCM) ; - static Moment first_start (SCM list) ; + + static Moment cumulative_length (SCM); + static Moment maximum_length (SCM); + static Moment first_start (SCM list); static Moment minimum_start (SCM list); - -protected: - virtual Pitch to_relative_octave (Pitch); }; + +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