 |
Author |
|
zslevi
Date Registered: 12.2010
Location:
Posts: 3
 |
|
chord finder app |  |
I wrote a chord finder program in Prolog. To use it you need a Prolog interpreter, you can download one from here: download
My program is here: chord finder
After installing, go to File->consult, and consult my file. Then write sg like this to the command line:
36 ?- comp([c,e],X).
and you'll get this:
X = a-min7-[a, c, e, g] ;
X = c-maj7-[c, e, g, a#] ;
X = c-aug-[c, e, g#] ;
X = e-aug-[e, g#, c] ;
X = g# - aug-[g#, c, e].
(press semicolon to get all answers)
% searching a scale
35 ?- scomp([c,d,e,f],X).
X = a-minor-[a, b, c, d, e, f, g] ;
X = a-harmonic_minor-[a, b, c, d, e, f, g#] ;
X = c-major-[c, d, e, f, g, a, b] ;
X = d-minor-[d, e, f, g, a, a#, c] ;
X = d-blues7-[d, e, f, g, g#, b, c] ;
X = f-major-[f, g, a, a#, c, d, e].
|
|
12.12.2010, 10:50 |
|
zslevi
Date Registered: 12.2010
Location:
Posts: 3
 |
|
It's also easy to add or remove chords, as they're stored as structured text. This is how they're defined:
%chord(maj,[0,4,7]).
chord(maj7,[0,4,7,10]).
%chord(min,[0,3,7]).
chord(min7,[0,3,7,10]).
chord(sus,[0,5,7]).
chord(dim,[0,3,6]).
chord(aug,[0,4,8]).
scale(major,[0,2,4,5,7,9,11]).
scale(minor,[0,2,3,5,7,8,10]).
scale(harmonic_minor,[0,2,3,5,7,8,11]).
scale(blues6,[0,3,5,6,7,10]).
scale(blues7,[0,2,3,5,6,9,10]).
The list of numbers are pitch of notes relative to the root (in halfsteps). You shouldn't add numbers bigger than 11, the allowed domain is 0..11.
|
|
12.12.2010, 11:13 |
|
|
|
 |
|