patterns for 16th triplets.
+2006-06-13 Han-Wen Nienhuys <hanwen@lilypond.org>
+
+ * lily/beaming-pattern.cc (best_splitpoint_index): fix beaming
+ patterns for 16th triplets.
+
2006-06-10 Graham Percival <gpermus@gmail.com>
* Documentation/user/ page.itely, global.itely: editing
2006-06-10 Han-Wen Nienhuys <hanwen@lilypond.org>
+ * scm/define-markup-commands.scm (wordwrap-markups): use
+ output-def 'line-width if undefined.
+
* HACKING: trim outdated info.
2006-06-09 Mats Bengtsson <mabe@drongo.s3.kth.se>
Han-Wen Nienhuys - Core development
Jan Nieuwenhuizen - Core development
-Pedro Kroger - Build Meister
Graham Percival - Documentation Editor
Mats Bengtsson - Support Guru
Andrew Sidwell
Chris Sawer
Jamie Bullock
+Michael Meixner
Steve Doonan
Trent Johnston
+Vivian Barty-Taylor
DOCUMENTATION HELPERS
\header{
texidoc="
Beaming is generated automatically. Beams may cross bar lines. In that
-case, line breaks are forbidden. Yet clef and key signatures are
-hidden just as with breakable bar lines.
+case, line breaks are forbidden.
"
}
\context Staff \relative c'' {
+
+ c8[ \times 2/3 { c16 d e] }
+ s4*3
+
c8.[ c16]
c8.[ c16 c8. c16]
c16[ c8.] |
c32
c2
- c8[ c c] c8 % over barline
+ c8[^"over barline" c c] c8
c16[ c8 c16]
c32[ c16 c16 c16 c32]
c32[ c16 c8 c32] % hmm ?
beam_count_drul_[RIGHT] = i;
}
+
+int
+count_factor_twos (int x)
+{
+ int c = 0;
+ while (x && x % 2)
+ {
+ x /= 2;
+ c ++;
+ }
+
+ return c;
+}
+
int
Beaming_pattern::best_splitpoint_index (bool *at_boundary) const
{
*at_boundary = false;
- int min_denominator = INT_MAX;
+ int min_factor_twos = INT_MAX;
int min_index = -1;
Moment beat_pos;
for (vsize i = 1; i < infos_.size (); i++)
{
- Moment dt = infos_[i].start_moment_ - infos_[i].beat_start_;
- if (dt.den () < min_denominator)
+ Moment dt = infos_[i].start_moment_ - infos_[i].beat_start_;
+
+ /*
+ This is a kludge, for the most common case of 16th, 32nds
+ etc. What should really happen is that \times x/y should
+ locally introduce a voice-specific beat duration. (or
+ perhaps: a list of beat durations for nested tuplets.)
+
+ */
+
+ int factor_2s = count_factor_twos (dt.den ());
+
+ if (factor_2s < min_factor_twos)
{
- min_denominator = dt.den ();
+ min_factor_twos = factor_2s;
min_index = i;
}
}
bool subdivide_beams = to_boolean (context->get_property ("subdivideBeams"));
Moment beat_length = robust_scm2moment (context->get_property ("beatLength"), Moment (1, 4));
- Moment measure_length = robust_scm2moment (context->get_property ("beatLength"), Moment (1, 4));
+ Moment measure_length = robust_scm2moment (context->get_property ("measureLength"), Moment (1, 4));
if (infos_[0].start_moment_ < Moment (0))
for (vsize i = 0; i < infos_.size(); i++)
vsize k = 0;
for (vsize i = 0; i < infos_.size(); i++)
{
- while (j < group_starts.size()-1
+ while (j < group_starts.size() - 1
&& group_starts[j+1] <= infos_[i].start_moment_)
j++;
infos_[i].group_start_ = group_starts[j];
- while (k < beat_starts.size()-1
+ while (k < beat_starts.size() - 1
&& beat_starts[k+1] <= infos_[i].start_moment_)
k++;
(text-width (apply + text-widths))
(text-dir (chain-assoc-get 'text-direction props RIGHT))
(word-count (length stencils))
- (word-space (chain-assoc-get 'word-space props))
- (line-width (chain-assoc-get 'line-width props))
+ (word-space (chain-assoc-get 'word-space props 1))
+ (prop-line-width (chain-assoc-get 'line-width props #f))
+ (line-width (if prop-line-width prop-line-width
+ (ly:output-def-lookup layout 'line-width)))
(fill-space
(cond
((= word-count 1)
(define (wordwrap-markups layout props args justify)
(let*
((baseline-skip (chain-assoc-get 'baseline-skip props))
- (line-width (chain-assoc-get 'line-width props))
+ (prop-line-width (chain-assoc-get 'line-width props #f))
+ (line-width (if prop-line-width prop-line-width
+ (ly:output-def-lookup layout 'line-width)))
(word-space (chain-assoc-get 'word-space props))
(text-dir (chain-assoc-get 'text-direction props RIGHT))
(lines (wordwrap-stencils