[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Adding note names to a language
From: |
Torsten Hämmerle |
Subject: |
Re: Adding note names to a language |
Date: |
Tue, 27 Mar 2018 11:42:53 -0700 (MST) |
Br. Samuel Springuel wrote
> Does the new language have to be defined from scratch?
No.
The simplest solution would be copy & paste (file scm/define-note-names.scm
contains all the note name definitions in all languages).
Br. Samuel Springuel wrote
> Is there a way to import into the new language the note names from an
> existing language?
Yes.
All the note name definitions are contained in the associated list
language-pitch-names
When applying (assoc-get 'english language-pitch-names) you'll get a list of
all the English note definitions.
That way, you can append several lists, e.g. using Harm's do-re-mi example:
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))
))
As a result, myNames contains all English note definitons plus the custom
do, re, and mi.
You may even combine two or more existing languages:
combiNames = #(append
(assoc-get 'english language-pitch-names)
(assoc-get 'italiano language-pitch-names))
combiNames will then contain both English and Italian note name definitions.
HTH,
Torsten
--
Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html