Re: [frogs] [PATCH] chord names language |
[ Thread Index |
Date Index
| More lilynet.net/frogs Archives
]
- To: Carl Sorensen <c_sorensen@xxxxxxx>
- Subject: Re: [frogs] [PATCH] chord names language
- From: Valentin Villenave <v.villenave@xxxxxxxxx>
- Date: Thu, 9 Dec 2010 10:10:17 +0100
- Cc: "frogs@xxxxxxxxxxx" <frogs@xxxxxxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=UrNTEMwxhsOTfmOT83+wnyj6BDhSsKKDTWAGzKCTrdY=; b=srfgM3LhR0SFM9GLgs6HmP3ant4HdvgfsofghGVpprP8+xToRzDUrXV61bqzaQMxNF so7nX1/ww4BDn8Ov8hwEtWTz/nqDM7L/V4dtstVT6sdUa6XrtbTGUdFmYAoReQrvcAqt FJrGIfKwqQjk7syu8pMRdhvBdZWc3cMSB4+iI=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=ByBNvbNyXN3XP76iSFclYMAg6jVAh+kQioUI/n/ycGEZq52nFaxMJe73W/H6qoKsXY 044up2NSZ77K9zn2NZie8nhhcprTvhT/XDr2taSwMM8mJvN26uDGG52/miQWPhFK8K0+ kEGXgwD0t1lhm9ACDtlh6bBfTLKraOHwBfguw=
On Thu, Dec 9, 2010 at 6:06 AM, Carl Sorensen <c_sorensen@xxxxxxx> wrote:
> Actually, we have it hardcoded in multiple lists.
>
> We have note-name->german-markup, note-name->semi-german-markup, and
> note-name->italian-markup as well.
Indeed, and whilst simpler it's still rather ugly.
> This code won't work for German and Norwegian note names, where b is what
> english calls b flat, and h is what english calls b. There needs to be
> something more general, and I'm not exactly sure what it is.
Oh, indeed. Nice catch!
> Perhaps the note name files should define both a pitch and a base name for
> each of the pitches, and then we look up the base name from the pitch in the
> given language, instead of trying to fake it with some other function.
>
> I'm thinking that perhaps the lists in scm/define-note-names.scm
Does that mean I can push my define-note-names.scm patch? ;-)
> would look
> like
>
> (nederlands . ((entry-names . (
> (ceses . ,(ly:make-pitch -1 0 DOUBLE-FLAT))
> ...
> ))
> (display-names . (
> ((0 DOUBLE-FLAT) . "C")
> ((0 SEMI-FLAT) . "C")
> ...
> ))))
>
> and then we'd need to modify the functions that get the pitch-name-alist to
> get the entry-names key from the language alist. The markup we'd get by
> getting display-names alist, and we'd do something like
>
> (define (pitch->markup pitch)
> (let ((note-name (ly:pitch-notename pitch))
> (alteration (ly:pitch-alteration pitch)))
> (assoc-get (list note-name alteration) display-names-alist "")))
That could work. But wouldn't that be a tad bit overkill?
Another option is to just adapt what I suggested to the
Norwegian/German situation, by adding a has-bflat-letter? variable.
I'm sure I can do that pretty easily.
Upside: it would keep things simple.
Downside: it wouldn't be easily extensible if we are to add other
exotic note-name-languages that have more peculiar specificities. But
I can't see that happening anytime soon.
Cheers,
Valentin.
---
----
Join the Frogs!