There are probably simpler methods to achieve what you want to do. Take a look at the two collections of examples at the web page, Go to lilypond.org, click on Documentation:Index and then on "tips-and-tricks" and "Regression Tests" respectively. The Regression tests document contains an example on how to easily unfold all repeats in a section of music (search for unfolded-repeats). For octava indications, you could easily change the octava in the printed music without changing it in the MIDI output, see the ottava.ly example in the "tips-and-tricks" document.
/Mats
Dr A V Le Blanc wrote:
Often I find I have two different versions of a .ly file, one for printed output and one for midi files. For example, I may want repeats to be expanded when I produce a midi file, but not in printed output. For this purpose, to avoid having to edit a lot of statements, I usually have near the top of the file a line like this
rptarg = "volta"
or like this
rptarg = "unfold"
and I write my repeat statements like this:
\repeat \rptarg 2 {
so that I can change all of them be editing a single line.
It is not so simple with input of other kinds, however. For example, if I have a passage which I want to print with '8va', but to play the actual pitch, I currently do something like this:
%midi \times 2/3 { [ < a8 d, > es g ] } [ < a8. d, > g16 ] %midi %midi < c4 e, > r | \times 2/3 { [ < d,8 %midi \times 2/3 { [ < a,8 \spanrequest \start "text" d, > es g ] } %midi not [ < a8. d, > g16 ] < c4 \spanrequest \stop "text" %midi not e, > r | \times 2/3 { [ < d8 %midi not
where I comment out the '%midi' lines for printed output, and the '%midi not' lines for midi output.
I'd like to have some construct that allows me to do this in a simpler way. For example,
#(define (rptdsp x y) (if (equal? 'rptarg "volta") (display x) (display y)))
and then in the text write something applying rptdsp to two expressions, so that one of them would automatically be used when rptarg is defined to volta, and one when it is not. But I don't quite understand the lilypond/scheme inteface well enough to see how to do this. In older lilypond.doc files there used to be something about an 'apply' function, but I can't find that in the 1.6.6 manual. And I'm uncertain as to how to pass two arguments to a scheme function from an ly file.
-- Owen [EMAIL PROTECTED]
_______________________________________________ Lilypond-user mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/lilypond-user
-- ============================================= Mats Bengtsson Signal Processing Signals, Sensors and Systems Royal Institute of Technology SE-100 44 STOCKHOLM Sweden Phone: (+46) 8 790 8463 Fax: (+46) 8 790 7260 Email: [EMAIL PROTECTED] WWW: http://www.s3.kth.se/~mabe =============================================
_______________________________________________ Lilypond-user mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/lilypond-user
