On 18/03/2025 10:07, Aura Kelloniemi wrote:
his probably is already possible without any changes to LilyPond (using
top-repl). Is there a Scheme function that takes an arbitrary LilyPond
expression as a string, parses it and returns a music/score/book object?
I'm not an expert of this topic, but perhaps this will point you in the
right direction.
\version "2.24.0"
musicstring = "{ c'1 }"
#(begin
(let* ((music (ly:parse-string-expression (ly:parser-clone) musicstring))
(scoremusic (ly:score-music (scorify-music music))))
(ly:message "~a\n" scoremusic)))
--
Timothy Lanfear, Bristol, UK.