|
From: | Paolo Prete |
Subject: | Re: String to scheme |
Date: | Mon, 20 Jan 2020 23:36:36 +0100 |
Am Mo., 20. Jan. 2020 um 22:37 Uhr schrieb Paolo Prete <address@hidden>:
>
> 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
>
>
Hi Paolo,
apart from the question whether it's possible and how, this approach
feels wrong.
Could you give some (pseude-code-) examples where you think you need it?
Cheers,
Harm
[Prev in Thread] | Current Thread | [Next in Thread] |