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. _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user