Kieren MacMillan <[email protected]> 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
([email protected])


_______________________________________________
lilypond-user mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to