On 15.12.23 21:33, Richard Shann wrote:
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).
Thanks for your quick response. So I need to make a menu item out of it
in order to test it. I did that and now I proceed a little bit further
and can enter some incipit (e.g. \clef "mensural-c2" \time 3/2 d' 2 c' 1
d' 2 e' d' e'), but finally I get the error
(#f Wrong number of arguments to ~A (#<procedure
d-DirectivePut-staff-prefix (_ _)>) #f)
wrong-number-of-args
What do I do different than in InstrumentName?
Andreas