lilypond-user
[Top][All Lists]
Advanced

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

Re: Change duration of notes inside a variable


From: David Kastrup
Subject: Re: Change duration of notes inside a variable
Date: Mon, 05 Dec 2011 13:20:13 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.90 (gnu/linux)

Caio Barros <address@hidden> 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




reply via email to

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