Is there a way to do something similar to this:

\include "english.ly"

x = { c }
y = { g }

\score {
<<
\new Staff {
    \clef "bass"

    \relative \x { d e f g a }

    \relative \y { bf a c d }

    }
>>
    }


Perhaps I need to write a function that sends in a variable?

How does one dereference a variable inside of a function?

For instance if I sent in \x how do I say "use the value of x"? Or is that
necessary?

This doesn't seem to work either -

MyTestFunction =
#(define-music-function
     (parser location firstnote secondnote thirdnote fourthnote fifthnote
sixthnote )
     ( ly:music? ly:music? ly:music? ly:music? ly:music?  ly:music? )
   #{
                \relative $firstnote { $firstnote    $secondnote
$thirdnote  }
                \relative $sixthnote { $fourthnote  $fifthnote $sixthnote }
   #})


Any help would be appreciated, I have looked at some other functions, but
haven't seen anything similar.

Thanks,
Daniel
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to