Q: chords, mathematicaly?

Chords, scales, harmony, melody, etc.
RELATED
PRODUCTS

Post

hello, first of all, i'm a hobbyist, i'm not musicaly educated, i can't play the piano or read notes..
so, forgive my noob-ness

i'm working on something that generates "random" melodies
now, i'm aware that there are these things called "chords" and you can play the same "melody" in different chord and it'll sound in a completely different "mood" if i can call it, and yet, be recognizable as the same melody

actually, my task is simpler

i only want to know how the chords work

now, i'm looking at an arpegiator plugin, i press a C note and it adds a bunch of other notes too
and i can switch between a whole pile of chords

for example, when i select a "Major" chord, it plays C,E,G
i select "Minor" and it plays C,D#,G
i hope that these things only mean some "distance" between the keys

so, let's look at the notes as numbers instead
let's say my root note is always number 0
now if it was "Major" then the second note would be number 4
the third note would be 7

is this correct?
will it be correct if my root key was C# or F# or any other?

and if i am right, where can i find some info about these "distances" between the notes in most chords, so i can use them as a source for my randomizer?

thanks in advance
It doesn't matter how it sounds..
..as long as it has BASS and it's LOUD!

irc.libera.chat >>> #kvr

Post

antto wrote:for example, when i select a "Major" chord, it plays C,E,G
i select "Minor" and it plays C,D#,G
The middle note should technically be Eb, although it would sound the same as D# (in equal temperament).
antto wrote:so, let's look at the notes as numbers instead
let's say my root note is always number 0
now if it was "Major" then the second note would be number 4
the third note would be 7

is this correct?
will it be correct if my root key was C# or F# or any other?

By your system, Major triads are always 0,4,7
Minor triads are always 0,3,7
Diminished triads are always 0,3,6
Augmented triads are always 0,4,8
These will work regardless of what note you start on. There are of course more complex chords, and in any event, good music is not just a succession of random chords, there are a whole load of different things to consider in harmony; the context if you like - knowing when and how to use particular chords.
Unfamiliar words can be looked up in my Glossary of musical terms.
Also check out my Introduction to Music Theory.

Post

Major triads are 0,4,7 but can also be 0,3,8 or 0,5,9 or 0,7,16 there are many, many combinations, as many are there are notes.

What you are doing is just a translation. Instead of calling c,c#,d,d#,e,f,f#,g... you are calling 0,1,2,3,4,5,6,7...

Of course, having that in mind you can program a whole set of operations.

And you can define chords, progressions, melodies, transposition, as a bunch of mathematic concepts.

For instance, if you define:

Major Chord= (x,x+4,x+7) or (x,x+5,x+9) or (x,x+3,x+8), x=any integer.

Transposition of certain tones = T(y)=x+y, x=any integer, 0<=y<=12.

Then you can start wondering, ok "+" is transposition. "*" will be what? What kind of sound result has this mathematical concept?



You can work out this way. There are books on the subject. I've seen some and some seem more mathematical analysis than music.
Play fair and square!

Post

Tämähä o jännä. Ja taulukosta täällä voi myös ol hyötyä hankkeessas.


edit: Just playing a chance that antto is finnish, as his name suggests. ;) Maybe I just get some sleep now, it's half past four AM already and I've been stalking KVR all day. Continue though, maths+music=interesting.

Post

There is two ways to represent chords and scales as numbers. Research the net for it, and learn how they relate to each other. Also learn everything about chord/scale theory if you want your randomizer to be based on it.

Post

JumpingJackFlash: i know that music is not so simple
but my goal here is kinda simple, i only lack some knowlage..

Musicologo: that's exactly what i need
Major Chord= (x,x+4,x+7) or (x,x+5,x+9) or (x,x+3,x+8 )
but what are these variations?! 0,5,9 and 0,3,8
what i need to find is some huge list of *most* chords with their exact names (like what you'll see on an arpegiator, erm, short names - Maj Min Aug..) and the numbers..

i'm basicaly working on a pattern sequencer for a monophonic bass synthesizer, normaly, you sequence your melodies by yourself, but i'm having a random function too, and it's fun, but i want to make it somewhat less-random
and i want to add a bunch of these chords into a list that the synth will load automaticaly and use it as a "database" or something, and later even the user could edit these chords and write whatever he wants, but i need some default values.. if you get my point..

music can be complex, very complex..
music can even be generated with procedural algorithms and rocket-science
i want something fairly simple here, i just can't find it yet..

ras.s: nah, i'm bulgarian, my real name is Anton ;]
i though my nickname was unique :cry: :dog:

thanks guys, my journey continues..
It doesn't matter how it sounds..
..as long as it has BASS and it's LOUD!

irc.libera.chat >>> #kvr

Post

trewq wrote:There is two ways to represent chords and scales as numbers. Research the net for it, and learn how they relate to each other. Also learn everything about chord/scale theory if you want your randomizer to be based on it.
ok, so it's too complex than just the numbers i imagined?
if so - i will quit it, i can't waste that much time to learn something people probably learn for months or years (i guess)
thanks anyways.. ;]
It doesn't matter how it sounds..
..as long as it has BASS and it's LOUD!

irc.libera.chat >>> #kvr

Post

nah, its not complex at all!

The 12 tone scale is simply 1 2 3 4 5 6 7 8 9 10 11 12

Thats one numbering system.

Your ideas would be all your own!

Your randomizer is what may take a few years, as it will give you more ideas at each stage.

Post

JumpingJackFlash wrote: The middle note should technically be Eb, although it would sound the same as D# (in equal temperament).
True but let's face, many of these computer programs will use a D# as the displayed note :wink:

Post

hibidy wrote:
JumpingJackFlash wrote: The middle note should technically be Eb, although it would sound the same as D# (in equal temperament).
True but let's face, many of these computer programs will use a D# as the displayed note :wink:
Yes but then it may have an option to let you use flats. If it calculates from just a library of type formulas, it can't, or would be just to complex, to bring you standard notation for all the different scales.

Post

I guess maybe I'm not getting what is being said here. There should be no "0" in any numbering system. 1-12 are the notes and 1 is the root, 12 is the octave (same note as root higher pitch) Any numbering system you use should be in this context.

In reality, it's really quite simple and doesn't require MONTHS to grasp. Check this out:

http://www.musictheory.net/

This is free and HIGHLY comprehensive. It's really fun actually and once you start using it you can get on with it pretty easily.

Just don't try to reinvent the wheel, it's just going to drive you crazy trying to figure out what others already have for centuries :shrug:

Post

hibidy wrote:I guess maybe I'm not getting what is being said here. There should be no "0" in any numbering system. 1-12 are the notes and 1 is the root, 12 is the octave (same note as root higher pitch) Any numbering system you use should be in this context.
And imaginary numbers are not real. But yeah, in music theory the counting is usually started from 1 (=root). On the other hand, it usually ignores notes that are not part of the scale (so 8 is full octave). Hence 1-3-5 would be a standard triad whether major, minor or diminished, and to distinguish between those you need to know the root and the mode. And if you need a major 7 instead of standard, you now have "maj7" chords as well as "7" chords and lots of other similar nonsense.

Purely differential system (where 0=root for no difference from root; differences is why programmers love to start from 0) would IMO be just as useful, if not more useful, than the standard note-counting system which works nicely only when dealing with strongly tonal music without many modulations.

Post

Now were are talking about the interval numbering system used to represent the chord and 7 tone scale type formulas.

We should compare that to the 12 tone numbering system so everyone doesn't get too confused. You will probably need to find a way to convert between the two, if you are coding.

Interval numbering simplifies using chord and scale formulas.
1 2 3 4 5 6 7 is the major scale formula. For C, its C D E F G A B
For a C major chord its 1 3 5. CM7 is 1 3 5 7.

1 3 5 is for both major and minor(depending on the mode), as mystran said. But Dm can be also shown as consisting of: '1st, b3rd, 5th'(b=flat). But we are talking math here so...

to find what D chords are in the C major scale, you need to look at the formula for the D dorian mode, which can be computed from the C ionian mode (C major scale), using the 12 tone system, believe it or not - the usual (printed) dorian formula shows a b3rd and b7th, but we need to represent them as integers. OR you can use something like 10 20 30 40 50 60 70, so a flat 3rd can be a 25, and so on...

Post

trewq wrote:OR you can use something like 10 20 30 40 50 60 70, so a flat 3rd can be a 25, and so on.
Urgh, that's actually not the best choice, because there is no reasonable mathematical curve that would put the 7 notes of a scale on equal distances (where as the 12 semitones would be equal distance for equal temperament on log-frequency scale).

Anyway, let's skip this discussion, as it doesn't really help the original problem at all. Since I contributed to the off-topic, I'll try to contribute to the topic too:

IMO best way to learn chords is to find some chord progressions (say any pop songs are good starting point) and play them very slowly one by one, listening to how they sound, and how they progress, then try fitting more notes to the chords or moving the existing notes slightly, see what happens, which notes fit, which won't, then figure out what those chords actually became. Being able to hear harmony is pretty good starting point for actually being able to deal with it. :)

Assuming chords and scale get sorted out first, there are couple of things to consider for randomized melodies if you want them to make sense. First thing is that writing a melody to follow the chords (or well, the base triad if you do fancy chords) especially on the beats (and I don't mean strict quarters, just the natural weight of the groove) tends to sound more "stable", than only passing the base chord on offbeats. The latter is great for creating an anticipation of a resolve later. For generating melodies, you could allocate some part of the desired length for suspension, and some for the resolve, and try to generate something meaningful from those.

Another thing is repetition with slight variation, which helps give a melody an identity while still keeping it moving. This can be combined with suspension and then resolve, by repeating variations of the same short pattern, first tonally, then with slight suspensions, and then possibly using a completely different pattern which resolves it back to the base chord. This way starting with a really boring, completely dominant pattern, then creating variations of that to pick something like 7th or 9th (in the classic 7 notes scale sense) into the mix, and then going back to base chord with another pattern (or stronger variation of the base pattern) could create something interesting.

The final thing to consider, is that often it's the "out-of-chord" notes used creatively that are the most interesting, so it's probably not a good to limit a randomizer purely to certain chords or scales. Rather, I'd assign weights such that notes of a chord are more likely, than other notes of the relevant scale, which again are more likely than out-of-scale notes. Or something.

If you want to actually try to follow a chord-structure (that is, randomize melodies over several chords) then you might also want to consider things like picking notes which belong to the first chord, but keeping them into the second for suspension, or the reverse, picking notes from the next chord early.

Post

mystran wrote:
trewq wrote:OR you can use something like 10 20 30 40 50 60 70, so a flat 3rd can be a 25, and so on.
Urgh, that's actually not the best choice, because there is no reasonable mathematical curve that would put the 7 notes of a scale on equal distances (where as the 12 semitones would be equal distance for equal temperament on log-frequency scale).
I thought you might call me on that :) But it can be used to some extent when just getting chords from scales, but even there its not good for optimized processing. A 12x12 tone matrix is better.

It late on this side, so I'll read the rest of your post later.

Post Reply

Return to “Music Theory”