// // Programmer: Craig Stuart Sapp // Creation Date: Tue Nov 21 14:12:11 PST 2000 // Last Modified: Tue Nov 28 17:57:07 PST 2000 // Last Modified: Wed Jan 1 23:10:48 PST 2003 (Maxwell function style changed) // Filename: ...sig/examples/all/dissnote.cpp // Web Address: http://sig.sapp.org/examples/museinfo/humdrum/dissnote.cpp // Syntax: C++; museinfo // // Description: Determine if a note in a sonority is dissonant according // to rules given by John Maxwell. // // Reference: "An Expert System for Harmonizing Analysis of Tonal // Music." pp 335-353 in: "Understanding Music with AI: // Perspectives on Music Cognition." Ed. by Mira Balaban, // Kemal Ebcioglu, and Otto Laske. MIT Press; 1992. // [ISBN 0-262-52170-9] // #include "humdrum.h" #include #include #include typedef Array ArrayInt; // function declarations void checkOptions (Options& opts, int argc, char* argv[]); void example (void); void displayNoteDiss (Array& notediss); void printAnalysis (HumdrumFile& infile, Array& notediss); void usage (const char* command); // global variables Options options; // database for command-line arguments int debugQ = 0; // used with the --debug option int appendQ = 0; // used with the -a option int compoundQ = 1; // used with the -c option /////////////////////////////////////////////////////////////////////////// int main(int argc, char* argv[]) { HumdrumFile infile; Array notediss; // process the command-line options checkOptions(options, argc, argv); // figure out the number of input files to process int numinputs = options.getArgCount(); for (int i=0; i& notediss) { int i; for (i=0; i& notediss) { int i; if (appendQ) { for (i=0; i