]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/music-list.hh
release: 1.0.1
[lilypond.git] / lily / include / music-list.hh
1 /*
2   music-list.hh -- declare Music_list, Chord and Voice
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 #ifndef MUSIC_LIST_HH
11 #define MUSIC_LIST_HH
12
13 #include "music.hh"
14 #include "plist.hh"
15
16
17 /**
18   Music can be a list of other "Music" elements
19  */
20 class Music_list : public Music
21 {
22     
23 public:
24   int multi_level_i_;
25
26   Musical_pitch do_relative_octave (Musical_pitch, bool); 
27   Music_list (Music_list const&);
28   Music_list();
29   DECLARE_MY_RUNTIME_TYPEINFO;
30   VIRTUAL_COPY_CONS(Music_list,Music);
31   virtual void add (Music*);
32   virtual void transpose (Musical_pitch );
33     
34   Pointer_list<Music*> music_p_list_;
35 protected:
36  
37   virtual void do_print() const;
38 };
39
40 /**
41   Chord is a list of music-elements which happen simultaneously
42  */
43
44 class Chord : public Music_list
45 {
46 public:
47   Chord();
48   DECLARE_MY_RUNTIME_TYPEINFO;
49   VIRTUAL_COPY_CONS(Chord,Music);
50   
51   virtual Musical_pitch to_relative_octave (Musical_pitch);
52   virtual void translate (Moment dt);
53   virtual MInterval time_int() const;
54 };
55
56 /**
57   The request is a collection of Requests. A note that you enter in mudela is 
58   one Request_chord, one syllable of lyrics is one Request_chord
59  */
60 class Request_chord : public Chord
61 {
62 public:
63   DECLARE_MY_RUNTIME_TYPEINFO;
64   virtual Musical_pitch to_relative_octave (Musical_pitch);
65   Request_chord();
66   VIRTUAL_COPY_CONS(Request_chord, Music);
67 };
68 /**
69   Voice is a list of music-elements which are placed behind each other.
70  */
71 class Voice : public Music_list
72 {
73     
74 public:
75   Moment offset_mom_;
76   virtual Musical_pitch to_relative_octave (Musical_pitch);
77   Voice();
78   DECLARE_MY_RUNTIME_TYPEINFO;
79   VIRTUAL_COPY_CONS(Voice, Music);
80   virtual void translate (Moment dt);
81   virtual MInterval time_int() const;
82 };
83 #endif // MUSIC_LIST_HH