lilypond-user
[Top][All Lists]
Advanced

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

Re: Lilypond with the Command Line


From: Gilles
Subject: Re: Lilypond with the Command Line
Date: Tue, 02 Aug 2011 09:46:54 +0200
User-agent: Opera Mail/11.50 (Win32)

Le Mon, 01 Aug 2011 21:39:16 +0200, Graham Percival <address@hidden> 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


        




reply via email to

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