// // Programmer: Craig Stuart Sapp // Creation Date: Mon Nov 20 16:12:43 PST 2000 // Last Modified: Tue Nov 28 15:00:42 PST 2000 // Last Modified: Wed Jan 1 23:17:23 PST 2003 (changed Maxwell function style) // Filename: ...sig/examples/all/maxent2.cpp // Web Address: http://sig.sapp.org/examples/museinfo/humdrum/maxent2.cpp // Syntax: C++; museinfo // // Description: determination of metrical accentuation through rules given // by John Maxwell in: // // 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 // function declarations void checkOptions (Options& opts, int argc, char* argv[]); void example (void); void printAnalysis (HumdrumFile& infile, Array& accentuation); 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 accentuation; // 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& accentuation) { int i; if (appendQ) { for (i=0; i