X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Finclude%2Fbeaming-pattern.hh;h=089bb31abdcdc21912091cd5f71bc7ff0b434aa2;hb=8659a99f233f5c4684292728e7ad4206669b35b0;hp=603321766881cd3ad0a2e7e867097c844f58b40d;hpb=8fb308fb4d685e4ac4860b425b5139542b91f977;p=lilypond.git diff --git a/lily/include/beaming-pattern.hh b/lily/include/beaming-pattern.hh index 6033217668..089bb31abd 100644 --- a/lily/include/beaming-pattern.hh +++ b/lily/include/beaming-pattern.hh @@ -1,9 +1,20 @@ /* - beaming-pattern.hh -- declare beaming-pattern.hh + This file is part of LilyPond, the GNU music typesetter. - source file of the GNU LilyPond music typesetter + Copyright (C) 1999--2015 Han-Wen Nienhuys - (c) 1999--2006 Han-Wen Nienhuys + LilyPond is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + LilyPond is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with LilyPond. If not, see . */ #ifndef BEAMING_PATTERN_HH @@ -13,19 +24,35 @@ #include "moment.hh" #include "lily-proto.hh" +struct Beaming_options +{ + SCM grouping_; + bool subdivide_beams_; + bool strict_beat_beaming_; + Moment base_moment_; + Moment measure_length_; + + Beaming_options (); + void from_context (Context *); +}; + struct Beam_rhythmic_element { Moment start_moment_; Drul_array beam_count_drul_; - Moment beat_start_; - Moment beat_length_; - Moment group_start_; - - Beam_rhythmic_element (Moment, int); + int rhythmic_importance_; + bool invisible_; + + Rational factor_; + + bool tuplet_start_; + + Beam_rhythmic_element (Moment, int, bool, Rational, bool); Beam_rhythmic_element (); - int count (Direction d); + int count (Direction d) const; + void de_grace (); }; /* @@ -36,16 +63,26 @@ class Beaming_pattern { public: Beaming_pattern (); - - void beamify (Context*); - void add_stem (Moment d, int beams); + + void beamify (Beaming_options const &); + void de_grace (); + void add_stem (Moment d, int beams, bool invisible, Rational factor, bool tuplet_starrt); int beamlet_count (int idx, Direction d) const; - + bool invisibility (int idx) const; + Rational factor (int idx) const; + bool tuplet_start (int idx) const; + Moment start_moment (int idx) const; + Moment end_moment (int idx) const; + Beaming_pattern *split_pattern (int idx); + private: vector infos_; - void beamify (bool); - int beam_extend_count (Direction) const; - int best_splitpoint_index (bool *split) const; + Direction flag_direction (Beaming_options const &, vsize) const; + void find_rhythmic_importance (Beaming_options const &); + void unbeam_invisible_stems (); + Moment remaining_length (int idx) const; + int beam_count_for_rhythmic_position (int idx) const; + int beam_count_for_length (Moment len) const; }; #endif /* BEAMING_PATTERN_HH */