Am 05.10.2014 um 10:03 schrieb Jay Vara:
I have a song.ly file which prints a song. Is it possible for someone to
print the song with a transposition, say c to d, without editing the .ly
file? Something like:

\transpose c d {\include song.ly}

I had a similar problem some time ago.

I included the following lines in song.ly

#(define transposeTo
   (if (defined? 'transposeTo)
       transposeTo
       #{ c #}))

melody = { ... }
chords = {... }

\score {
   \transpose c $transposeTo
   <<
     ...chords ...
     ...melody ...
   >>
}

Then you simply make a new file song-in-d.ly:

#(define transposeTo #{ d #})
\include "song.ly"



HTH,

Marc












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



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

Reply via email to