]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/music.hh
release: 1.1.54
[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--1999 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 /** Music is anything that has duration and supports both time compression and
21   transposition.
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_sequence
29
30   */
31 class Music:public Input {
32 public:
33     
34
35   virtual Musical_pitch to_relative_octave (Musical_pitch);
36   virtual Music_iterator* to_rhythm (Music_iterator*);
37
38   /// The duration of this piece of music
39   virtual Moment length_mom () const;
40
41   virtual ~Music(){}
42   void print() const;
43   /// Transpose, with the interval central C to #p#
44   virtual void transpose (Musical_pitch p);
45
46   /// Scale the music in time by #factor#.
47   virtual void compress (Moment factor);
48   VIRTUAL_COPY_CONS(Music);
49   
50   Music();
51 protected:
52   virtual void do_print() const;
53 };
54
55 #endif // MUSIC_HH
56
57
58