lilypond-user
[Top][All Lists]
Advanced

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

Re: Defining grobs from a .ly file


From: Neil Puttock
Subject: Re: Defining grobs from a .ly file
Date: Thu, 5 Aug 2010 20:46:05 +0100

On 5 August 2010 11:49, Mike Solomon <address@hidden> wrote:

>    Is there a way to define grobs from a .ly file?  Something like:
>
> #(define (make-grob grob-entry)
>   (let ((complete-grob-entry (completize-grob-entry grob-entry)))
>   (set-object-property! (car complete-grob-entry) 'translation-type? list?)
>   (set-object-property! (car complete-grob-entry) 'is-grob? #t))
>   (set! all-grob-definitions (cons complete-grob-entry
>                                    all-grob-definitions))
>   (set! all-grob-descriptions (sort all-grob-descriptions alist<?))))
>
> does not work because of certain non-public variables in
> all-grob-descriptions and because completize-grob-entry is not public as
> well.  Before I propose an enhancement that more or less recreates the above
> in scm/define-grobs.scm, I wanted to check and see if anyone knew a better
> way of doing it?

Here's how Nicolas does it:

http://repo.or.cz/w/nenuvar.git/blob/19b2277996dd37b56b36e1a1036ff6c44e55b5fb:/common/side-ornementations.ily

Cheers,
Neil



reply via email to

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