lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

String to scheme


From: Paolo Prete
Subject: String to scheme
Date: Mon, 20 Jan 2020 22:36:23 +0100

Hello,

is it possible to make a music _expression_ from strings? It would be useful for building expressions with combination of string chunks. Something like:

%%%%
\version "2.19.45"

strToMusicExpr = #(define-music-function (parser location token1 token2 token3 mus) (string? string? string? ly:music?)
#{            
    $token1 $token2 $token3 $mus
#})

{
   \strToMusicExpr "\\tweak" "NoteHead.color" "#red"
   c'
}
%%%%

I see that there's a ly:parser-parse-string function. But nor I understand if it's safe, nor how does it work, nor if it's the right way to achieve what I want...

Thanks
P



reply via email to

[Prev in Thread] Current Thread [Next in Thread]