// // Programmer: Craig Stuart Sapp // Creation Date: Wed Dec 6 13:09:20 PST 2000 // Last Modified: Wed Dec 6 13:09:25 PST 2000 // Filename: ...sig/examples/all/rhylev.cpp // Web Address: http://sig.sapp.org/examples/museinfo/humdrum/rhylev.cpp // Syntax: C++; museinfo // // Description: determine the metrical level of each rhythmic // position in a score // // 0 = beat level // negative numbers = meter levels // positive numbers = subdivisions of the beat // // Example: 4/4: // 0 = beat // -1 = every half note // -2 = every quarter note // 1 = eighth note, triplet eighth note // 2 = sixteenth note, triplet sixteenth note // 3 = 32nd note, triplet 32nd note // // Example: 3/4: // 0 = beat // 1 = first beat // 0 = second/third beat // -1 = eighth note, triplet eighth note // -2 = sixteenth note, triplet sixteenth note // -3 = 32nd note, triplet 32nd note // // #include "humdrum.h" #include // function declarations void checkOptions (Options& opts, int argc, char* argv[]); void example (void); void printAnalysis (HumdrumFile& infile, Array& rhylev); 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 rhylev; // process the command-line options checkOptions(options, argc, argv); // figure out the number of input files to process int numinputs = options.getArgCount(); int j; for (int i=0; i& rhylev) { int i; if (appendQ) { for (i=0; i