Hello Dimitris, Basically you need to turn the output into a form markup takes, that is either a markup or a string. In your case the return would be a number, so you’d want to call \markup #(number->string (dostuff x))
Cheers, Valentin Am Dienstag, 23. November 2021, 23:56:51 CET schrieb Dimitris Marinakis: > Finally got to learn a bit of Scheme. I've made decent progress within the > Scheme sandbox. Now I'm trying to integrate a few things within Lilypond. > > Let's say I have this function: > #(define (dostuff x) (+ x 5)) > > What would be the equivalent of #(display (dostuff 2)) but inside a > Lilypond markup? > So that if my Lilypond music code looks like that, I'll get the correct > value from that function. > { > c^\markuptitle (placeholder) #2 > } > > I don't want the x argument to be displayed in the markup but rather the > result of the function. > > It's OK if this has to be broken into multiple steps.
signature.asc
Description: This is a digitally signed message part.