[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Drawing systems...ERROR: In procedure min: ERROR: Wrong type: lilyva
From: |
address@hidden |
Subject: |
Re: Drawing systems...ERROR: In procedure min: ERROR: Wrong type: lilyvartmpbh |
Date: |
Tue, 26 Apr 2011 08:26:54 -0400 |
On Apr 26, 2011, at 8:02 AM, Nick Payne wrote:
> This code used to work for me about a year ago, but when I try to build it
> using 2.13.60, I get the weird error shown in the console log output at the
> bottom. Is this a bug or not? I'm running 2.13.60 on Ubuntu 10.04 amd64.
>
> %===================================
> \version "2.13.60"
>
> % e.g. \spanbox #-8 #'(-1 . -1)
> spanbox = #(define-music-function (parser location yval shorten) (number?
> pair?) #{
> \once \override TextSpanner #'style = #'line
> \once \override TextSpanner #'bound-details #'left #'text = \markup {
> \draw-line #'(0 . $yval) }
> \once \override TextSpanner #'bound-details #'right #'text = \markup {
> \draw-line #'(0 . $yval) }
> \once \override TextSpanner #'bound-details #'left #'padding = #(car
> $shorten)
> \once \override TextSpanner #'bound-details #'right #'padding = #(cdr
> $shorten)
> #})
>
> \relative c' {
> \spanbox #-8 #'(-1 . -1) c4\startTextSpan c c c\stopTextSpan
> }
> %===================================
>
> Processing `/home/nick/lilypond/examples/box.ly'
> Parsing...
> Interpreting music...
> Preprocessing graphical objects...
> Finding the ideal number of pages...
> Fitting music on 1 page...
> Drawing systems...ERROR: In procedure min:
> ERROR: Wrong type: lilyvartmpbh
This should do the trick - the problem is that you need to quasiquote the list
and then unquote the temp variable that lilypond uses to store yval.
spanbox = #(define-music-function (parser location yval shorten) (number?
pair?) #{
\once \override TextSpanner #'style = #'line
\once \override TextSpanner #'bound-details #'left #'text = \markup {
\draw-line #`(0 . ,$yval) }
\once \override TextSpanner #'bound-details #'right #'text = \markup {
\draw-line #`(0 . ,$yval) }
\once \override TextSpanner #'bound-details #'left #'padding = #(car
$shorten)
\once \override TextSpanner #'bound-details #'right #'padding = #(cdr
$shorten)
#})
\relative c' {
\spanbox #-8 #'(-1 . -1) c4\startTextSpan c c c\stopTextSpan
}
Cheers,
MS