lilypond-user
[Top][All Lists]
Advanced

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

Re: Getting the name out of a Scheme object


From: Thomas Morley
Subject: Re: Getting the name out of a Scheme object
Date: Wed, 14 Jan 2015 10:59:32 +0100

2015-01-14 10:16 GMT+01:00 Urs Liska <address@hidden>:
> If I have a Scheme object like
>
>
> (#<Grob DynamicText >)
>
>
> how can I retrieve "DynamicText" as a string?
>
> TIA
>
>
> Urs



Hi Urs,

try

#(define grob-name
  (lambda (x)
    (if (ly:grob? x)
        (assq-ref (ly:grob-property x 'meta) 'name)
        (ly:error "~a is not a grob" x))))

{
    \override DynamicText.after-line-breaking =
    #(lambda (grob)
      (display (grob-name grob)))
    a'1\f
}

HTH,
  Harm



reply via email to

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