On Thu, Dec 21, 2006 at 02:48:24PM -0800, [EMAIL PROTECTED] 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> } } >
Well I am not a lily schemer expert neither. I found a function to transpose in the lily sources: (set! root (ly:pitch-transpose root (ly:make-pitch 1 0 0))) this makes note "root" one octave higher. What you have to do: - get wanted pitch: (ly:music-property (first (ly:music-property root 'elements)) 'pitch) - apply "ly:pitch-transpose" for each note of the chord: (map do-transpose (ly:music-property chords 'elements)) you have to write "do-transpose" an a function that do the job :-) For example, have a look at the "removeTies" function here: http://lilypond.chezwam.org/darcs/lilypond/utils/chezwam-functions.ly This was my first scheme function I hope this will help you. I will have a look on your's after my vacations. Merry Xmas & happy new year. -- Sebastien Gross _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user