lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fwd: Dividing ties and adjusting ties in an arpeggiated chord


From: madMuze
Subject: Re: Fwd: Dividing ties and adjusting ties in an arpeggiated chord
Date: Sat, 2 Apr 2011 23:49:31 -0700 (PDT)

>It will be interesting to see if it works
>in this example where there is more than one tie at a time.
>That potentially answers half my question. I wonder if anyone knows
>how to alter the curve of the ties in this situation.

Oh dear, but you are asking for it !
If one is adept with scheme, some or even much of the following can be
automated. Even so, it's quite a trip down the rabbit hole and only you can
decide if it is worth the grief.

You can, of course, write your own code to shape and position ties and place
it in your style file. The example code in the notation reference under
"difficult tweaks" is the model to follow. This could include any number of
conditions and calculations. However, although the left endpoint and the
inner control points can be determined from the first note of the tie
(X-offset = 0, Y-offset = position on the staff), I know of no way to access
the second note's position directly. Fortunately, the X-offset of the right
endpoint as determined by LilyPond (which varies in relation to the note)
can be retrieved:

        \override Score.Tie #'after-line-breaking = #(lambda (grob)
                (let*   (
                        (noteL (ly:grob-parent (ly:grob-original grob) X)) % 
left notehead
                        (endX (car (cadddr (ly:tie::calc-control-points 
grob)))) % right endpoint
of tie
                        (dotX (ly:duration-dot-count (ly:event-property 
(event-cause noteL)
'duration))) 
                                % number of dots on left notehead
                        (noteY (ly:grob-property noteL 'Y-offset)) % vertical 
position of
notehead
                        (taiDir (ly:tie::calc-direction grob)) % tie direction 
according to
LilyPond
                        % … … … many, many things would follow to account for 
most,
                        % if not all, possibilities

I know almost nothing of scheme and have gleaned these bits from the very
nice and intelligent people on this forum. You'll need a good bit of scheme,
a deep understanding of the Bezier function (in order to quantize the hump
and avoid staff-line collisions), and a couple hours/days/months to
experiment, if you plan to go this route. A similar routine could be created
incorporating variables along with "\once \override…" for adjusting
occasional, rather than default, behavior.

% freak not, remember to breathe %

You can also separate the chord into different voices and use:

        \override Staff.NoteColumn #'ignore-collision = ##t % and afterwards, 
##f

to allow the notes to line up vertically. (You would have to manually offset
seconds.) Then, each voice can have its own command, allowing you to realize
your dream of controlling the ties independently:

        \once \override Voice.Tie #'control-points = …

You can, of course, create definitions and shortcuts to simplify the
process. You may need more than four voices:
        voiceFive = #(context-spec-music (make-voice-props-set 4) 'Voice)
…
        voiceNine = #(context-spec-music (make-voice-props-set 8) 'Voice)

You will certainly need some patience, and you will probably only resort to
these measures under compulsion. Print publishers usually do in fact compel
copyists to make these emendations; I applaud your standards and desire for
clarity.

Oh, and one other trick, not as flexible as the snippet Eluze mentioned, but
my battered mind finds this easier (does version 2.14 have the snippet built
in?):
If, in your style file, you set all ties to a low layer; for instance:

        \override Score.Tie #'layer = #-2

you can then put something like this in your definitions file:

blnkIt = #(define-music-function (parser location left bottom width height) 
(number? number? number? number?)
        #{
                \new Voice { \voiceNine
                        \once \override Voice.TextScript #'layer = #-1
                        \once \override Voice.TextScript 
#'outside-staff-priority = ##f
                        \once \override Voice.TextScript #'X-extent = #'(0 . 0)
                        \once \override Voice.TextScript #'Y-extent = #'(0 . 0)
                        \once \override Voice.TextScript #'X-offset = #0
                        \once \override Voice.TextScript #'Y-offset = #0
                        s1*0-\markup { \with-color #white \filled-box 
                        #(cons $left (+ $left $width)) #(cons $bottom (+ 
$bottom $height)) #0 }
                }
        #}
)

Size and position the box to blank out any portion of the tie (or anything
you might assign to the lower layer). $left = 0 is the point in the music
where you place the command; $bottom = 0 is the center line of the staff. I
use voiceNine so it can be positioned independently of any other text at
that point in the music. If you can't see where the box is, change #white to
#red until you get it in place. To blank out around a downward stem, you
might try:

\blnkIt #-0.25 #-2 #0.6 #4 e'4

and adjust the #-2 and #4 for the vertical position and height.

Feel better now? Red pill or blue pill? (Did anyone ever try both?)
David

-- 
View this message in context: 
http://old.nabble.com/Dividing-ties-and-adjusting-ties-in-an-arpeggiated-chord-tp31299849p31306033.html
Sent from the Gnu - Lilypond - User mailing list archive at Nabble.com.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]