Re: Multi non static substition

2019-04-21 Thread David Kastrup
"E Appeldoorn"  writes:

> I have defined this function in an include.ly file
>
> MyMarkup  = {
>   \markup
>   \override #'(adjust-x-pos . 1.0)
>\override #'(adjust-length . 1.5)
> }

Unlikely.

> 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

Before extending that example, make it work in the first place.  It's
not clear to me what you want here.

-- 
David Kastrup

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Multi non static substition

2019-04-21 Thread David Kastrup
Andrew Bernard  writes:

> Hi Ursus,
>
> Apologies, you most likely want to define a new markup function.

Markup command.

-- 
David Kastrup

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Re[3]: Multi non static substition

2019-04-20 Thread Andrew Bernard
Hi Ursus,

Apologies, you most likely want to define a new markup function. Also in
the NR.

Andrew
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re[3]: Multi non static substition

2019-04-20 Thread E Appeldoorn
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 #


\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: (# . #f)


Afgesloten met returncode 1.


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


Re: Multi non static substition

2019-04-20 Thread Andrew Bernard
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  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


Multi non static substition

2019-04-20 Thread E Appeldoorn

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

Thanks, Ursus___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user