lilypond-user
[Top][All Lists]
Advanced

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

Re: Chord from a variable


From: Neil Puttock
Subject: Re: Chord from a variable
Date: Sun, 7 Aug 2011 22:05:21 +0100

On 7 August 2011 19:14, Volker Paul <address@hidden> wrote:

> Is there such a thing as forcing a mode change when READING the variable?
> Or is there another function that builds a chord on a
> note stored in a variable?

\version "2.14.2"

v = { c }

\musicMap #(lambda (m)
             (and (music-has-type m 'event-chord)
                  (= (length (ly:music-property m 'elements)) 1)
                  (let ((elt (car (ly:music-property m 'elements))))
                    (set! (ly:music-property m 'elements)
                          (construct-chord-elements
                           (ly:music-property elt 'pitch)
                           (ly:music-property elt 'duration)
                           '()))))
             m)

\chordmode { \v c:min }

`construct-chord-elements' is the internal function which the parser
uses to generate chords in \chordmode.

Cheers,
Neil



reply via email to

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