denemo-devel
[Top][All Lists]
Advanced

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

Re: "New from Current" - an instant "template" from your current score.


From: Joe Wilkinson
Subject: Re: "New from Current" - an instant "template" from your current score.
Date: Mon, 18 Nov 2019 12:39:26 +0000
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.9.1

Thanks Richard.

I didn't know if let and set! had two different functions.

Joe

On 18/11/2019 09:29, Richard Shann wrote:
On Sun, 2019-11-17 at 21:32 +0000, Joe Wilkinson wrote:
They can go

This does what I want

(d-AddVerse)
;LyricFontSize
(let ((text #f))
(d-InsertTextInVerse (string-append "\n\\override LyricText.font-size 
= 
#-2 \n"))
  (d-SetSaved #f))
;InsertStanzaNumber
(let ((text "1. "))
(set! text  "Ch.")
You want to have just
(let ((text "Ch."))
  
here, the initialization of text to "1. " is immediately overwritten by
setting it to "Ch."


(d-InsertTextInVerse (string-append  "\\set stanza = \\markup {" 
"\\fontsize #-2  "  text "}\n"))
(d-SetSaved #f))

It is easier to put the command in and then edit the stanza line
than 
doing it interactively (for my purposes anyway)

And I think I could lose the first SetSaved command.
yes - you only need do it at most once, anywhere in your script.
Indeed, many commands you call are scripts that alter the score and
make that call (to mark the score as unsaved) themselves - 
d-InsertTextInVerse 
does this, so you don't need to call d-SetSaved in your script at all.

Richard


reply via email to

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