Stephen Cummings <stevecummi...@seldenhouse.com> writes:

> Am I missing a basic LilyPond command/directive--something built-in
> that takes music as input and returns note names as text? Such a 
> functionality would seem to be useful in all kinds of
> annotations/quotations. I know about \displayMusic but its output only 
> goes to the console/output stream and can't be routed to markup, correct?

Hm?

musmark
= ^\tweak self-alignment-X #CENTER
  -$(define-scheme-function (music) (ly:music?)
     (with-output-to-string (lambda () (displayLilyMusic music)))) \etc

{
  c'\musmark { c' }
}

Though it's probably a bit cheeky to $\etc the scheme function
in anonymously.  But you could give a name to the define-scheme-function
call as usual.



-- 
David Kastrup

Reply via email to