2 music.hh -- declare Music
4 source file of the GNU LilyPond music typesetter
6 (c) 1997--2004 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 is_mus_type(x) internal_is_music_type(ly_symbol2scm (x))
24 /** Music is anything that has duration and supports both time compression and
27 In Lily, everything that can be thought to have a length and a pitch
28 (which has a duration which can be transposed) is considered "music",
30 Music is hierarchical:
35 TODO: make a equalp function for general music.
39 Input *origin () const;
40 void set_spot (Input);
42 SCM internal_get_property (SCM) const;
43 void internal_set_property (SCM , SCM val);
44 SCM get_property_alist (bool mut) const;
45 bool internal_is_music_type (SCM) const;
47 virtual Pitch to_relative_octave (Pitch);
49 /// The duration of this piece of music
50 virtual Moment get_length () const;
51 virtual Moment start_mom () const;
53 /// Transpose, with the interval central C to #p#
54 virtual void transpose (Pitch p);
56 /// Scale the music in time by #factor#.
57 virtual void compress (Moment factor);
58 VIRTUAL_COPY_CONS (Music);
60 Music (Music const &m);
62 DECLARE_SMOBS (Music,);
63 SCM immutable_property_alist_;
64 SCM mutable_property_alist_;
65 friend SCM ly_extended_make_music(SCM,SCM);
69 DECLARE_UNSMOB(Music,music);
71 Music* make_music_by_name (SCM sym);