Thanks, that worked. I ended up going with the following since it allows
you to use it inside a \relative section, but I'm confused as to why I
needed to use \transpose c c'' instead of \transpose c c' for it to work
correctly. Could you explain why?

 \version "2.17.95" %version change since I switched computers


octava =

#(define-music-function

(parser location music-input)

(ly:music?)

#{

\new Voice << $music-input \transpose c c'' $music-input >>

#})


\relative c' {

\octava { c d e f }

}



On Sat, Dec 14, 2013 at 8:41 PM, Paul Morris <p...@paulwmorris.com> wrote:

> Alex Loomis wrote
> > Could someone explain why this doesn't work?
>
> I think you need to use $music-input instead of #music-input:
>
> \version "2.16.1"
> octava =
> #(define-music-function
> (parser location music-input)
> (ly:music?)
> #{
> \partcombine $music-input \transpose c c' $music-input
> #})
> \octava { c' d' e' }
>
>
> (Note I don't have 2.16.2 installed, so I changed it to 2.16.1 but I don't
> think that should make a difference here.)
>
> HTH,
> -Paul
>
>
>
> --
> View this message in context:
> http://lilypond.1069038.n5.nabble.com/Doubling-at-the-octave-tp155799p155800.html
> Sent from the User mailing list archive at Nabble.com.
>
> _______________________________________________
> 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