lilypond-devel
[Top][All Lists]
Advanced

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

Scheme interface for making bezier-sandwich stencils


From: Carl D. Sorensen
Subject: Scheme interface for making bezier-sandwich stencils
Date: Thu, 6 May 2004 10:16:10 -0600

I'm trying to get a bezier-sandwich out from scheme as part of my
chord-diagram markup.

I found the bezier-sandwich procedure in scm/ouptut-ps.scm.  I found an
example of the bezier-sandwich expression contents in lily/lookup.cc.
Based on this, I tried the following:

#(def-markup-command (bezier-sandwich paper props width height)
  (number? number?)
  "Syntax: \\bezier-sandwich width height
   eg: \\markup \\bezier-sandwich #6 #1
    makes a bezier sandwich with width 6, height 1"
   (ly:make-stencil  
          '(bezier-sandwich ((6 . 0) (0 . 0) (1.5 . 0.9) (4.5 . 0.9) (6
. 0) (0 . 0) (1.5 . 1.1) (4.5 . 1.1)) 0.1)
          (cons 0 6)
          (cons 0 1.1))
  )   
       
       
\score {
    \notes {
        a'2.^\markup \bezier-sandwich #6 #1
%        c'' ^\markup \fontify-text-markup #6 #1
%        c' ^\markup \fontify-text-markup #6 #1
    }
  \paper{ raggedright = ##t }
}

When I run through lilypond I get

lilypond (GNU LilyPond) 2.1.31
Running usr...
Now processing: `bezier-sandwich.ly'
Parsing...Interpreting music...[1]
Preprocessing graphical objects...
Calculating line breaks... [2]

paper output to `bezier-sandwich.tex'...Backtrace:
In unknown file:
   ?: 0* [tex-output-expression (placebox # # #) #<output:
bezier-sandwich.tex 3>]
In /usr/share/lilypond/2.1.31/scm/output-tex.scm:
  32: 1* [display ...
  32: 2*  [eval (placebox # # #) #<directory # 100d8a50>]
In unknown file:
   ?: 3*  [placebox 17.2858267716535 -2.5 ...
In /home/Carl/lilypond_files/bezier-sandwich.ly:
   7: 4*   [bezier-sandwich ...
   7: 5*    ((6 . 0) (0 . 0) (1.5 . 0.9) ...)
   7: 6*    (6 . 0)

/home/Carl/lilypond_files/bezier-sandwich.ly:7:30: In expression (6 .
0):
/home/Carl/lilypond_files/bezier-sandwich.ly:7:30: Wrong type to apply:
(6 . 0)


lilypond: error: LilyPond failed on input file bezier-sandwich (exit
status 2)
lilypond: warning: Running LilyPond failed. Rerun with --verbose for a
trace.


Can anybody help me find out what's wrong?

Or can anybody point me to a place I can find out more about
bezier-sandwich than lily/lookup.cc and scm/output-ps.scm?

Thanks,

Carl Sorensen




reply via email to

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