2 music.hh -- declare Music
4 source file of the GNU LilyPond music typesetter
6 (c) 1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
14 #include "virtual-methods.hh"
16 #include "minterval.hh"
17 #include "lily-proto.hh"
20 /** Music is anything that has duration and supports both time compression and
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:
31 class Music:public Input {
34 /** The kind of translation needed for this music. This doesn't
35 make sense for simple (ie non-list) music, but it does no harm
36 here. Yes, it did harm Music_sequence: you can forget to copy it.
39 String translator_type_str_;
41 /// what identification for the translation unit
42 String translator_id_str_;
44 virtual Musical_pitch to_relative_octave (Musical_pitch);
46 /// The duration of this piece of music
47 virtual Moment duration () const;
51 /// Transpose, with the interval central C to #p#
52 virtual void transpose (Musical_pitch p);
54 /// Scale the music in time by #factor#.
55 virtual void compress (Moment factor);
56 VIRTUAL_COPY_CONS(Music,Music);
57 DECLARE_MY_RUNTIME_TYPEINFO;
60 virtual void do_print() const;