Eric Knapp wrote:
> What I want to do is have the value of the "thickness" variable
> replace the "0.25" in the postscript.

Eric,
the "ly:format" function
http://lilypond.org/doc/v2.13/Documentation/user/lilypond-internals/Scheme-functions.html#index-ly_003aformat
is loosely based on the guile "format" function:
http://www.gnu.org/software/guile/manual/html_node/Formatted-Output.html
but it is not the same thing.
__________________

\version "2.13.0"
\include "english.ly"

sample =
#(define-music-function (parser location thickness note)
  (number? ly:music?)
#{
  \once \override NoteHead  #'stencil = #ly:text-interface::print
  \once \override NoteHead #'text = \markup {
    \postscript #(ly:format "
      -1.65 0 translate
      ~4f setlinewidth
      0.75 -0.4 0.8 0.8 rectstroke" $thickness)
  }
$note
#})

{
\sample #0.25 bf2
}
_________________


> I'm not sure if I should post questions like this here or to the
> devel forum. I did not cross-post so let me know if I should
> repost there.

This is a user question. IIUC, -user is for finding a way to make
something work and -devel is for finding a way to change the
program. If you're ever unsure post to -user first.

HTH
- Mark


      


_______________________________________________
lilypond-user mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to