aboutsummaryrefslogtreecommitdiff
path: root/chords_memory.c
diff options
context:
space:
mode:
authorDavid Plans Casal <pland@users.sourceforge.net>2005-12-05 21:05:34 +0000
committerDavid Plans Casal <pland@users.sourceforge.net>2005-12-05 21:05:34 +0000
commit773dd5fb3f0e68744cb7400f7b10176d99b768bd (patch)
tree71d63685390ea2c154f2142bb878109783fcd9ad /chords_memory.c
parentfc71d5f8d34c6d0ea68c4787d17f033899ddc45e (diff)
adding the rest of the 9ths up to kDimMaj9
svn path=/trunk/externals/frankenstein/; revision=4144
Diffstat (limited to 'chords_memory.c')
-rwxr-xr-xchords_memory.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/chords_memory.c b/chords_memory.c
index 015e5ae..e0cc446 100755
--- a/chords_memory.c
+++ b/chords_memory.c
@@ -112,7 +112,7 @@ there are plenty of such algos, we must just copy them down.
static t_class *chords_memory_class;
// how can a chord be?
-#define TYPES_NUM 13 // keep me updated
+#define TYPES_NUM 17 // keep me updated
typedef enum {
kMaj=0,
kMin=1,
@@ -127,7 +127,11 @@ typedef enum {
//pland adding 9ths 30.11.05 and beyond
kDomb9=10
kMaj9=11
- kDom9=12
+ kDom9=12
+ kMin9=13
+ kHalfDim9=14
+ kMinMaj9=15
+ kDimMaj9=16
} chord_type_t;
// how many tones do we have in our octave?
@@ -336,6 +340,14 @@ chord_type_t from_string_to_type(const char *substr)
return kMaj9;
if (strstr(substr, "dominant 9th"))
return kDom9;
+ if (strstr(substr, "minor 9th"))
+ return kMin9;
+ if (strstr(substr, "half diminished 9th"))
+ return kHalfDim9;
+ if (strstr(substr, "minor major 9th"))
+ return kMinMaj9;
+ if (strstr(substr, "diminished major 9th"))
+ return kDimMaj9;
// TODO: other chords
// beware when adding new chords
// put shorter names at end of this function!