[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Command switch based on Lily version?
From: |
Carl D. Sorensen |
Subject: |
Re: Command switch based on Lily version? |
Date: |
Sun, 22 Mar 2009 18:57:39 -0600 |
On 3/22/09 6:26 PM, "MonAmiPierrot" <address@hidden> wrote:
>
>
>
>
> Peter Chubb-6 wrote:
>>
>>>>>>> "Peter" == Peter Chubb <address@hidden> 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