]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/music.hh
083e476f734a9c7c2747cf1f79569037ae411f77
[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--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7 */
8
9
10
11 #ifndef MUSIC_HH
12 #define MUSIC_HH
13
14 #include "virtual-methods.hh"
15 #include "input.hh"
16 #include "minterval.hh"
17 #include "lily-proto.hh"
18 #include "string.hh"
19
20 /** 
21   Anything which has length or pitch.
22   
23   In Lily, everything that can be thought to have a length and a pitch
24   (which has a duration which can be transposed) is considered "music",
25
26   Music is hierarchical: 
27
28   @see Music_list
29
30   */
31 class Music:public Input {
32 public:
33   Music_list * parent_music_l_;
34     
35   /** The kind of iterator needed to walk this music.  This doesn't
36     make sense for simple (ie non-list) music, but it does no harm
37     here. Yes, it did harm Music_list: you can forget to copy it.
38       
39     */
40   String translator_type_str_;
41
42   /// what name (or look for this name)
43   String translator_id_str_;    
44
45   virtual Musical_pitch to_relative_octave (Musical_pitch);
46   virtual MInterval time_int() const;
47   virtual ~Music(){}
48   void print() const;
49   virtual void transpose (Musical_pitch );
50   virtual void translate (Moment dt);
51   VIRTUAL_COPY_CONS(Music,Music);
52   DECLARE_MY_RUNTIME_TYPEINFO;
53   Music();
54 protected:
55   virtual void do_print() const;
56 };
57
58 #endif // MUSIC_HH
59
60
61