#include #include #include #include #include #include #include #include #include #include #include #include #include // ********************************************* // "D-7","G7","C^","Eb-7","Ab7","B-7","E7","Bb-7","Bb7","Db^","C7#9","D7alt","C^#4","Gb^#4","G7#11","F7#11", // "Gsus","Ebsus","Dsusb9","F#susb9","Ebsusb9","Ab/Eb","G-","" /* ABCDEFG #b - ^ Note (A-G) Degree(^,7,9,None) Inflection(Sharp,Flat,None) Verb(sus,aug,alt,None) Inflection(Sharp,Flat,None) Degree(^,4,7,9,11,None) (note1,value) (degree1,value) (inflection1,value) (verb1,value) */ void testCompiler(); Notes getNotes(Scale &scale,int noteCount); Notes getNotes(Music::Chord &chord,int noteCount); int getCount(void); int getDelay(int cNotes); using namespace Music; void main() { // testCompiler(); MIDIOutputDevice midiOut; Block chords; Notes notes; Music::Chord chord; Note root; Note third; Note fifth; Note seventh; DiminishedHalfScale diminishedScale(Note::E); root=diminishedScale.getDegree(Degree::I); third=diminishedScale.getDegree(Degree::III); fifth=diminishedScale.getDegree(Degree::V); chord.create(root,Chord::ChordType::DominantSeventh); ::OutputDebugString(chord.toString()+String("\n")); chords.insert(&chord); chord.create(third,Chord::ChordType::DominantSeventh); ::OutputDebugString(chord.toString()+String("\n")); chords.insert(&chord); chord.create(fifth,Chord::ChordType::DominantSeventh); ::OutputDebugString(chord.toString()+String("\n")); chords.insert(&chord); chord.create(seventh,Chord::ChordType::DominantSeventh); ::OutputDebugString(chord.toString()+String("\n")); chords.insert(&chord); int octave=3; while(true) { DiminishedHalfScale diminishedScale(Note(Note::E,octave)); for(int index=0;index chords; IonianScale ionianScale; Note note(Note::GSh); Degree degree; degree=ionianScale.getDegree(note); if(degree==Degree::None)::OutputDebugString("No degree."); else ::OutputDebugString("Found degree."); // chords.insert(&String("C^")); // chords.insert(&String("Db^")); // chords.insert(&String("C^#4")); // chords.insert(&String("D7")); // chords.insert(&String("D-7")); // chords.insert(&String("Cb7#9")); // chords.insert(&String("D-7")); // chords.insert(&String("G7")); // chords.insert(&String("Eb-7")); // chords.insert(&String("G-")); // chords.insert(&String("Ab7")); // chords.insert(&String("B-7")); // chords.insert(&String("F#7")); // chords.insert(&String("E7")); // chords.insert(&String("Bb-7")); // chords.insert(&String("Bb7")); // chords.insert(&String("C7#9")); // chords.insert(&String("Gb^#4")); // chords.insert(&String("G7#11")); // chords.insert(&String("F7#11")); // chords.insert(&String("Ebsus")); // chords.insert(&String("Gsus")); // chords.insert(&String("E#sus")); // chords.insert(&String("Dsusb9")); // chords.insert(&String("F#susb9")); // chords.insert(&String("Ebsusb9")); // chords.insert(&String("A-")); // chords.insert(&String("A-b6")); // chords.insert(&String("Ah")); for lack of a better system, this is half-diminished, can also do "A-7b5" // chords.insert(&String("Ao")); diminished // chords.insert(&String("C-^")); // C MinorMajor // chords.insert(&String("C-#7")); // C Minor - Sharp 7 a.k.a C Minor Major // chords.insert(&String("C7b9")); // C Minor - Sharp 7 a.k.a C Minor Major // chords.insert(&String("D7alt")); // this is based on melodic minor scale // chords.insert(&String("Ab/Eb")); // chords.insert(&String("")); // chords.insert(&String("Aalt")); // chords.insert(&String("A7alt")); // Scanner scanner; // Parser parser; // scanner.scan(chords[0]); // Music::Chord chord; // ::OutputDebugString(scanner.toString()); // parser.parse(scanner,chord); // chords.insert(&String("Esusb9")); // chords.insert(&String("E6")); ChordCompiler chordCompiler; Music::Chord chord; chords.insert(&String("Am7")); // chords.insert(&String("A-6")); // A minor 6 // chords.insert(&String("A-7b5")); // A-half diminished a.k.a "B-7b5" // chords.insert(&String("Ah")); // A-half diminished a.k.a "B-7b5" // chords.insert(&String("A-7b5")); // A-half diminished a.k.a "B-7b5" for(int index=0;index