Hello,

consider the following setup:
%%%%%%%%%%%%%%
\version "2.19.12"

newTonic = d

newTonicString = "d"

\bookOutputSuffix #(string-append "in-" newTonicString)

\score { \transpose c \newTonic { c' } }

%%%%%%%%%%%%%%

For easy handling of different transpositions the ‘destination pitch’ is stored in a variable. It is of type ly:pitch?. At the same time, I want to flag the output file with the key to which the music has been transposed, and for this I need the destination pitch notename as a string. I’d like to avoid having to synchronise newTonic and newTonicString manually, but I’ve been unable to find a convenient way to convert one into the other. Can anybody help? I thought of #(ly:parser-include-string ), but it returns an entire sequential music expression instead of the pitch alone, plus it’s difficult to wrap. And the other direction (compute newTonicString from newTonic) seems to be even more difficult to achieve.

TIA, Simon

_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to