lilypond-1.3.16
[lilypond.git] / lily / include / music.hh
blob0bd1e966d07330c1a066670649d844c5a3be10b5
1 /*
2 music.hh -- declare Music
4 source file of the GNU LilyPond music typesetter
6 (c) 1997--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7 */
11 #ifndef MUSIC_HH
12 #define MUSIC_HH
14 #include "virtual-methods.hh"
15 #include "input.hh"
16 #include "minterval.hh"
17 #include "lily-proto.hh"
18 #include "string.hh"
20 /** Music is anything that has duration and supports both time compression and
21 transposition.
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",
26 Music is hierarchical:
28 @see Music_sequence
31 class Music:public Input {
32 public:
35 virtual Musical_pitch to_relative_octave (Musical_pitch);
37 /// The duration of this piece of music
38 virtual Moment length_mom () const;
40 virtual ~Music(){}
41 void print() const;
42 /// Transpose, with the interval central C to #p#
43 virtual void transpose (Musical_pitch p);
45 /// Scale the music in time by #factor#.
46 virtual void compress (Moment factor);
47 VIRTUAL_COPY_CONS(Music);
49 Music();
50 protected:
51 virtual void do_print() const;
54 #endif // MUSIC_HH