X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Finclude%2Fmusic.hh;h=87b4b93eda7b968552b51bf913ad8153c30d06ba;hb=764c49729f95f421d9d6cc8eee5386706039a2c7;hp=a139ae28d4af589a286a80b0a8576d433238f555;hpb=4975901229a1b074f6c93d812e15d653aa8e2952;p=lilypond.git diff --git a/lily/include/music.hh b/lily/include/music.hh index a139ae28d4..87b4b93eda 100644 --- a/lily/include/music.hh +++ b/lily/include/music.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--2000 Han-Wen Nienhuys + (c) 1997--2002 Han-Wen Nienhuys */ @@ -16,12 +16,17 @@ #include "lily-proto.hh" #include "string.hh" #include "smobs.hh" +#include "music-constructor.hh" + + +#define get_mus_property(x) internal_get_mus_property(ly_symbol2scm(x)) +#define set_mus_property(x,y) internal_set_mus_property(ly_symbol2scm (x), y) /** Music is anything that has duration and supports both time compression and transposition. In Lily, everything that can be thought to have a length and a pitch - (which has a duration which can be transposed) is considered "music", + (which has a duration which can be transposed) is considered "music", Music is hierarchical: @@ -34,40 +39,33 @@ class Music { public: Input *origin () const; void set_spot (Input); - - SCM get_mus_property (const char*) const; - SCM get_mus_property (SCM) const; - void set_mus_property (const char * , SCM val); - void set_immutable_mus_property (const char * , SCM val); - void set_immutable_mus_property (SCM key, SCM val); - void set_mus_property (SCM , SCM val); - void set_mus_pointer (const char*, SCM val); - SCM remove_mus_property (const char* nm); + + SCM internal_get_mus_property (SCM) const; + void internal_set_mus_property (SCM , SCM val); virtual Pitch to_relative_octave (Pitch); /// The duration of this piece of music virtual Moment length_mom () const; - - void print() const; + virtual Moment start_mom () const; + void print () const; /// Transpose, with the interval central C to #p# virtual void transpose (Pitch p); /// Scale the music in time by #factor#. virtual void compress (Moment factor); - VIRTUAL_COPY_CONS(Music); + VIRTUAL_COPY_CONS (Music); + Music (); Music (Music const &m); - Music(); + Music (SCM); protected: - - DECLARE_SMOBS(Music,); + DECLARE_SMOBS (Music,); SCM immutable_property_alist_; SCM mutable_property_alist_; - }; -Music * unsmob_music (SCM); +DECLARE_UNSMOB(Music,music); #endif // MUSIC_HH