hello, all...this is my first time posting. seems to be a nice place here.

well, I have been grappling with trying to do a spreadsheet, that one day I would like it to grow up into being a full-boar musical application.

Basically, I want the user to be able to select a key and scale, and have the program calculate all types of chords and transitions possibilities given the key and scale selected. I have alot of ideas for the algorithms that will mae it work, but I'm having trouble at the early stages: "teaching" excel how to interpret notes as numbers.

I'm going to be using the tradition midi numbers; that is, 0-127 represent all the notes of a 12 octave keyboard. Note 60 is middle C.

I want to be able to tell the machine, "okay C + 4 = 64." and similarly, "C + 5 = F". In other words, doing math with the notes of music.

All I've got so far that is working is some code a friend helped me with to have VBA recognize midi note numbers as notes: Here it is:

Function fnNote(number)
Static bGotArray As Boolean
Static arrKeys
On Error GoTo errh
If Not bGotArray Then
    arrKeys = getKeys
    bGotArray = True
End If
x = arrKeys(number Mod 12)
fnNote = arrKeys(number Mod 12)
Exit Function
errh:
fnNote = CVErr(xlValue)
End Function
 
Function getKeys()
getKeys = Array("C", "Db", "D", "EB", "E", "F", _
"Gb", "G", "Ab", "A", "Bb", "B")
End Function
I don't even understand fully, but so far it works for translating numbers into notes, but not for "doing math" with the notes themselves.

Any assistance you all could provide would be great.

thanks
-O