[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: My first define-music-function, I'm trying, need help
From: |
Rick Hansen (aka RickH) |
Subject: |
Re: My first define-music-function, I'm trying, need help |
Date: |
Fri, 22 Dec 2006 07:30:14 -0800 (PST) |
Anybody?
Rick Hansen (aka RickH) wrote:
>
> 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#a8024742
Sent from the Gnu - Lilypond - User mailing list archive at Nabble.com.
- My first define-music-function, I'm trying, need help, Rick Hansen (aka RickH), 2006/12/21
- Re: My first define-music-function, I'm trying, need help,
Rick Hansen (aka RickH) <=
- Re: My first define-music-function, I'm trying, need help, Sébastien Gross, 2006/12/22
- Re: My first define-music-function, I'm trying, need help, Rick Hansen (aka RickH), 2006/12/22
- Re: My first define-music-function, I'm trying, need help, Sébastien Gross, 2006/12/22
- Re: My first define-music-function, I'm trying, need help, Geoff Horton, 2006/12/22
- Re: My first define-music-function, I'm trying, need help, Paul Scott, 2006/12/23