Caio Barros <caio.bar...@gmail.com> writes:

> Hello, is it possible to set a variable with just the pitches of a
> chord, for instance, and change its duration latter?
>
> I'm thinking in something like this:
>
> %%%%%%%%%
>
> myChord = <c e g>
>
> \new Voice {
> \relative c'' { \myChord4 \myChord2 }
> }
>
> %%%%%%%%%
>
> or maybe, if it is possible, the durations of many pitches inside the
> variable.

mychord =
#(define-music-function (parser location duration) (ly:duration?)
  #{ <c e g> $duration #})

\new Voice {
\relative c'' { \myChord4 \myChord2 }
}

Note that the interaction of \relative c'' with the chords might not in
all cases be as good-natured.

It also might be worth taking a look at the q method of repeating
chords, but that also is prone to getting confused about octaves when
used in music functions.

-- 
David Kastrup


_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to