denemo-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Denemo-devel] began real transposition script


From: Jeremiah Benham
Subject: Re: [Denemo-devel] began real transposition script
Date: Sat, 8 Nov 2008 09:58:01 -0600





On Nov 8, 2008, at 3:22 AM, Richard Shann <address@hidden> wrote:

On Fri, 2008-11-07 at 10:37 -0600, Jeremiah Benham wrote:
I began writing a real transposition script

(define chromatic_notes '(
 ("a" 0)
 ("b" 1)
 ("c" 2)
 ("d" 3)
 ("e" 4)
 ("f" 5)
 ("g" 6)))

(define sharp_list (list "a" "ais" "b" "c" "cis" "d" "dis" "e" "f"
"fis"
"g" "gis"))

(define transpose
 (lambda (note modulate)
   (list-ref sharp_list (+ modulate (car (cdr (assoc note
chromatic_notes)))))))


Am I on the right path with this.
I am not so sure that this is a good way to go. A transposition is not
defined by a single integer.
You need two, one would be the number of diatonic steps, the other
something to encode the number of additional sharps/flats.


I thought of that method you descibed. Unfortunately it won't work for 12 tone music, hybrid scales or random accidentals.


So c->cis would be (0, 7)
an augmented unison (that is going for example from C-major to C#- major)
c->cis'' would be (16, 7)
same plus two octaves
while
c->des would be (1, -5)
a minor second (going for example from C-major to Db-major)

my guess is that someone will have sorted out a neat way of calculating
the amount to add/subtract to the enharmonic_shift for a given
transposition - a good place to look might be the LilyPond source
tarball.

I am looking at it but it may take some time. The transpose funtion seems to be written in c++.

Jeremiah


hth
Richard








_______________________________________________
Denemo-devel mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/denemo-devel




reply via email to

[Prev in Thread] Current Thread [Next in Thread]