techbear
2005-07-22 16:51:40 UTC
I wrote a program in C++ to run through all possible alternate tunings
for my guitar. It looks at the "best" chord patterns for each tuning,
and tries to find a "winner", an alternate tuning that results in
simple and easy chords for me to play.
I need peer review, to tell me what I'm doing wrong and suggest better
ways of doing it.
You can find my code project (Virtual C++ 6.0) in a 10k ZIP file at
http://www.exegame.com/chords.zip
Thank you!
*** longer explanation ***
A couple weekends ago, I started thinking about alternate guitar
tunings. I play guitar poorly, mostly just strum along, but I know all
my "cowboy chords", so I'm not useless. :)
If an alternate guitar tuning would provide chords that are easier and
simpler for me to play, I'd like to explore it.
Then I got to thinking, this is a straightforward problem, so what if I
wrote a program to brute-force it? I could wrote a program that would
examine ALL possible alternate tunings, looking for the one with the
"easiest" chords. It might take a while, but we've all got more
computing horsepower on our desks than even before, so I decided to go
for it.
It took some tweaking, but the code I've made available for download
DOES what I intended (apparently). For each possible alternate tuning
(within reason), for each chord, for each possible chord fingering, it
tallys up suitablility and finds one guitar tuning that it feels has
the easiest chords. It then outputs all the chords for that tuning,
then exits.
The heart of the program is the JudgeFitness() function, which is in
charge of looking at a single chord fingering, and determining its
score, a measure of how easy this chord seems to be to play.
the current JudgeFitness() test is simplistic and non-optimal. A
better way to construct the function might be to somehow model my
fingers, examining exactly how I would place each finger on each
string. I haven't got a clue how to do that, yet. :)
My stringImportance[] and chordTypeArray[] data are also filled with
numbers I pulled out of thin air, and probably should be adjusted.
The .importance member of the ChordType class is especially arbitrary.
It's a weight so that major and minor chords (hopefully) come out more
easy to play than augmented and diminished chords. I assume I'll
mostly play major and minor chords. However, I don't really know the
true universal chord distribution across all popular songs, or even all
songs I play. I have some ideas about how to find out, though...
Anyway, any feedback would be much appreciated!! Thank you.
for my guitar. It looks at the "best" chord patterns for each tuning,
and tries to find a "winner", an alternate tuning that results in
simple and easy chords for me to play.
I need peer review, to tell me what I'm doing wrong and suggest better
ways of doing it.
You can find my code project (Virtual C++ 6.0) in a 10k ZIP file at
http://www.exegame.com/chords.zip
Thank you!
*** longer explanation ***
A couple weekends ago, I started thinking about alternate guitar
tunings. I play guitar poorly, mostly just strum along, but I know all
my "cowboy chords", so I'm not useless. :)
If an alternate guitar tuning would provide chords that are easier and
simpler for me to play, I'd like to explore it.
Then I got to thinking, this is a straightforward problem, so what if I
wrote a program to brute-force it? I could wrote a program that would
examine ALL possible alternate tunings, looking for the one with the
"easiest" chords. It might take a while, but we've all got more
computing horsepower on our desks than even before, so I decided to go
for it.
It took some tweaking, but the code I've made available for download
DOES what I intended (apparently). For each possible alternate tuning
(within reason), for each chord, for each possible chord fingering, it
tallys up suitablility and finds one guitar tuning that it feels has
the easiest chords. It then outputs all the chords for that tuning,
then exits.
The heart of the program is the JudgeFitness() function, which is in
charge of looking at a single chord fingering, and determining its
score, a measure of how easy this chord seems to be to play.
the current JudgeFitness() test is simplistic and non-optimal. A
better way to construct the function might be to somehow model my
fingers, examining exactly how I would place each finger on each
string. I haven't got a clue how to do that, yet. :)
My stringImportance[] and chordTypeArray[] data are also filled with
numbers I pulled out of thin air, and probably should be adjusted.
The .importance member of the ChordType class is especially arbitrary.
It's a weight so that major and minor chords (hopefully) come out more
easy to play than augmented and diminished chords. I assume I'll
mostly play major and minor chords. However, I don't really know the
true universal chord distribution across all popular songs, or even all
songs I play. I have some ideas about how to find out, though...
Anyway, any feedback would be much appreciated!! Thank you.