On 7 August 2011 17:28, Volker Paul <[email protected]> wrote:
> Hello,
>
> there is something I don't understand. In the following example:
>
> \version "2.12.3"
> v = { c }
> \chordmode { c }
> \chordmode { \v }
>
> I expected to see two times the same result, but
> only the first expression yields a chord.
> The second yields only one C note, and it is
> surprisingly one octave deeper.
>
> Questions:
> How can I get a chord from a variable?
v = \chordmode { c }
> Why doesn't it work this way?
Probably because
v = { c }
is the same as
v = \notemode { c }
\notemode is the default state for parsing objects inside braces.
> Why is this result one octave deeper?
That's the correct pitch for such a note unless it's in a \relative
block with a different octave for the start pitch.
\chordmode { \v }
is the same as
{ c }
unless you force a mode change when defining the variable.
Cheers,
Neil
_______________________________________________
lilypond-user mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-user