lilypond-user
[Top][All Lists]
Advanced

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

Re: ly:pitch and string


From: David Kastrup
Subject: Re: ly:pitch and string
Date: Sat, 11 Oct 2014 16:52:00 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux)

Simon Albrecht <address@hidden> 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




reply via email to

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