Le Mon, 01 Aug 2011 21:39:16 +0200, Graham Percival
<gra...@percival-music.ca> a écrit:
Could you pass a
command on the command line and tell Lilypond to process the source file
and change it to a bass clef instead? without changing the source file
permanently? Could this be done using the Scheme evaluate function?
Yes. Use \tag, and look on LSR for more information. There's 1
or 2 examples of this there.
I have tested nevertheless this file on the command line (according to the
doc):
*****************
the file "test1" :
%%%%%%%%%%%%%%%%%%%%%%%%
#(use-modules (guile-user)) %% make a warning !!! bug ?
clefSol = \clef treble
clefBass = \clef bass
%% #(define original-clef? #t)
#(define myclef (if (and (defined? 'original-clef?) original-clef?)
clefBass
clefSol))
music = { \myclef c'1 }
{ \music }
%%%%%%%%%%%%%%%%%%%%%%%
The command line that works in Windows is this :
lilypond -e "(define-public original-clef? #t)" test1.ly
*****************
Some comments :
1-In the doc, they say to put the scheme expression inside apostrophe
lilypond -e '(define-public original-clef? #t)' test1.ly
but this fails. (The apostrophes have perhaps other meanings in Windows).
2- The line #(use-modules (guile-user)) makes the warning :
WARNING: #f: imported module (guile-user) overrides core binding
`%module-public-interface'
3- "define" instead of "define-public" seems to work too :
lilypond -e "(define original-clef? #t)" test1.ly
Gilles
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user