lilypond-user
[Top][All Lists]
Advanced

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

Re: conditional \when-property


From: David Nalesnik
Subject: Re: conditional \when-property
Date: Wed, 31 Jul 2013 21:31:03 -0500

Hi Kieren,


On Wed, Jul 31, 2013 at 5:59 PM, Kieren MacMillan <address@hidden> wrote:
Hi David,

> Using empty-stencil rather than your own call of ly:make-stencil should
> work for more versions.

This sounds useful… but I don't quite know what you are suggesting I do. Do you mean this (which appears to work, but still uses ly:make-stencil):

#(define-markup-command (when-property layout props symbol markp) (symbol? markup?)
  (if (chain-assoc-get symbol props)
      (interpret-markup layout props markp)
      (ly:make-stencil empty-stencil)))

?

I tried a lot of things without ly:make-stencil, and they all failed.


empty-stencil is defined as

(ly:make-stencil '() empty-interval empty-interval)

so the ly:make-stencil in your function is unneccesary.  All you need to do is the following:

 #(define-markup-command (when-property layout props symbol markp) (symbol? markup?)
  (if (chain-assoc-get symbol props)
      (interpret-markup layout props markp)
      empty-stencil))

--David

reply via email to

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