Wrote my first music function and it crashed with a lot of error
messages.
TieMarkup =
#(define-music-function
(parser location xpos len)
(number? number?)
#{
\markup
\override #'(adjust-x-pos . #xpos)
\override #'(adjust-length . #len)
\undertie
#})
Calling it with \TieMarkup #1.0 #1.5
Can anyone point me in the right direction? Thanks in advance.
Ursus
----
Starten lilypond-windows.exe 2.18.2 [Score.ly]...
Verwerken van 'D:/Lilypond/_Voorbeelden/Undertie Lyrics/Score.ly'
Ontleden...
D:/Lilypond/_Voorbeelden/Undertie Lyrics/undertie.ly:138:2 <0>: fout:
GUILE signaleerde een fout voor de expressie beginnend alhier
#
(define-music-function
D:/Lilypond/_Voorbeelden/Undertie Lyrics/undertie.ly:138:2 <1>: fout:
syntax error, unexpected EVENT_IDENTIFIER
#
(define-music-function
D:/Lilypond/_Voorbeelden/Undertie Lyrics/undertie.ly:139:34 <2>: fout:
syntax error, unexpected EVENT_IDENTIFIER, expecting '='
(parser location xpos len
)
D:/Lilypond/_Voorbeelden/Undertie Lyrics/undertie.ly:141:10 <3>: fout:
GUILE signaleerde een fout voor de expressie beginnend alhier
#
{
D:/Lilypond/_Voorbeelden/Undertie Lyrics/undertie.ly:143:28 <4>: fout:
GUILE signaleerde een fout voor de expressie beginnend alhier
\override #
'(adjust-x-pos . #xpos)
D:/Lilypond/_Voorbeelden/Undertie Lyrics/undertie.ly:143:27 <5>: fout:
verkeert type voor argument 1. Verwacht pair, gevonden #<unspecified>
\override
#'(adjust-x-pos . #xpos)
D:/Lilypond/_Voorbeelden/Undertie Lyrics/undertie.ly:143:50 <6>: unknown
# object
Unbound variable: {
D:/Lilypond/_Voorbeelden/Undertie Lyrics/undertie.ly:143:49 <7>: unknown
# object
C:/Program Files
(x86)/LilyPond/usr/share/lilypond/current/scm/lily.scm:1039:21 <8>: In
procedure reverse! in expression (ly:parse-file file-name):
C:/Program Files
(x86)/LilyPond/usr/share/lilypond/current/scm/lily.scm:1039:21 <9>:
Wrong type argument in position 1: (#<unspecified> . #f)
Afgesloten met returncode 1.
------ Origineel bericht ------
Van: "E Appeldoorn" <ursus.k...@gmail.com>
Aan: "Andrew Bernard" <andrew.bern...@gmail.com>
Verzonden: 20-4-2019 12:16:36
Onderwerp: Re[2]: Multi non static substition
Andrew,
I will upgrade. As to leaving out the markup text, I just did that for
brevety. It has a LONG underlying include file. Most of which would be
very distracting from my question. I'll look into functions.
Thanks
------ Origineel bericht ------
Van: "Andrew Bernard" <andrew.bern...@gmail.com>
Aan: "E Appeldoorn" <ursus.k...@gmail.com>
CC: "Lilypond" <lilypond-user@gnu.org>
Verzonden: 20-4-2019 11:59:29
Onderwerp: Re: Multi non static substition
HI Ursus,
You will need to use a music function. You can look this up in the
notation reference (NR).
Also, you are making overrides of properties but have not specified
any markup to apply them to. Not sure what you are after.
As usual, let me take a moment to suggest it would be great for you to
move to the 2.19.83 release (I assum you are on 2.18 from your link).
Much better in every respect - many more years of development. And
also my usual comment; it's called unstable but this is traditional
open source conservatism (and it is _technically_ so) but in practice
it's very, very reliable and solid. And if for some remote reason it
does not work for you, nothing is stopping you from reverting.
Andrew
On Sat, 20 Apr 2019 at 19:48, E Appeldoorn <ursus.k...@gmail.com>
wrote:
I have defined this function in an include.ly file
MyMarkup = {
\markup
\override #'(adjust-x-pos . 1.0)
\override #'(adjust-length . 1.5)
}
I have found the explanation for non-static substitution in the
documentation.
http://lilypond.org/doc/v2.18/Documentation/learning/saving-typing-with-variables-and-functions.en.html
How can I extend that example so I can use one call to the function
passing both pos and length variable in the callout. Something like:
\MyMarkup #1.0 #1.5
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user