\transpose c $trans { \firstNotes }
<string>:2:17: error: syntax error, unexpected MUSIC_IDENTIFIER,
expecting NOTENAME_PITCH or TONICNAME_PITCH

The only solution i know is to use the scheme equivalent of \transpose :
    ly:music-transpose
But it is a bit harder...

%%%%%%%%%%%%%%%%%%%%%%%%

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

first = #(define-music-function (parser location trans)(ly:music?)
(let* (
   (trans-note (car (ly:music-property trans 'elements)))
   (trans-pitch (ly:music-property trans-note 'pitch))
   (delta-pitch (ly:pitch-diff trans-pitch (ly:make-pitch -1 0 0))))
;% (display delta-pitch)(newline)
(ly:music-transpose (ly:music-deep-copy firstNotes) delta-pitch)
))

\score {<<
\new Staff \firstNotes \new Staff \first d \new Staff \first e
 >>
}

%%%%%%%%%%%%%%%%%%%%%%%

Gilles




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

Reply via email to