and not reals for the sake of syntax:
%}
sequence = \relative c' {
c32*10/10 [
d32*12/10
e32*14/10
f32*16/10
g32*18/10
f32*20/10
e32*22/10
f32*24/10
d32*28/10
f32*30/10
g32*32/10
f32*34/10
d32*36/10
e32*38/10
d32*40/10
f32*42/10 ]
}
%{
You can see that the last duration is 42/10, which is larger than 40/10, so
since we have overshot, this sequence sums to 1.3, rather than 1.25.
((1/32)*(10/10) + (1/32)*(12/10) + (1/32)*(14/10) + (1/32)*(16/10) + (1/32)*(18/10) + (1/32)*(20/10) + (1/32)*(22/10) + (1/32)*(24/10) + (1/32)*(28/10) + (1/32)*(30/10) + (1/32)*(32/10) + (1/32)*(34/10) + (1/32)*(36/10) + (1/32)*(38/10) + (1/32)*(40/10) + (1/32)*(42/10)) = 1.3
In any case, we can just use this value as the factor used to
change the denominator to in order to scale from 1.3 measures
(the actual total length) to 0.5 measures (the desired length),
or 1.3/0.5 = 2.6.
So, we change our denominator from 10 to 26:
%}
scaledSequence = \relative c' {
c32*10/26 [
d32*12/26
e32*14/26
f32*16/26
g32*18/26
f32*20/26
e32*22/26
f32*24/26
d32*28/26
f32*30/26
g32*32/26
f32*34/26
d32*36/26
e32*38/26
d32*40/26
f32*42/26 ]
}
%{
((1/32)*(10/26) + (1/32)*(12/26) + (1/32)*(14/26) + (1/32)*(16/26) + (1/32)*(18/26) + (1/32)*(20/26) + (1/32)*(22/26) + (1/32)*(24/26) + (1/32)*(28/26) + (1/32)*(30/26) + (1/32)*(32/26) + (1/32)*(34/26) + (1/32)*(36/26) + (1/32)*(38/26) + (1/32)*(40/26) + (1/32)*(42/26)) = 0.5
Now that we have done the scaling manually,
we don't need to change the durations in the featherDurations call:
%}
\relative c' {
\override Beam.grow-direction = #LEFT
\featherDurations #(ly:make-moment 1/1)
\scaledSequence
\override Beam.grow-direction = #'()
c4 ~ c | c1
}
HTH,
Elaine Alt
415 . 341 .4954 "Confusion is highly underrated"
address@hiddenProducer ~ Composer ~ Instrumentalist
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-