On Fri, 2023-12-15 at 19:48 +0100, Andreas Schneider wrote:
I'm trying to write a Scheme script for an incipit
(
https://lilypond.org/doc/v2.23/Documentation/notation/working-with-anc
ient-music-_002d-scenarios-and-solutions#incipits).
I have started from the script for instrument name and modified it to
match my needs arriving at the following:
;;;Incipit
(let ((tag "Incipit") (current "") )
(if (string? Incipit::params)
(begin
(set! current Incipit::params)
(set! Incipit::params #f)))
(set! current (d-GetUserInput (_ "Incipit") (_ "Give incipit for
current
staff:") current))
(if (string? current)
(begin
(d-DirectivePut-staff-prefix tag (string-append "incipit { "
current
" }")
(set! Incipit::params current)))))
Unfortunately, I get a script error
the error message ends:
(#f Unbound variable: ~S (Incipit::params) #f)
Denemo - WARNING :
The tag is
unbound-variable
Which is telling you that Incipit::params in an unbound-variable. This
variable would be created if you invoked this script via a command
called Incipt - that is each command in the menu creates a variable
named xxxx::params when it is invoked (setting it to #f if its invoked
from a menu).