|
From: | Pierre Perol-Schneider |
Subject: | Re: BendBefore / BendSpanner examples? |
Date: | Tue, 2 Jun 2020 17:31:18 +0200 |
Am So., 31. Mai 2020 um 16:24 Uhr schrieb Wim van Dommelen <mail@wimvd.nl>:Showing LilyPond to a friend is sometimes tricky. The question: "Oh, can it do this or that?" easily pops up.I "survived" the BendAfter question, but had to let go for a BendBefore (or 'doit'?) example.Diving in at home later that day I found some interesting things done with a new(?) BendSpanner-grob for a guitar, and several people having put a bounty for further work on this. This goes back to 2013, 2016, 2019, apparantly not an easy question. The BendSpanner-grob example goes way behind what I probably ever will need, in fact I would probably have enough with the coding for (some of) my examples.I've extracted 3 examples in 3 .PNG-files, attached. If you want I can also put a bounty out for this ($25 for each example via PayPal?, first come, first serve). My bending is aimed at a bass clarinet, but that is probably irrelevant for you.....The 3 examples:1:(the bar-number "12" is irrelevant, btw.)2:3:Can someone help me?Regards,Wim.Hi Wim,the BendSpanner-grob is not in the source and was done for Tabs only.Pierre already posted some suggestions.Her my own, affecting RepeatTie:#(define repeat-tie->bend-before
(lambda (rt)
(let* ((cps (ly:grob-property rt 'control-points))
(thick (ly:grob-property rt 'line-thickness 0.1))
(details (ly:grob-property rt 'details))
(gradient (assoc-get 'gradient details '(0.8 . 1.5)))
(left-space (assoc-get 'left-space details 0.5))
(height (assoc-get 'height details 0.7))
(cp-1 (car cps))
(start
(cons
(- (car cp-1) (car gradient))
(- (cdr cp-1) (cdr gradient)))))
(ly:grob-set-property! rt 'X-extent (cons (- (car start) left-space) 0))
(make-tie-stencil start (last cps) thick DOWN height))))
bendBefore =
<>
-\tweak stencil #repeat-tie->bend-before
_\repeatTie
%%%%%%%%%%%%%%%%%%%%%
%% Examples
%%%%%%%%%%%%%%%%%%%%%
{
c''4
\bendBefore
c''
}
%% customizing possibilities{
c''4
\override RepeatTie.details.gradient = #'(0.5 . 0.5)
\bendBefore
c''
}
{
c''4
\override RepeatTie.details.left-space = 1
\bendBefore
c''
}
{
c''4
\override RepeatTie.details.height = 4
\bendBefore
c''
}
{
c''4
\shape #'((0 . 0) (0 . 0) (-0.5 . 0) (-0.5 . 2)) RepeatTie
\bendBefore
c''
}Cheers,Harm
[Prev in Thread] | Current Thread | [Next in Thread] |