> On 20 May, 2020, at 9:43 AM, Paul McKay <[email protected]> wrote:
>
> Todays thoughts are: when you specify \language, then part of what you are
> doing is setting up the parser to understand which character sequence should
> indicate an f-sharp. I would like to be able to temporarily reconfigure this
> so that as well as mapping ‘fs’ to f-sharp you can ask it to map ‘F’ to
> f-sharp. I imagine that the parser is a finite state machine and that at the
> appropriate point it looks up a list. Normally this would say that ‘fs’ means
> f-sharp (or ‘fes’ means f-sharp if you were in another language). I guess it
> looks up a list of pitch names to check whether the current token is a pitch
> as expected and, if so, which one. If that list might have ‘F’ added at the
> beginning of the search order, then the parser would recognize the letter ‘F’
> as meaning the pitch f-sharp. Later on, you could ask to remove the ‘F’ entry
> from that list. Removing it would automatically revert to the default
> behaviour because the list would still contain the entry to say that ‘fs’
> means f-sharp. To avoid confusion, the request to add an item to the list
> would have the form (newName, pitchNameInOriginalLanguage).
I’ve done something like this for transcribing solfege music (while retaining
English note names for other purposes):
myNames = #(append (assoc-get 'english language-pitch-names)
`(
(do . ,(ly:make-pitch -1 0 NATURAL))
(re . ,(ly:make-pitch -1 1 NATURAL))
(mi . ,(ly:make-pitch -1 2 NATURAL))
(fa . ,(ly:make-pitch -1 3 NATURAL))
(sol . ,(ly:make-pitch -1 4 NATURAL))
(la . ,(ly:make-pitch -1 5 NATURAL))
(ta . ,(ly:make-pitch -1 6 FLAT))
(ti . ,(ly:make-pitch -1 6 NATURAL))
))
solfegenglish = \myNames
#(ly:parser-set-note-names solfegenglish)
You should be able to adapt this for any particular set of note names you want.
✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝
Fr. Samuel, OSB
(R. Padraic Springuel)
St. Anselm’s Abbey
4501 South Dakota Ave, NE
Washington, DC, 20017
202-269-2300
(c) 202-853-7036
PAX ☧ ΧΡΙΣΤΟΣ