Marc > > #(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" >
Very nice. And easy to add to my existing .ly files. This idea may also work for another issue I have. Different number of music pieces in the score. \musicA \musicB \musicC etc. In some cases only two are defined and in some cases five or six are defined. I should be able to used the defined? construct to handle that. Thanks. Jay _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user