paolo prete <> 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

lilypond-user mailing list

Reply via email to