]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/music.hh
* lily/include/music.hh (class Music): remove Music::duration_log()
[lilypond.git] / lily / include / music.hh
1 /*
2   music.hh -- declare Music
3
4   source file of the GNU LilyPond music typesetter
5
6   (c) 1997--2005 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7 */
8
9 #ifndef MUSIC_HH
10 #define MUSIC_HH
11
12 #include "virtual-methods.hh"
13 #include "minterval.hh"
14 #include "music-constructor.hh"
15
16 #define is_mus_type(x) internal_is_music_type (ly_symbol2scm (x))
17
18 class Music
19 {
20 public:
21   Music (SCM init);
22   Music (Music const &m);
23   VIRTUAL_COPY_CONSTRUCTOR (Music, Music);
24
25   Input *origin () const;
26   void set_spot (Input);
27
28   SCM internal_get_property (SCM) const;
29   void internal_set_property (SCM, SCM val);
30   SCM get_property_alist (bool mutble) const;
31   bool internal_is_music_type (SCM) const;
32
33   DECLARE_SCHEME_CALLBACK (relative_callback, (SCM, SCM));
34   Pitch to_relative_octave (Pitch);
35   Pitch generic_to_relative_octave (Pitch);
36   String name () const;
37   Moment get_length () const;
38   Moment start_mom () const;
39   void print () const;
40
41   /// Transpose, with the interval central C to #p#
42   void transpose (Pitch p);
43
44   /// Scale the music in time by #factor#.
45   void compress (Moment factor);
46
47 protected:
48   DECLARE_SMOBS (Music,);
49   SCM immutable_property_alist_;
50   SCM mutable_property_alist_;
51 protected:
52   SCM length_callback_;
53   SCM start_callback_;
54   friend SCM ly_extended_make_music (SCM, SCM);
55 };
56
57 DECLARE_TYPE_P (Music);
58 DECLARE_UNSMOB (Music, music);
59
60 Music *make_music_by_name (SCM sym);
61 SCM ly_music_deep_copy (SCM);
62
63 #endif /* MUSIC_HH */