lilypond-user
[Top][All Lists]
Advanced

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

Re: optional transposition triggered by an external file?


From: David Rogers
Subject: Re: optional transposition triggered by an external file?
Date: Mon, 29 Jul 2013 17:30:53 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

Marc Hohl <address@hidden> 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



reply via email to

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