2 This file is part of LilyPond, the GNU music typesetter.
4 Copyright (C) 1999--2010 Han-Wen Nienhuys <hanwen@xs4all.nl>
6 LilyPond is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
11 LilyPond is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with LilyPond. If not, see <http://www.gnu.org/licenses/>.
20 #ifndef BEAMING_PATTERN_HH
21 #define BEAMING_PATTERN_HH
23 #include "std-vector.hh"
25 #include "lily-proto.hh"
27 struct Beaming_options
30 bool subdivide_beams_
;
32 Moment measure_length_
;
35 void from_context (Context
*);
38 struct Beam_rhythmic_element
41 Drul_array
<int> beam_count_drul_
;
43 int rhythmic_importance_
;
46 Beam_rhythmic_element (Moment
, int, bool);
47 Beam_rhythmic_element ();
49 int count (Direction d
) const;
54 Generate beaming given durations of notes. Beam uses this to
55 set_beaming () for each of its stems.
62 void beamify (Beaming_options
const&);
64 void add_stem (Moment d
, int beams
, bool invisible
);
65 int beamlet_count (int idx
, Direction d
) const;
66 bool invisibility (int idx
) const;
67 Moment
start_moment (int idx
) const;
68 Moment
end_moment (int idx
) const;
69 Beaming_pattern
* split_pattern(int idx
);
72 vector
<Beam_rhythmic_element
> infos_
;
73 Direction
flag_direction (Beaming_options
const&, vsize
) const;
74 void find_rhythmic_importance (Beaming_options
const&);
75 void unbeam_invisible_stems ();
78 #endif /* BEAMING_PATTERN_HH */