2 grouping.hh -- part of LilyPond
4 (c) 1996,97 Han-Wen Nienhuys
11 #include "interval.hh"
14 typedef Interval_t<Moment> MInterval;
16 /** data structure which represents rhythmic units this is a tree. It groupes notes according to rules
18 TODO Documentation. Unhairing
20 struct Rhythmic_grouping {
21 Array<Rhythmic_grouping*> children;
26 Array<MInterval> intervals();
27 MInterval interval()const;
28 Moment length() const;
29 void intersect(MInterval);
31 void operator=(Rhythmic_grouping const&);
32 Rhythmic_grouping(Rhythmic_grouping const&);
33 Rhythmic_grouping(MInterval, int n=1);
35 Rhythmic_grouping(Array<Rhythmic_grouping*>);
38 void add_child(Moment start, Moment len);
39 bool child_fit_b(Moment start);
40 void split(Rhythmic_grouping r);
41 void split(Array<MInterval>);
47 Array<int> generate_beams(Array<int>, int&);
49 /** multiply self to span #i#.
50 In implementation, this isn't really const, but conceptually it is.
52 void extend(MInterval i) const;
53 void translate(Moment);
57 void copy(Rhythmic_grouping const&);
61 Rhythmic_grouping parse_grouping(Array<int> beat_i_arr, Array<Moment> elt_length_arr);