lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Transpose a lilypond file


From: Jay Vara
Subject: Re: Transpose a lilypond file
Date: Sun, 5 Oct 2014 11:00:56 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]