lilypond-devel
[Top][All Lists]
Advanced

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

RE: Help on markups


From: Carl D. Sorensen
Subject: RE: Help on markups
Date: Thu, 15 Apr 2004 14:43:19 -0600

Thanks Jan.

So I revised my code, and now it works.  For the sake of somebody else
who might someday struggle with a similar thin,
Here's a working code fragment.

#(def-markup-command (markup-dot paper props radius) (number?)
  "Syntax: \\markup-dot dot-radius
   eg: \\markup-dot #0.25 for dot with 1/2 staff space diameter"
    (ly:make-stencil (list 'dot 0 3 radius) (cons  radius radius) (cons
radius radius) )
  )

\score {
    \notes {
        c''2.^\markup \markup-dot #0.5
    }
}

Thanks for your help.  I think now I can put together a simple chord
diagram -- we'll see!

Carl
-----Original Message-----
From: Jan Nieuwenhuizen [mailto:address@hidden 
Sent: Thursday, April 15, 2004 11:15 AM
To: Carl D. Sorensen
Cc: address@hidden
Subject: Re: Help on markups


Carl D. Sorensen writes:

> So I wrote the following markup definition:
>
> #(def-markup-command (chord-diagram paper props chord-string)
(string?)
>   "Syntax: \\chord-diagram diagram-string
>    eg: \\chord-diagram #\"x32010\" to achieve standard C chord"
>     (interpret-markup paper props (markup (dot 0 0 3)))
>   )

A good effort with an understandable mistake.  You cannot use (dot )
directly, the interface functions in output-*.scm are output commands
for `Stencil's with that name.

So, you'll have to make a 'dot' stencil.  How to do that?  Use
ly:make-stencil.  See, eg, scm/stencil.scm: 

   (define-public (make-filled-box-stencil xext yext)
     "Make a filled box."

     ..)

Good luck,

Jan.

-- 
Jan Nieuwenhuizen <address@hidden> | GNU LilyPond - The music
typesetter
http://www.xs4all.nl/~jantien       | http://www.lilypond.org





reply via email to

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