Simon Albrecht <[email protected]> writes: > 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?
(use-modules (scm display-lily)) newTonicString = #(value->lily-string newTonic parser) Note that the conversion requires the availability of "parser" since it depends on the current value of the note name language. -- David Kastrup _______________________________________________ lilypond-user mailing list [email protected] https://lists.gnu.org/mailman/listinfo/lilypond-user
