lilypond-user
[Top][All Lists]
Advanced

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

Re: Change the duration of a chord defined as a variable


From: David Kastrup
Subject: Re: Change the duration of a chord defined as a variable
Date: Tue, 06 Mar 2018 12:14:40 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)

paolo prete <address@hidden> writes:

> Hello.
>
> How can I change the duration of a chord defined as a variable?
> I want to obtain something like:
>
> chord = <f' a'>
>
> { \chord 8 }

\version "2.18.0"
chord =
#(define-music-function (parser location dur) (ly:duration?)
    #{ <f' a'> $dur #})

For recent 2.19, you can leave out the "parser location" blurb.

I am not sure whether this kind of usage might be common enough to
warrant creating an \etc syntax for it, like

chord = <f' a'> \etc

{ \chord 8 }

It might actually be desirable for guitar chord variants outside of
\chordmode.  Or even in \chordmode.

-- 
David Kastrup



reply via email to

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