lilypond-user
[Top][All Lists]
Advanced

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

Re: Functions with after-events


From: David Kastrup
Subject: Re: Functions with after-events
Date: Wed, 02 Oct 2019 12:04:17 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Leo Correia de Verdier <address@hidden> writes:

> Dear list!
>
> Something of a still learning question, but I can’t really get my head around 
> it:
>
> Is there a simple way to make the following (or something that would have the 
> same effect) into a function?
>
> \version "2.19.82"
> \fixed c'' {
>  d8
>   -\tweak minimum-length #5
>   -\tweak springs-and-rods #ly:spanner::set-spacing-rods 
>   \glissando 
>   cis }
>
> So it could be written as something like the following hypothetical code:
>
> d8 \glissandoWithMinLength #5 cis
>
> Or is it just too complicated to be worth it?

A slightly different approach in order to avoid the explicit event
function definition:

\version "2.19.83"

withMinLength = -\tweak springs-and-rods #ly:spanner::set-spacing-rods
                -\tweak minimum-length \etc


\fixed c'' {
  d8 \withMinLength #5 \glissando
  cis
}

-- 
David Kastrup

reply via email to

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