Marc Hohl <m...@hohlart.de> writes:

> Hello list,
>
> for my current project I have some scores located in
> individual files:
>
> A.ly
> B.ly
> C.ly
>
> which can be compiled independently, and a latex file
> containing calls like this
>
> \lilypondfile{A.ly}
>
> [... some text ...]
>
> \lilypondfile{B.ly}
>
> [... even more text ...]
>
> \lilypondfile{C.ly}
>
> This works fine.
>
> Now I want to include an appendix for transposing instruments
> (Saxophone in e flat etc.) where all the files are transposed
> accordingly.
>
> Now my (probably way too complicated and crude) idea sounds like this:
>
> I need a way to define an optional variable that controls (if defined)
> the transposition so I can say, for example:
>
> \begin{appendix}
> \chapter{For Bb instruments}
> \begin{lilypond}
> #(define transposeTo d)
> \include{A.ly}
> \end{lilypond}
>
> \begin{lilypond}
> #(define transposeTo d)
> \include{B.ly}
> \end{lilypond}
>
> ...
> \end{appendix}


I've never tried this. Is it even possible to define things in the latex
file that are then parsed by Lilypond? If it is possible, perhaps adding
a special line inside each of A.ly, B.ly, and C.ly, which contains
\transpose C \transposeTo . That looks to me [if it was going to work at
all] as if your .ly files would then refuse to work if you ever forgot
to define \transposeTo in your latex file - but maybe it's worth it.

-- 
David R

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

Reply via email to