Re: Get value of Scheme function to display as a markup in Lilypond

2021-11-23 Thread David Nalesnik
Hi, On Tue, Nov 23, 2021 at 5:36 PM Dimitris Marinakis wrote: > Thank you both for the information. > > I wasn't aware of the formatted output to be honest. > > \markup #(format #f "result = ~a" (dostuff 47)) > > > This line of code doesn't make any sense to me currently but when I get > into mo

Re: Get value of Scheme function to display as a markup in Lilypond

2021-11-23 Thread Dimitris Marinakis
Thank you both for the information. I wasn't aware of the formatted output to be honest. \markup #(format #f "result = ~a" (dostuff 47)) This line of code doesn't make any sense to me currently but when I get into more complex stuff I'll try to understand it. Right now I'm trying to build up a

Re: Get value of Scheme function to display as a markup in Lilypond

2021-11-23 Thread Aaron Hill
On 2021-11-23 2:56 pm, Dimitris Marinakis wrote: 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 #

Re: Get value of Scheme function to display as a markup in Lilypond

2021-11-23 Thread Valentin Petzel
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 Dimi

Get value of Scheme function to display as a markup in Lilypond

2021-11-23 Thread 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? S