2 music.hh -- declare Music
4 source file of the GNU LilyPond music typesetter
6 (c) 1997--2002 Han-Wen Nienhuys <hanwen@cs.uu.nl>
14 #include "virtual-methods.hh"
15 #include "minterval.hh"
16 #include "lily-proto.hh"
19 #include "music-constructor.hh"
22 #define get_mus_property(x) internal_get_mus_property(ly_symbol2scm(x))
23 #define set_mus_property(x,y) internal_set_mus_property(ly_symbol2scm (x), y)
25 /** Music is anything that has duration and supports both time compression and
28 In Lily, everything that can be thought to have a length and a pitch
29 (which has a duration which can be transposed) is considered "music",
31 Music is hierarchical:
36 TODO: make a equalp function for general music.
40 Input *origin () const;
41 void set_spot (Input);
43 SCM internal_get_mus_property (SCM) const;
44 void internal_set_mus_property (SCM , SCM val);
45 void add_music_type (SCM);
46 bool is_music_type (SCM) const;
48 virtual Pitch to_relative_octave (Pitch);
50 /// The duration of this piece of music
51 virtual Moment length_mom () const;
52 virtual Moment start_mom () const;
54 /// Transpose, with the interval central C to #p#
55 virtual void transpose (Pitch p);
57 /// Scale the music in time by #factor#.
58 virtual void compress (Moment factor);
59 VIRTUAL_COPY_CONS (Music);
61 Music (Music const &m);
63 DECLARE_SMOBS (Music,);
64 SCM immutable_property_alist_;
65 SCM mutable_property_alist_;
66 friend SCM ly_extended_make_music(SCM,SCM);
70 DECLARE_UNSMOB(Music,music);