+2006-06-18 Han-Wen Nienhuys <hanwen@lilypond.org>
+
+ * input/regression/beaming-ternary-metrum.ly: update doc.
+
+ * scm/music-functions.scm (make-time-signature-set): add
+ standard-beat-grouping.
+
2006-06-17 Han-Wen Nienhuys <hanwen@lilypond.org>
* input/regression/tie-whole.ly: new file.
-\version "2.7.39"
+\version "2.9.10"
+
\header {
- texidoc = "Automatic beaming works also in ternary time sigs."
+
+ texidoc = "Automatic beaming works also in ternary time sigs. In
+ this case, the 8th is a beat, so the 16ths are split into two
+ groups."
+
}
+
\layout { ragged-right = ##t}
\relative c'' {
*at_boundary = false;
- int min_factor_twos = INT_MAX;
+ int min_den = INT_MAX;
int min_index = -1;
Moment beat_pos;
*/
- int factor_2s = count_factor_twos (dt.den ());
+ dt /= infos_[i].beat_length_;
- if (factor_2s < min_factor_twos)
+ if (dt.den () < min_den)
{
- min_factor_twos = factor_2s;
+ min_den = dt.den ();
min_index = i;
}
}
j++;
infos_[i].group_start_ = group_starts[j];
-
+ infos_[i].beat_length_ = beat_length;
while (k < beat_starts.size() - 1
&& beat_starts[k+1] <= infos_[i].start_moment_)
k++;
Drul_array<int> beam_count_drul_;
Moment beat_start_;
+ Moment beat_length_;
Moment group_start_;
Beam_rhythmic_element (Moment, int);
(define-public (make-time-signature-set num den . rest)
"Set properties for time signature NUM/DEN. Rest can contain a list
of beat groupings "
+
+ (define (standard-beat-grouping num den)
+
+ "Some standard subdivisions for time signatures."
+ (let*
+ ((key (cons num den))
+ (entry (assoc key '(((6 . 8) . (3 3))
+ ((5 . 8) . (3 2))
+ ((9 . 8) . (3 3 3))
+ ((12 . 8) . (3 3 3 3))
+ ((8 . 8) . (3 3 2))
+ ))))
+
+ (if entry
+ (cdr entry)
+ '())))
+
(let* ((set1 (make-property-set 'timeSignatureFraction (cons num den)))
(beat (ly:make-moment 1 den))
(len (ly:make-moment num den))
(set3 (make-property-set 'measureLength len))
(set4 (make-property-set 'beatGrouping (if (pair? rest)
(car rest)
- '())))
+ (standard-beat-grouping num den))))
(basic (list set1 set2 set3 set4)))
(descend-to-context
(context-spec-music (make-sequential-music basic) 'Timing) 'Score)))