// // Programmer: Craig Stuart Sapp // Creation Date: Mon Dec 18 03:41:53 PST 2006 // Last Modified: Mon Dec 18 03:42:01 PST 2006 // Filename: ...sig/examples/all/onsetbeats.cpp // Web Address: http://sig.sapp.org/examples/museinfo/humdrum/onsetbeats.cpp // Syntax: C++; museinfo // // Description: Identifies absolute beat location of note onset // events in the score (or lack thereof). // #include "humdrum.h" // function declarations void checkOptions (Options& opts, int argc, char* argv[]); void example (void); void usage (const char* command); int isOnset (HumdrumFile& infile, int line); void printOutput (HumdrumFile& file); // global variables Options options; // database for command-line arguments int appendQ = 0; // used with -a option int prependQ = 0; // used with -p option int beatsQ = 0; // only check the main beat locations int zero = 0; // offset control int invertQ = 0; // not yet implemented /////////////////////////////////////////////////////////////////////////// int main(int argc, char* argv[]) { HumdrumFile infile, outfile; // 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