// // Programmer: Craig Stuart Sapp // Creation Date: Mon Jun 7 17:19:40 PDT 2010 // Last Modified: Wed Jun 9 16:29:44 PDT 2010 (added -s option) // Last Modified: Wed Jun 16 14:42:14 PDT 2010 (added tied durations) // Filename: ...sig/examples/all/musebeat.cpp // Web Address: http://sig.sapp.org/examples/museinfo/humdrum/musebeat.cpp // Syntax: C++; museinfo // // Description: Print the record type for each line in a MuseData file. // Basic debugging program for parsing MuseData files. // #include "MuseData.h" #include "Options.h" #include "museinfo.h" #ifndef OLDCPP using namespace std; #endif // function declarations void checkOptions (Options& opts, int argc, char* argv[]); void example (void); void usage (const char* command); void printData (MuseData& infile); void printDataSorted (MuseData& infile); // global variables Options options; // database for command-line arguments int linenumberQ = 0; // used with -l option int ticklineQ = 0; // used with -t option int tiedurQ = 0; // used with -T option int rationalQ = 0; // used with -r option int sortQ = 0; // used with -s option int repeatQ = 0; // used with -R option /////////////////////////////////////////////////////////////////////////// int main(int argc, char* argv[]) { checkOptions(options, argc, argv); int numinputs = options.getArgCount(); MuseData infile; for (int i=0; i