[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to make multiple synced lassez-vibres?
From: |
Caagr98 |
Subject: |
Re: How to make multiple synced lassez-vibres? |
Date: |
Tue, 21 Nov 2017 14:40:06 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 |
It's better, but they still don't extend to the end of the bar.
Also, I prefer creating new variants of commands rather than modifying existing
ones when possible:
lv = \tweak stencil #enlarged-extent-laissez-vibrer::print \laissezVibrer
On 11/21/17 14:34, Ben wrote:
> On 11/21/2017 8:28 AM, Caagr98 wrote:
>> In the attached image, it looks like several LVs streched to the barline.
>> However, if I simply try to write the notes with LVs, the arc is
>> ridiculously short (see second image). How can I make that look proper?
>>
>> I could replace it with a pedal, but I want to replicate it as faitfully as
>> possible.
>>
>
> I don't need to do this often, but this code I saved from a while ago on the
> mailing list - how does this look?
> (see attached)
>
> %%%%
> #(define factor 2)
>
> #(define (enlarged-extent-laissez-vibrer::print grob)
> (let* ((stil (laissez-vibrer::print grob))
> (stil-ext (ly:stencil-extent stil X))
> (stil-length (interval-length stil-ext))
> (new-stil-length (* stil-length factor))
> (scale-factor (/ new-stil-length stil-length))
> (new-stil (ly:stencil-scale stil scale-factor 1))
> (new-stil-ext (ly:stencil-extent new-stil X))
> (x-corr (- (car stil-ext) (car new-stil-ext))))
> (ly:stencil-translate-axis
> new-stil
> x-corr
> X)))
>
> #(assoc-set! (assoc-ref all-grob-descriptions 'LaissezVibrerTie)
> 'stencil enlarged-extent-laissez-vibrer::print)
>
> \relative c' {
> <c e g c>\laissezVibrer
> }
>
>
> _______________________________________________
> lilypond-user mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/lilypond-user
>