Update of /cvsroot/pure-data/externals/frankenstein In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3778
Modified Files: chords_memory.c common.c harmonizer.c Log Message: added all maxlib chords
Index: harmonizer.c =================================================================== RCS file: /cvsroot/pure-data/externals/frankenstein/harmonizer.c,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** harmonizer.c 21 Jan 2006 00:11:05 -0000 1.8 --- harmonizer.c 21 Jan 2006 02:23:16 -0000 1.9 *************** *** 112,115 **** --- 112,186 ---- case kDim7: n2=3; n3=6; n4=9;n5=0;break; case kMinMaj7: n2=4; n3=7; n4=11;n5=0;break; + + case kMaj7b9: n2=4; n3=7; n4=11;n5=1;break; + case kMaj9: n2=4; n3=7; n4=11;n5=2;break; + //case kMinMaj7: n2=4; n3=7; n4=11;n5=3;break; + //case kMaj7: n2=4; n3=7; n4=11;n5=4;break; + case kDom7s11: n2=4; n3=7; n4=10;n5=6;break; + case kDomb9: n2=4; n3=7; n4=10;n5=1;break; + case kMaj7s5: n2=4; n3=8; n4=11;n5=0;break; + case kMin9: n2=3; n3=7; n4=2;n5=0;break; + + case kDom9: n2=4; n3=7; n4=10;n5=2;break; + + case kM7b9s13: n2=1; n3=10; n4=11;n5=4;break; + case kMinMajb9: n2=1; n3=3; n4=11;n5=7;break; + case kDimMajb9: n2=3; n3=6; n4=11;n5=1;break; + + case kMinMaj9: n2=3; n3=7; n4=11;n5=2;break; + case kHalfDimb9: n2=3; n3=6; n4=1;n5=10;break; + case kDim7b9: n2=3; n3=6; n4=1;n5=9;break; + case kMaj7s9: n2=3; n3=4; n4=7;n5=11;break; + case kDom7s9: n2=3; n3=4; n4=7;n5=10;break; + case kMaj11: n2=4; n3=5; n4=7;n5=11;break; + case kMaj7b5: n2=4; n3=6; n4=11;n5=0;break; + case kMaj7s13: n2=4; n3=7; n4=11;n5=10;break; + + case kUnison: n2=0; n3=0; n4=0;n5=0;break; + + + case kDom7b5: n2=4; n3=6; n4=10;n5=0;break; + + case kHalfDim9: n2=3; n3=6; n4=10;n5=2;break; + + case kMaj9b5: n2=4; n3=6; n4=11;n5=2;break; + case kDom9b5: n2=4; n3=6; n4=10;n5=2;break; + case kDom9b13: n2=4; n3=2; n4=8;n5=10;break; + case kMin9s11: n2=2; n3=3; n4=6;n5=7;break; + case kmM9b11: n2=3; n3=11; n4=2;n5=4;break; + + case kMaj7s5b9: n2=2; n3=4; n4=8;n5=11;break; + case kDom7b9: n2=1; n3=4; n4=7;n5=10;break; + case kMin7b9: n2=1; n3=3; n4=7;n5=10;break; + case kMinb9s11: n2=1; n3=3; n4=7;n5=6;break; + + case kMaj7s11: n2=4; n3=6; n4=7;n5=11;break; + case kMs9s11 : n2=3; n3=4; n4=6;n5=7;break; + case kHDimb11 : n2=3; n3=6; n4=10;n5=4;break; + + case kDom11 : n2=4; n3=7; n4=10;n5=5;break; + case kMin11 : n2=3; n3=7; n4=5;n5=0;break; + case kHalfDim11 : n2=3; n3=6; n4=10;n5=5;break; + case kDim11 : n2=3; n3=6; n4=9;n5=5;break; + case kMinMaj11 : n2=3; n3=7; n4=11;n5=5;break; + case kDimMaj11 : n2=3; n3=6; n4=11;n5=5;break; + case kMaj11b5 : n2=4; n3=6; n4=5;n5=0;break; + case kMaj11s5 : n2=4; n3=5; n4=8;n5=0;break; + case kMaj11b9 : n2=4; n3=5; n4=7;n5=1;break; + case kMaj11s9 : n2=4; n3=5; n4=7;n5=3;break; + case kMaj11b13 : n2=4; n3=5; n4=7;n5=8;break; + case kMaj11s13 : n2=4; n3=5; n4=10;n5=11;break; + case kM11b5b9 : n2=4; n3=6; n4=1;n5=11;break; + case kDom11b5 : n2=4; n3=6; n4=10;n5=5;break; + case kDom11b9 : n2=4; n3=5; n4=10;n5=1;break; + case kDom11s9 : n2=4; n3=5; n4=10;n5=3;break; + case kHalfDim11b9 : n2=3; n3=6; n4=5;n5=1;break; + case kMin7s11 : n2=3; n3=7; n4=10;n5=6;break; // is it correct? + case kDom13s11 : n2=4; n3=10; n4=6;n5=9;break; // is it correct ? + case kM7b913 : n2=4; n3=10; n4=1;n5=9;break; + case kMaj9s13 : n2=2; n3=4; n4=11;n5=9;break; + case kDom7b13 : n2=4; n3=10; n4=9;n5=7;break; + case kChrom : n2=1; n3=2; n4=3;n5=4;break; + } if (DEBUG_VERBOSE)
Index: common.c =================================================================== RCS file: /cvsroot/pure-data/externals/frankenstein/common.c,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** common.c 21 Jan 2006 00:11:05 -0000 1.21 --- common.c 21 Jan 2006 02:23:16 -0000 1.22 *************** *** 838,842 **** return C; } ! chord_type_t from_string_to_type(const char *substr) { --- 838,842 ---- return C; } ! /* chord_type_t from_string_to_type(const char *substr) { *************** *** 881,885 **** return C; } ! // find the tonality mode in this string modes_t from_string_to_mode(const char *substr) --- 881,885 ---- return C; } ! */ // find the tonality mode in this string modes_t from_string_to_mode(const char *substr) *************** *** 930,933 **** --- 930,941 ---- if (strstr(substr, "unison")) return kUnison; + if (strstr(substr, "major 7 b9 13")) + return kM7b913; + if (strstr(substr, "major 7th #13")) + return kMaj7s13; + if (strstr(substr, "major 7 b9 #13")) + return kM7b9s13; + if (strstr(substr, "dominant 7th b13")) + return kDom7b13; if (strstr(substr, "major 7th #5")) return kMaj7s5; *************** *** 1026,1037 **** if (strstr(substr, "dominant 13th #11")) return kDom13s11; - if (strstr(substr, "major 7 b9 13")) - return kM7b913; - if (strstr(substr, "major 7th #13")) - return kMaj7s13; - if (strstr(substr, "major 7 b9 #13")) - return kM7b9s13; - if (strstr(substr, "dominant 7th b13")) - return kDom7b13; if (strstr(substr, "chromatic")) return kChrom; --- 1034,1037 ---- *************** *** 1048,1051 **** --- 1048,1055 ---- if (strstr(substr, "major 7th")) return kMaj7; + if (strstr(substr, "half diminished 7th")) + return kHalfDim7; + if (strstr(substr, "diminished 7th")) + return kDim7; if (strstr(substr, "major")) return kMaj; *************** *** 1054,1061 **** if (strstr(substr, "minor")) return kMin; - if (strstr(substr, "half diminished 7th")) - return kHalfDim7; - if (strstr(substr, "diminished 7th")) - return kDim7; if (strstr(substr, "diminished")) return kDim; --- 1058,1061 ----
Index: chords_memory.c =================================================================== RCS file: /cvsroot/pure-data/externals/frankenstein/chords_memory.c,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** chords_memory.c 15 Jan 2006 22:54:41 -0000 1.8 --- chords_memory.c 21 Jan 2006 02:23:15 -0000 1.9 *************** *** 101,105 ****
! #define DEBUG 0 // messaggi di debug #define DEBUG_VERBOSE 0 // messaggi di debug
--- 101,105 ----
! #define DEBUG 1 // messaggi di debug #define DEBUG_VERBOSE 0 // messaggi di debug
*************** *** 228,231 **** --- 228,232 ---- switch (chord.mode) { + case kUnison: strcat(string, "unison"); break; case kMaj: strcat(string, "major"); break; case kMin: strcat(string, "minor"); break; *************** *** 239,244 **** --- 240,308 ---- case kDim7: strcat(string, "diminished 7th"); break; case kMinMaj7: strcat(string, "minor/major 7th"); break; + + case kMaj7s5: strcat(string, "major 7th #5"); break; + case kMaj7b5: strcat(string, "major 7th b5"); break; + case kDom7s5: strcat(string, "dominant 7th #5"); break; + case kDom7b5: strcat(string, "dominant 7th b5"); break; case kDomb9: strcat(string, "dominant b9"); break;
+ case kMaj9: strcat(string, "major 9th"); break; + case kDom9: strcat(string, "dominant 9th"); break; + case kMin9: strcat(string, "minor 9th"); break; + case kHalfDim9: strcat(string, "half diminished 9th"); break; + case kMinMaj9: strcat(string, "minor major 9th"); break; + case kDimMaj9: strcat(string, "diminished major 9th");break; + case kMaj9b5: strcat(string, "major 9th b5"); break; + case kDom9b5: strcat(string, "dominant 9th b5"); break; + case kDom9b13: strcat(string, "dominant 9th b13"); break; + case kMin9s11: strcat(string, "minor 9th #11"); break; + case kmM9b11: strcat(string, "minor/maj 9th b11"); break; + + case kMaj7b9: strcat(string, "major 7th b9"); break; + case kMaj7s5b9: strcat(string, "major 7th #5 b9"); break; + case kDom7b9: strcat(string, "dominant 7th b9"); break; + case kMin7b9: strcat(string, "minor 7th b9"); break; + case kMinb9s11: strcat(string, "minor b9 #11"); break; + case kHalfDimb9:strcat(string, "half diminished b9"); break; + case kDim7b9: strcat(string, "diminished b9"); break; + case kMinMajb9: strcat(string, "minor/major b9"); break; + case kDimMajb9: strcat(string, "diminished M7 b9"); break; + + case kMaj7s9: strcat(string, "major 7th #9"); break; + case kDom7s9: strcat(string, "dominant #9"); break; + case kMaj7s11: strcat(string, "major 7th #11"); break; + case kMaj9s13: strcat(string, "major 9th #13"); break; + case kMs9s11: strcat(string, "major #9 #11"); break; + case kHDimb11: strcat(string, "half diminished b11"); break; + + case kMaj11: strcat(string, "major 11th"); break; + case kDom11: strcat(string, "dominant 11th"); break; + case kMin11: strcat(string, "minor 11th"); break; + case kHalfDim11:strcat(string, "half diminished 11th");break; + case kDim11: strcat(string, "diminished 11th"); break; + case kMinMaj11: strcat(string, "minor/major 11th"); break; + case kDimMaj11: strcat(string, "diminished maj 11th"); break; + + case kMaj11b5: strcat(string, "major 11th b5"); break; + case kMaj11s5: strcat(string, "major 11th #5"); break; + case kMaj11b9: strcat(string, "major 11th b9"); break; + case kMaj11s9: strcat(string, "major 11th #9"); break; + case kMaj11b13: strcat(string, "major 11th b13"); break; + case kMaj11s13: strcat(string, "major 11th #13"); break; + case kM11b5b9: strcat(string, "major 11th b5 b9"); break; + case kDom11b5: strcat(string, "dominant 11th b5"); break; + case kDom11b9: strcat(string, "dominant 11th b9"); break; + case kDom11s9: strcat(string, "dominant 11th #9"); break; + case kHalfDim11b9:strcat(string, "half dim 11th b9"); break; + case kDom7s11: strcat(string, "dominant #11"); break; + case kMin7s11: strcat(string, "minor 7th #11"); break; + + case kDom13s11: strcat(string, "dominant 13th #11"); break; + case kM7b913: strcat(string, "major 7 b9 13"); break; + case kMaj7s13: strcat(string, "major 7th #13"); break; + case kM7b9s13: strcat(string, "major 7 b9 #13"); break; + case kDom7b13: strcat(string, "dominant 7th b13"); break; + case kChrom: strcat(string, "chromatic"); break; + } } *************** *** 299,303 **** interval = clean_note(absnote - x->fundamental_note); chord.note = interval; ! chord.mode=from_string_to_type(substr); if (DEBUG) post("chords_memory_string2chord: chord.note=%i chord.mode=%i",chord.note, chord.mode); --- 363,367 ---- interval = clean_note(absnote - x->fundamental_note); chord.note = interval; ! chord.mode=string2mode(substr); if (DEBUG) post("chords_memory_string2chord: chord.note=%i chord.mode=%i",chord.note, chord.mode);