Major Chords and Other Chords in Binary Code

Doctorn
About 25 years ago I wrote a computer program to classify chords. I wrote the entire program in BASIC and have it running as I write this article, but it happens to be running on a TRS-80 (TM) computer and I have never completely moved it to any modern programming language, but the principles of the process may be of interest to some computer programmers and musicians.

First look at the musical alphabet only considering sharps for simplification. You could list the musical alphabet like this:

A A# B C C# D D# E F F# G G# A

=============================
Now put a binary code under this:

A..A#. B..C..C#. D..D#.E..F..F#.G..G#.A
O..O...O..O...O...O..O...O..O..O..O..O...O
==============================
An A chord has the notes of A, C#, E and this might be described in binary code as:

A..A#. B..C..C#. D..D#.E..F..F#.G..G#
1...O...O..O...1...O..O....1..O..O..O..O...
==============================
An A major 7 would have the notes of A, C#, E, and G# and in binary:

A..A#. B..C..C#. D..D#.E..F..F#.G..G#
1...O...O..O...1...O..O....1..O..O..O...1..
==============================
An A dominant 7th would have the notes A, C#, E, and G and in binary:

A..A#. B..C..C#. D..D#.E..F..F#.G..G#.
1...O...O..O...1...O..O....1..O..O..1..O...
==============================
An Am chord would have the notes A, C, E and in binary:

A..A#. B..C..C#. D..D#.E..F..F#.G..G#
1...O...O..1...O...O..O....1..O..O..O..O...
==============================
An Am7 chord would have the notes A, C, E, and G and in binary:

A..A#. B..C..C#. D..D#.E..F..F#.G..G#.
1...O...O..1...O...O..O....1..O..O..1..O...
==============================
An A+5 chord would have the notes A, C#, F and in binary:

A..A#. B..C..C#. D..D#.E..F..F#.G..G#
1...O...O..O...1...O..O....O..1..O..O..O...
==============================
An A diminished would have an A, C, D#, F# and in binary:

A..A#. B..C..C#. D..D#.E..F..F#.G..G#
1...O...O..1...O...O..1....O..O..1..O..O...
==============================

Many other A chord patterns could be listed like A13, A9th etc. and even patterns that lack a root, fifth, third or multiples of these parts of a chord. If all of these binary patterns were then in a data set and associated with a chord name, you would then have a program that could name every possible A chord, that is if you had all the possible data statements.

Now comes the most important trick in the process lest look at the A# major chord binary pattern as compared to the A major chord binary pattern.

================================================================
================================================================
An A chord has the notes of A, C#, E and in binary code as:

A..A#. B..C..C#. D..D#.E..F..F#.G..G#
1...O...O..O...1...O..O....1..O..O..O..O...
============================
An A# major chord has the notes A#, D, F and in binary code as:

A..A#. B..C..C#. D..D#.E..F..F#.G..G#.
0...1...O..O...O...1...O..O...1...O..O...O..
============================

It is very important to look at the A chord binary pattern and the A# binary pattern. The pattern from the A major chord is EXACTLY the same as the pattern for the A# major chord pattern has shifted one musical alphabet position, but suppose you shift the musical alphabet in the A# example.

An A# major chord has the notes A#, D, F and in binary code as:

A#. B..C..C#. D..D#.E..F..F#.G..G#..A
1...O..O...O...1...O..O...1...O..O...O...O

In this case, the "O" on the far left has been moved to the far right and the letter "A" has been moved to the far right. Now the pattern of binary code for the A major chord is identical to the binary code for the A# major chord.
============================
We can make this same type of shift for every major chord. What this means is that once we have established every chord pattern in binary form for the musical alphabet from the perspective of the starting point of "A", we then have established of shifting the binary codes one bit at a time and then getting a complete set of A# chords, then another shift and we get a complete set of B chords and on and on.

It was interesting that I had the whole program working, but it was not working quite correctly. I asked my sister-in-law to look over the program, and I explained to her that it was "kind of working backwards". She was a great programmer in BASIC and a great mathematician. She was not very confident about music, but I asked her to give it a try. I knew it was some very minor problem, but I couldn't seem to locate what was happening. She found one spot wher I had used a +1 factor that was added to variables and when she told me to change it to a -1, it all worked perfectly.

The reason I was interested in developing this program is that I wanted to be able to simply type in a set of notes and get literally all the possible chord names that might be associated with that group of notes. In particular I was interested in situations where no root, or no fifth was present. If I could get literally all the chord possibilities, then it might give me flexibility in the development of chord progressions and melody development. At present the program is only particially shifted into QBASIC from which I would like to shift it into Visual Basic (TM).

Published by Doctorn

A science, computer, and guitar nerd with over 30 years in the field of education with experience teaching at the elementary through college levels.  View profile

To comment, please sign in to your Yahoo! account, or sign up for a new account.