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 struct Rhythmic_grouping
{
19 Array
<Rhythmic_grouping
*> children
;
24 Array
<MInterval
> intervals();
25 MInterval
interval()const;
26 Moment
length() const;
27 void intersect(MInterval
);
29 void operator=(Rhythmic_grouping
const&);
30 Rhythmic_grouping(Rhythmic_grouping
const&);
31 Rhythmic_grouping(MInterval
, int n
=1);
33 Rhythmic_grouping(Array
<Rhythmic_grouping
*>);
36 void add_child(Moment start
, Moment len
);
37 bool child_fit_query(Moment start
);
38 void split(Rhythmic_grouping r
);
39 void split(Array
<MInterval
>);
45 Array
<int> generate_beams(Array
<int>, int&);
47 /// multiply self to span #i#
48 void extend(MInterval i
);
49 void translate(Moment
);
53 void copy(Rhythmic_grouping
const&);
57 Rhythmic_grouping
parse_grouping(Array
<int> beat_i_arr
, Array
<Moment
> elt_length_arr
);