// // Programmer: Craig Stuart Sapp // Creation Date: Wed Feb 3 15:49:07 PST 2010 // Last Modified: Wed Feb 3 15:49:10 PST 2010 // Filename: ...sig/examples/all/matphrase.cpp // Web Address: http://sig.sapp.org/examples/museinfo/humdrum/matphrase.cpp // Syntax: C++; museinfo // // Description: Extract monophonic phrase information for analysis in matlab. // #include #include "humdrum.h" #ifndef OLDCPP #include #else #include #endif // function declarations: void usage (const char* command); void example (void); void checkOptions (Options& opts, int argc, char* argv[]); void processFile (int count, const char* filename); int processPhrase (HumdrumFile& infile, const char* filename, int scount, int pcount, int line); void printRegion (HumdrumFile& infile, const char* defaultvalue); // User interface variables: Options options; const char* defaultregion = "NONE"; // used with -r option ////////////////////////////////////////////////////////////////////////// int main(int argc, char** argv) { // process the command-line options checkOptions(options, argc, argv); int i; for (i=0; i pitches; Array durations; pitches.setSize(100); durations.setSize(100); pitches.setSize(0); durations.setSize(0); int pit; double dur; int i, j; int finished = 0; for (i=line; i