lilypond-user
[Top][All Lists]

## simple scheme in lilypond

 From: Gianmaria Lari Subject: simple scheme in lilypond Date: Tue, 27 Nov 2018 09:14:35 +0100

Probably these are very trivial things. Sorry to ask them but would like to understand.

If I write (1):

\version "2.19.82"
\$(object->string (+ 3 2))

Lilypond is happy and compile to a pdf file showing "5".

Even this simpler code works... (2)

\version "2.19.82"
\$"Hello"

and generate a pdf file showing "Hello".

It is clear to me that \$ introduce a scheme _expression_ that is evaluated. And in the previous two examples the scheme code is evaluated to strings. But I don't understand why lilypond outputs them. If I write (3):

\version "2.19.82"
"Test"

this does not compile. So I would think that the "correct" code to output evaluated _expression_ in the pdf file should be (4)

\version "2.19.82"
\markup \$(object->string (+ 3 2))

or this (5)

\version "2.19.82"
\markup \$"Hello"

Why the behaviour of (1) and (2) ?

* * *

I tried to rewrite (1) and (2) with the hash mark instead of dollar (6):

\version "2.19.82"
#(object->string (+ 3 2))

and (7):

\version "2.19.82"
#"Hello"

This time, there is no output in the pdf file. Why this difference?

Thank you, g.