[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Accidentals: Unwanted naturals
From: |
Michael Welsh Duggan |
Subject: |
Re: Accidentals: Unwanted naturals |
Date: |
Sun, 30 Aug 2009 04:54:33 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) |
Kieren MacMillan <address@hidden> writes:
> That being said, nobody's stopping anyone who wants to write a Scheme
> function that would support such a beast: that's the beauty of open
> source software! ;)
As an experiment, and not because I think it is a good idea, I toyed
with something to make this happen, sort of. Unfortunately, it does not
work. Anyone have any ideas why?
\include "english.ly"
#(define (create-modified-pitches base spec)
"Return a new set of pitch names based on BASE and modified by SPEC.
SPEC is a list of (NEW-NAME . OLD-NAME) pairs."
(define (update-pitches base new spec)
(if (null? spec)
new
(let ((new-name (caar spec))
(old-name (cdar spec)))
(update-pitches base
(assq-set! new new-name (assq-ref base old-name))
(cdr spec)))))
(update-pitches base (copy-tree base) spec))
bflatmajorPitches = #(create-modified-pitches pitchnamesEnglish
'((b . bf) (bn . b) (e . ef) (en . e)))
#(ly:parser-set-note-names parser bflatmajorPitches)
{ \key bf \major c' d' e' f' g' a' b' c' d' en' f' g' a' bn' }
--
Michael Welsh Duggan
(address@hidden)