I'm confused trying to use scheme to create a function. I've tried
several things, but the current function (dysfunction?) and
application looks something like this:

% code snippet
\version "2.12.2"

firstNotes = \relative c' { c4 d e f }

first =
#(define-music-function
  (parser location trans)
  (ly:music?)
  #{
    \transpose c $trans { \firstNotes }
  #}
)

score {
  \new Staff { \first d }
}
% end code snippet

I get an error for this:

Parsing...
<string>:2:17: error: syntax error, unexpected MUSIC_IDENTIFIER,
expecting NOTENAME_PITCH or TONICNAME_PITCH
    \transpose c
                 \lilyvartmpb { \firstNotes }
sample.ly:15:2: error: errors found, ignoring music expression

  \new Staff { \first d }

Any ideas on how to fix this?

Thank you,

Josiah


_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to