denemo-devel
[Top][All Lists]
Advanced

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

Re: [Denemo-devel] Score directives


From: Andreas Schneider
Subject: Re: [Denemo-devel] Score directives
Date: Thu, 02 Apr 2015 20:46:01 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.5.0

Hi Richard,

today, my code from yesterday also worked. I do not understand what
happened.
Your version of the code works perfectly, thank you. I have created a
new menu item under Score > Typesetter. Attached you find the scm and
xml files.

Andreas


Am 02.04.2015 um 10:23 schrieb Richard Shann:
> Hi Andreas,
> 
> It is rather strange - last night I copied and pasted your code and
> tried it and thought I saw it not working like you say. This morning I
> added a line to print out the value of "choice" and of
> (string-append ...) to the console to see what was going on, and it all
> seemed correct and it worked.
> Then I went back and cut and pasted from your email and it was working
> after all.
> Here is your code with the output tidied up and a call to (disp ...)
> which shows you what is going on. The "\n" is scheme syntax for a
> newline, and I have added an if statement to cover the case that the
> user cancels rather than choosing an option.
> 
> 8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><
> 
> ;ScoreRehearsalMarkFormat
> (let ((tag "ScoreRehearsalMarkFormat")
>         (choice (RadioBoxMenu (cons (_ "alphabetic") "#format-mark-alphabet")
>                 (cons (_ "Numeric") "#format-mark-numbers")
>                 (cons (_ "Boxed alphabetic") "")
>                 (cons (_ "Boxed numeric") "#format-mark-box-numbers")
>                 (cons (_ "Circled alphabetic") "#format-mark-circle-alphabet")
>                 (cons (_ "Circled numeric") "#format-mark-circle-numbers"))))
> 
>       (if choice
>               (begin
>                       (disp "The choice made was " choice " and so the 
> LilyPond syntax will be " (string-append "\n\\set Score.markFormatter = " 
> choice) "\n")
>                       (d-DirectivePut-score-postfix tag (string-append 
> "\n\\set Score.markFormatter = " choice))
>                       (d-DirectivePut-score-override tag 
> DENEMO_OVERRIDE_GRAPHIC)
>                       (d-SetSaved #f))))
> 
> 8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><
> 
> (disp ...) is a very nice procedure which Nils created, you can put any
> scheme expressions in it and it will print a representation of them on
> the console.
> 
> Let me know that this works for you. I very much welcome useful commands
> - once this is working from the scheme window, think about which menu it
> should go in and which other command it should follow and right click on
> that command and choose "Save Script as New Menu Item" and follow the
> prompts. 
> 
> When finished you will have two files in
> ~/.denemo-1.2.3/actions/menus/ObjectMenu/...
> called ScoreRehearsalMarkFormat.xml and ScoreRehearsalMarkFormat.scm
> which you can send as attachments (avoids the email mangling danger).
> 
> Richard

Attachment: ScoreRehearsalMarkFormat.scm
Description: Text Data

Attachment: ScoreRehearsalMarkFormat.xml
Description: Text Data


reply via email to

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