[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Arrows indicating split/combined voices (aka snippet #650) overlappi
From: |
Aaron Hill |
Subject: |
Re: Arrows indicating split/combined voices (aka snippet #650) overlapping TimSignature changes |
Date: |
Wed, 03 Apr 2019 03:43:21 -0700 |
User-agent: |
Roundcube Webmail/1.3.8 |
On 2019-04-03 1:01 am, Michael Gerdau wrote:
in the Snippet Repository there is under number 650
(http://lsr.di.unimi.it/LSR/Snippet?id=650) a rather neat snippet
showing splitting and converging arrows for voices. However with
increasing frequency I'm encountering timesignature changes where
these splits occur. In those cases the arrows aren't correctly
positioned.
Now the arrows are no longer nicely visible.
Is there a way to adjust the position when there is a TimeSignature at
the end of a line?
One option would be to attach the arrows to the TimeSignature instead of
the BarLine. This keeps the arrows right-most, which looks better to my
eye.
I have made many alterations to the LSR 650 snippet, so please review
the attachment.
- The definition of arrow-at-angle was off in places. Annoyingly,
\rotate only supports rotation about the center. We actually want to
rotate relative to the starting point of the arrow. The solution is to
use the internal ly:stencil-rotate which lets you rotate from any point.
As a bonus, it lets you specify this point relative to the extent of
the stencil. This saves on all of the trigonometric work. Also, the
arrow head was slightly disjoint from the end of the line.
- Things like \splitStaffBarLine and \convDownStaffBarLine were changed
to music functions that accept a grob name as an argument. That means
it becomes \splitStaff BarLine or \convDownStaff TimeSignature. Note
the space!
- The arrows looked best when directly attached to the BarLine, but I
felt they needed a little padding when attached to the TimeSignature.
This is done currently with a hard-coded conditional in each of the
music functions.
- Lastly, I used some \tags to support conditionally altering
TimeSignatures, and there is a second \score demonstrating that.
This feels a little hacking in places, but that is often the case when
playing around with stencils. Especially when one is changing the
stencil but lying about its dimensions. These arrows have no proper
extents, which is of course why you saw the overlap in the first place.
The problem with trying to attach the arrows to the BarLine and giving
them proper extents is that the lines from the StaffSymbol would extend
further to the right to accommodate the wider dimensions. This does
have as a side effect that the TimeSignatures would appear further to
the right to prevent overlap.
If this is not a problem, then it may perhaps be another option. All
you need to do to play around with this is change the \with-dimensions
lines to be something more appropriate. For instance, try:
\with-dimensions #'(0 . 3) #'(-2 . 2).
-- Aaron Hill
lsr650-patch.ly
Description: Text document
lsr650-patch.pdf
Description: Adobe PDF document