Music notes/integers sequencing (not sure what kind of math to begin with)

Judson

New member
Joined
Apr 29, 2013
Messages
1
Hello

I am not a mathematician. I am writing a game, designed around music notes/scales, and the computer needs to process out of a string of numbers what a given chord might be. So even just a point in the direction of what kind of math might be involved, let alone the full answer is kindly welcome. The following diagram might help:

We have a chromatic scale with 12 notes, and number them from 0-11.

C C# D D# E F F# G G# A A# B
0 1 2 3 4 5 6 7 8 9 10 11 (for some reason this line will not space out properly under the note names?)

The notes for a C triad (C E G) would yield = 0 4 7.

Also, a triad could be produced from any of the other 11 notes, i.e. D triad would yield = 2 6 9.

I want to write a program that could identify whether a triad (or larger chord or different type, minor, augmented etc) has been obtained from a random generator, but without having to write out every combination for every triad and every possible chord combination with every possible starting note.

Can anybody say even what kind of field of math/computing this might be catagorized under please?:confused:

Thanks

PS Sorry its not a math question, thanks for reading!
PSS please bump thread if you already know moderator, cheers!

  • :wink:
 
Hello

I am not a mathematician. I am writing a game, designed around music notes/scales, and the computer needs to process out of a string of numbers what a given chord might be. So even just a point in the direction of what kind of math might be involved, let alone the full answer is kindly welcome. The following diagram might help:

We have a chromatic scale with 12 notes, and number them from 0-11.

C C# D D# E F F# G G# A A# B
0 1 2 3 4 5 6 7 8 9 10 11 (for some reason this line will not space out properly under the note names?)

The notes for a C triad (C E G) would yield = 0 4 7.

Also, a triad could be produced from any of the other 11 notes, i.e. D triad would yield = 2 6 9.

I want to write a program that could identify whether a triad (or larger chord or different type, minor, augmented etc) has been obtained from a random generator, but without having to write out every combination for every triad and every possible chord combination with every possible starting note.

Can anybody say even what kind of field of math/computing this might be catagorized under please?:confused:

Thanks

PS Sorry its not a math question, thanks for reading!
PSS please bump thread if you already know moderator, cheers!

  • :wink:
I am not sure this answers your question. I used to listen to my father talk about harmony, but I understood little and remember virtually nothing.

In any case, it seems to me that perhaps you could identify the chords you want to consider "non-random" using the lowest note in the chord as zero. This would give you a list of major and minor chords without reference to key. (I am presuming that you are not considering things like Lydian and Dorian modes.) Now let's say you had the chord g-c-e. You would process that initially as base = 8 (meaning g), chord = 0-5-9, counting from the base. You would look for 0-5-9 in your list of non-random chords and find it since it is a standard variant on the major triad. Your list could even name the type of chord (a major whatever) in the key 5 higher than the base of g, which would allow you to name it as a whatever triad in c major.
 
Hello, Judson!

Lucky for both of us that I know some music theory.
I was a music major before I was a math major.


I am not a mathematician. I am writing a game, designed around music notes/scales,
and the computer needs to process out of a string of numbers what a given chord might be.
So even just a point in the direction of what kind of math might be involved, let alone the full answer,
is kindly welcome. The following diagram might help:

We have a chromatic scale with 12 notes, and number them from 0-11.

\(\displaystyle \begin{array}{ccccccccccccc}C&C\sharp & D & D\sharp & E& F& F\sharp &G &G\sharp &A &A\sharp &B \\ 0 &1& 2& 3& 4& 5& 6& 7& 8& 9& 10& 11 \end{array}\)


The notes for a C major triad (C E G) would yield: 0 4 7.

Also, a triad could be produced from any of the other 11 notes, i.e. D major would yield: 2 6 9.

I want to write a program that could identify whether a triad (or larger chord or different type, minor,
augmented, etc) has been obtained from a random generator, but without having to write out every
combination for every triad and every possible chord combination with every possible starting note.

Can anybody say even what kind of field of math/computing this might be catagorized under, please?

We can work out some triads with modulo arithmetic.
. . But it is an enormous job.

I'll try to explain the major triads.
Perhaps you can generalize the idea to minor, augmented and diminished triads.

Consider some major triads.

\(\displaystyle \begin{array}{ccccccccccccccccccccc}C&E&G && D&F\sharp&A && G&B&D && A&C\sharp&E && B&D\sharp&F\sharp \\ 0&4&7 && 2&6&9 && 7&11&2 && 9&1&4 && 11&3&6\end{array}\)

Is there a numerical pattern?

Yes, we have three numbers \(\displaystyle a,b,c.\)
Take the difference of consecutive pairs of numbers.

This must be true: .\(\displaystyle \begin{Bmatrix}b-a \,\equiv\, 4\text{ (mod 12)} \\ c-b \,\equiv\, 3\text{ (mod 12)} \end{Bmatrix}\)

This tests for major triads in root position.


~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~


If we must consider inversions, the problem is extended.

1st inversion
. . . Example: .\(\displaystyle \begin{array}{ccc}E&G&C \\ 4&7&0 \end{array}\)

Then: .\(\displaystyle \begin{Bmatrix} b-a \,\equiv\,3\text{ (mod12)} \\ c-b \,\equiv\,5\text{ (mod 12)} \end{Bmatrix}\)


2nd inversion
. . . Example: .\(\displaystyle \begin{array}{ccc}G&C&E \\ 7&0&4 \end{array}\)

Then: .\(\displaystyle \begin{Bmatrix}b-a\,\equiv\,5\text{ (mod 12)} \\ c-b \,\equiv\,4\text{ (mod 12)} \end{Bmatrix}\)
 
Top