[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
ly:pitch and string
From: |
Simon Albrecht |
Subject: |
ly:pitch and string |
Date: |
Fri, 10 Oct 2014 21:55:24 +0200 |
User-agent: |
Mozilla/5.0 (Windows NT 6.1; rv:31.0) Gecko/20100101 Thunderbird/31.1.2 |
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
- ly:pitch and string,
Simon Albrecht <=
- Re: ly:pitch and string, Paul Morris, 2014/10/10
- Re: ly:pitch and string, Paul Morris, 2014/10/10
- Re: ly:pitch and string, Simon Albrecht, 2014/10/10
- Re: ly:pitch and string, Simon Albrecht, 2014/10/10
- Re: ly:pitch and string, Paul Morris, 2014/10/11
- Re: ly:pitch and string, Simon Albrecht, 2014/10/12
- Re: ly:pitch and string, Paul Morris, 2014/10/12
Re: ly:pitch and string, David Kastrup, 2014/10/11