On 3/22/09 6:26 PM, "MonAmiPierrot" <pierofaust...@hotmail.com> wrote:

> 
> 
> 
> 
> Peter Chubb-6 wrote:
>> 
>>>>>>> "Peter" == Peter Chubb <lily-u...@chubb.wattle.id.au> writes:
>> 
>> Peter> I embed Lily in a shell script for that kind of thing (I'm
>> Peter> running on Unix):
>> 
>> 
>> 
> 
> Thanks Peter, but it seems I didn't explain myself:
> what I need is sometihng like this (the syntax is invented: I don't know
> scheme] directly IN lily files:
> 
> LilyVers = [Get lilypond version: "2.10" or "2.12"]
> IF LilyVers = "2.10" THEN Notes = {c d e} ELSE Notes = {c^\newMarkupCommand
> d\newCommand e\newStuff }
> \score { \Notes }

ifVersionTwoTen = 
#(define-music-function (parser location twoTenMusic twoTwelveMusic)
  (ly:music? ly:music?)
  (let ((lily-version (ly:version)))
    (if (eq? (cadr lily-version 10))
        twoTenMusic
        twoTwelveMusic)))

myNotes = {
  \ifVersionTwoTen
   {c d e}
   {c^\newMarkupCommand d \newCommand e \newStuff}
}

\score { \Notes }

HTH,

Carl



_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to