Pedro Pessoa
2018-12-04 03:28:41 UTC
Hello!
I want a function that takes a string as arg an from that produces a valid
variable reference, as follows:
%%% pseudo
Nabc={a1 d e f}
Nxyz={b1 e a d}
fun=
#(define-music-function (x)(string?)
#{
<<
#(concat x "abc")
\\
#(concat x "xyz")
#})
\fun "N" %produces parallel music with Nabc and Nxyz
%%%
---
I've ran this test:
%%%
\Nabc={some music}
(display (string->symbol (string-append "N" "abc")))
%%%
It outputs "Nabc", not the music content of Nabc, as I expected.
Why is that? How do I make it point to the actual music?
--
Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html
I want a function that takes a string as arg an from that produces a valid
variable reference, as follows:
%%% pseudo
Nabc={a1 d e f}
Nxyz={b1 e a d}
fun=
#(define-music-function (x)(string?)
#{
<<
#(concat x "abc")
\\
#(concat x "xyz")
#})
\fun "N" %produces parallel music with Nabc and Nxyz
%%%
---
I've ran this test:
%%%
\Nabc={some music}
(display (string->symbol (string-append "N" "abc")))
%%%
It outputs "Nabc", not the music content of Nabc, as I expected.
Why is that? How do I make it point to the actual music?
--
Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html