[prev in list] [next in list] [prev in thread] [next in thread] 

List:       lilypond-user
Subject:    scheme function for transposition
From:       Josiah Boothby <josiahb () gmail ! com>
Date:       2009-05-31 22:16:06
Message-ID: 6eb14ed10905311516k2bb52be1le57a56606e39d343 () mail ! gmail ! com
[Download RAW message or body]

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



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic