[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
optional transposition triggered by an external file?
From: |
Marc Hohl |
Subject: |
optional transposition triggered by an external file? |
Date: |
Mon, 29 Jul 2013 16:29:09 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130623 Thunderbird/17.0.7 |
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}
As an alternative, the #(define ...) stuff could be hidden in a file
transposeToBes.ily and the above calls change to
\begin{appendix}
\chapter{For Bb instruments}
\begin{lilypond}
\include{transposeToBes.ily}
\include{A.ly}
\end{lilypond}
\begin{lilypond}
\include{transposeToBes.ily}
\include{B.ly}
\end{lilypond}
...
\end{appendix}
Is this feasible, or am I overlooking the obvious?
I like the idea of having compilable standaloe files for each
piece of music, so this is what I want to achieve.
Regards,
Marc
- optional transposition triggered by an external file?,
Marc Hohl <=