lilypond-user
[Top][All Lists]
Advanced

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

Re[3]: Multi non static substition


From: E Appeldoorn
Subject: Re[3]: Multi non static substition
Date: Sat, 20 Apr 2019 10:36:56 +0000
User-agent: eM_Client/7.2.34959.0

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: fout: GUILE signaleerde een fout voor de expressie beginnend alhier

#

(define-music-function


D:/Lilypond/_Voorbeelden/Undertie Lyrics/undertie.ly:138:2: fout: syntax error, unexpected EVENT_IDENTIFIER

#

(define-music-function


D:/Lilypond/_Voorbeelden/Undertie Lyrics/undertie.ly:139:34: fout: syntax error, unexpected EVENT_IDENTIFIER, expecting '='

(parser location xpos len

)


D:/Lilypond/_Voorbeelden/Undertie Lyrics/undertie.ly:141:10: fout: GUILE signaleerde een fout voor de expressie beginnend alhier

#

{


D:/Lilypond/_Voorbeelden/Undertie Lyrics/undertie.ly:143:28: fout: GUILE signaleerde een fout voor de expressie beginnend alhier

\override #

'(adjust-x-pos . #xpos)


D:/Lilypond/_Voorbeelden/Undertie Lyrics/undertie.ly:143:27: fout: verkeert type voor argument 1. Verwacht pair, gevonden #<unspecified>

\override

#'(adjust-x-pos . #xpos)


D:/Lilypond/_Voorbeelden/Undertie Lyrics/undertie.ly:143:50: unknown # object

Unbound variable: {

D:/Lilypond/_Voorbeelden/Undertie Lyrics/undertie.ly:143:49: unknown # object

C:/Program Files (x86)/LilyPond/usr/share/lilypond/current/scm/lily.scm:1039:21: In procedure reverse! in _expression_ (ly:parse-file file-name):

C:/Program Files (x86)/LilyPond/usr/share/lilypond/current/scm/lily.scm:1039:21: Wrong type argument in position 1: (#<unspecified> . #f)

Afgesloten met returncode 1.


------ Origineel bericht ------
Van: "E Appeldoorn" <address@hidden>
Aan: "Andrew Bernard" <address@hidden>
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" <address@hidden>
Aan: "E Appeldoorn" <address@hidden>
CC: "Lilypond" <address@hidden>
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 <address@hidden> 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.

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


reply via email to

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