lilypond-user
[Top][All Lists]
Advanced

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

My first define-music-function, I'm trying, need help


From: Rick Hansen (aka RickH)
Subject: My first define-music-function, I'm trying, need help
Date: Thu, 21 Dec 2006 14:48:24 -0800 (PST)

The simple substitution example below should be pretty easy, but I'm "in a
pickle", can someone show me how to replace the note name in the transpose
statement with the note specified on the function call (parameter called
"root")?

But it gets the following error:

<string>:2:13: error: syntax error, unexpected MUSIC_IDENTIFIER, expecting
NOTENAME_PITCH or TONICNAME_PITCH
\transpose c 
             \lilyvartmpb { \relative { <c e g> } }


<<<<<<<< EXAMPLE BEGIN

\version "2.11.4"
\include "english.ly"

myChord = #(define-music-function (parser location root) (ly:music?)
#{
\transpose c $root { \relative { <c e g> } }
#})

   \new Staff {

        % An A chord
        %\transpose c a { \relative { <c e g> } }

        % Theoretically, this should also generate "an A chord" just like
above
        \myChord a

   }



<<<<<<<< EXAMPLE END


-- 
View this message in context: 
http://www.nabble.com/My-first-define-music-function%2C-I%27m-trying%2C-need-help-tf2868174.html#a8016450
Sent from the Gnu - Lilypond - User mailing list archive at Nabble.com.





reply via email to

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