On 2018-12-21 5:14 am, Reggie wrote:
Hello. I see what you are saying thank you. I just feel that feather
beaming
is so confusing it all depends on so much, it's not simple like "select
these notes and change beam style to feather left or right". It's
first,
math. Then, trial error. Then, settling. Then, Repeat. I now understand
how
to create the feather beams on paper, but the bar line check fails is
what
remains to be problemsome. [ . . .]
I apologize for the very long email following, although I would
appreciate you taking the time to read through it. You may need to
re-read it a few times, so find a good cup of coffee (or something
stronger if you are so-inclined).
==
Feathered beams, as far as the visual depiction goes, are as simple as
you describe. All you need to do is set Beam.grow-direction to #LEFT or
#RIGHT, and then any manually beamed notes delimited with [ and ] will
have the beams feathered. That's it. You're done. No math at all.
However, note that this is *only* the visual aspect of feathering.
Unless you use \featherDurations, all of the notes will keep their
straight timing; and MIDI output will not reflect the desired ritardando
or accelerando.
So when you do need to care about the timing of notes, \featherDurations
comes into play; and it does bring with it some potentially confusing
math. This math is somewhat complicated by the fact that the
documentation and implementation do not agree with one another.
Consider the following:
\featherDurations #(ly:make-moment 1/2) { c8[ d e f] }
[Side note: Harm made a slight mistake in his example usage. If you
want to feather a sequence of notes, you must put those notes in curly
braces. Omitting the braces in the example above will result in no
feathering, as only the first note will be passed to the function.]
The documentation says that \featherDurations will use the specified
moment to scale the last note relative to the first; however, in
practice you will see that this scaling is done between each subsequent
note. In the example above, we would expect that the 'f' should last
half as long as the 'c'. But instead, we find that the 'f' is half of
the 'e'; the 'e', half of the 'd'; and the 'd', half of the 'c'. The
result is that the 'f' is one eighth the duration of the 'c'.
Given the current implementation, it would be necessary to use an
approximate rational like 50/63 as the moment in order to get 'f' to be
half of 'c'. Why that number? Well, it's a close approximation to the
irrational cube root of one half. We determine this exact value by
taking the desired ratio (1/2) and raising it to the reciprocal of the
number of scaling steps between the first and last notes (three, in this
case, which becomes the fraction 1/3). (1/2)^(1/3) is about 0.7937; and
50/63 is roughly 0.79365.
But before we get lost in the murky details of whether the implemented
behavior is right or the documentation is right, let us circle back
around to a key point that I feel has not been stressed enough.
\featherDurations will change the individual durations and timing of the
notes in the sequence provided; however it will *not* change the overall
duration of the sequence. If bar checks outside the range of feathered
notes are failing, then the issue is completely unrelated to
\featherDurations. Your problem is with the note sequence itself. (If
you are using bar checks *within* the sequence of notes being feathered,
then you are asking for trouble. We'll talk about this in a bit.)
This means your score really should be bar check clean *before* you ever
use \featherDurations. And that task may involve arithmetic of its own.
Consider the following sequence:
r64 { c64 d32 e16 f8 g4 a2 } | b1
We have a manually-written ritardando of notes. Note the rest is there
to ensure the whole note aligns to its own measure, but we are mainly
interested in the sequence delimited by the braces.
Let us assume we would like to notate this as a simple group of six,
thirty-secondth notes with a feathered beam:
r64 { c32[ d e f g a] } | b1
This fails the bar check because our six notes are not long enough to
fill out the measure. We fix this by first noting the original sequence
is 63 * 64th notes long. We are using 6 * 32nd notes, which is
equivalent to 12 * 64th notes. Scaling by the fraction 63/12 will get
us to our desired goal. You can confirm this by noting the bar check in
the following passes:
r64 { c32*63/12[ d e f g a] } | b1
Now that we have the correct total duration, we can add in feathering.
Consider the following to confirm that we have indeed achieved what we
wanted:
<< { r64 \featherDurations #(ly:make-moment 2/1)
{ c32*63/12[ d e f g a] } | b1 }
{ r64 { c64 d32 e16 f8 g4 a2 } | b1 } >>
In this case, we used the moment of 2/1 because we wanted each note to
be twice the length of its preceding note, which is what our
manually-written ritardando did. If you change the moment to some other
fraction, you can see how it ultimately affects the individual timing of
the notes within the sequence by comparing it to the original sequence.
At the end of the day, there is no real need to use any math for the
\featherDurations moment. Any positive rational less than one will
produce an accelerando, while fractions greater than one generate a
ritardando. The best thing to do is to listen to the MIDI output and
determine if it sounds right to your ear.
I said earlier we would talk about bar checks *within* the feathered
sequence of notes. Consider the following addition to our example:
<< { r64 \featherDurations #(ly:make-moment 2/1)
{ c32*127/14[ d e f g a | b] } }
{ r64 \featherDurations #(ly:make-moment 2/1)
{ c32*63/12[ d e f g a] } | b1 }
{ r64 { c64 d32 e16 f8 g4 a2 } | b1 } >>
You'll see that the 'b' is included within the beamed notes. Because we
now have seven notes covering the period of two measures less one 64th,
we had to adjust our scaling fraction to 127/14. However, what is most
important is that \featherDurations fixes the timing of the notes to
allow the inside bar check to pass. Omit it, and you'll see that the
bar check fails. But also try changing the 2/1 moment to anything else,
and the bar check will also fail.
What we have here is a very fragile element in the score that can be
easily avoided by never requiring any note (apart from the first) within
a feathered sequence to align to anything else. The final 'b' above
should properly be outside the feathered sequence (or possibly start a
new sequence of its own). In this way, the math to ensure all of the
sequences have the right lengths can be done completely independent of
\featherDurations.
Hopefully some of this will be helpful.
-- Aaron Hill
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user