#1
Quick python program for harmonizing scales (under GPLv3). I'm not a python programmer, and I mainly choose it because I rarely choose python as my language. So I needed some practice. It's not meant to be bug-free(although bug free isn't bad), but mainly as a practice for a GUI I'm developing for scales. You can grab it here...

http://tehuti.googlecode.com/svn/trunk/smutt/pysketch/harmonizer.py

I mainly use flats, to sharp a note us +N where n is the note number. # is reserved for comments in the linux command line.

major scale....
$ ./harmonizer.py 1 2 3 4 5 6 7
I       ['1', '2', '3', '4', '5', '6', '7']     ['maj11', 'sus2', 'maj9', 'add9', 'maj', 'min', 'maj7', 'sus4', '5']
II      ['1', '2', 'b3', '4', '5', '6', 'b7']   ['m6/9', 'sus2', 'm7', 'sus4', '5']
III     ['1', 'b2', 'b3', '4', '5', 'b6', 'b7']         ['m7', 'sus4', '5']
IV      ['1', '2', '3', 'b5', '5', '6', '7']    ['sus2', 'maj9', 'add9', 'maj', 'min', 'maj7', 'b5', '5']
V       ['1', '2', '3', '4', '5', '6', 'b7']    ['sus2', 'maj', 'min', '7', 'sus4', '5']
VI      ['1', '2', 'b3', '4', '5', 'b6', 'b7']  ['sus2', 'm7', 'sus4', '5']
VII     ['1', 'b2', 'b3', '4', 'b5', 'b6', 'b7']        ['dim', 'b5']


blues
$ ./harmonizer.py 1 2 b3 4 b5 b7
I ['1', '2', 'b3', '4', 'b5', 'b7'] ['dim', 'b5']
II ['1', 'b2', 'b3', '3', 'b6', 'b7'] ['aug']
III ['1', '2', 'b3', '5', '6', '7'] ['m6/9', 'sus2', 'maj9', 'add9', '5']
IV ['1', 'b2', '4', '5', '6', 'b7'] ['sus4', '5']
V ['1', '3', 'b5', 'b6', '6', '7'] ['aug', 'b5']
VI ['1', '2', '3', '4', '5', 'b6'] ['sus2', 'maj', 'min', 'aug', 'sus4', '5']


Hungarian gypsy
./harmonizer.py 1 2 b3 +4 5 b6 7
I       ['1', '2', 'b3', 'b5', '5', 'b6', '7']  ['sus2', 'maj9', 'add9', 'dim', 'b5', '5']
II      ['1', 'b2', '3', '4', 'b5', '6', 'b7']  ['b5']
III     ['1', 'b3', '3', '4', 'b6', '6', '7']   ['aug']
IV      ['1', 'b2', '2', '4', 'b5', 'b6', '6']  ['b5']
V       ['1', 'b2', '3', '4', '5', 'b6', '7']   ['maj', 'min', 'maj7', 'aug', 'sus4', '5']
VI      ['1', 'b3', '3', 'b5', '5', 'b7', '7']  ['dim', 'm7', 'maj', 'min', '7', 'maj7', 'b5', '5']
VII     ['1', 'b2', 'b3', '3', '5', 'b6', '6']  ['maj', 'min', 'aug', '5']


chormatic
./harmonizer.py 1 b2 2 b3 3 4 b5 5 b6 6 b7 7
I       ['1', 'b2', '2', 'b3', '3', '4', 'b5', '5', 'b6', '6', 'b7', '7']       ['m6/9', 'maj11', 'sus2', 'maj9', 'add9', 'dim', 'dim7', 'm7', 'maj', 'min', '7', 'maj7', 'aug', 'sus4', 'b5', '5']



I have plans to improve the CLI interface, and make it a little prettier, but for now it's functional. If anyone's a python hacker feel free to read the source and help out, it's only a 100 lines(although a crappy 100 lines)
Last edited by capiCrimm at Nov 15, 2007,