// // Programmer: Craig Stuart Sapp // Creation Date: Mon Nov 20 12:22:41 PST 2000 // Last Modified: Mon Nov 20 12:22:44 PST 2000 // Filename: ...sig/examples/all/noteset.cpp // Web Address: http://sig.sapp.org/examples/museinfo/humdrum/noteset.cpp // Syntax: C++; museinfo // // Description: Collects all notes found in **kern spines in the // input Hudrum data into one spine formatted with given options. // Useful for converting Humdrum **kern data into another format. // #include "humdrum.h" #include #define STYLE_BASE40 1 #define STYLE_MIDI 2 #define STYLE_ASCII 3 // function declarations void checkOptions (Options& opts, int argc, char* argv[]); void example (void); void printAnalysis (HumdrumFile& infile); 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 countQ = 0; // used with the -c option int pcQ = 0; // used with the -p option int nlflag = 0; // used for note list style. int styleType = STYLE_ASCII ; /////////////////////////////////////////////////////////////////////////// int main(int argc, char* argv[]) { HumdrumFile infile; // 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& notes) { if (countQ) { cout << notes.getSize(); return; } if (notes.getSize() == 0) { cout << "r"; return; } int i; if (styleType == STYLE_BASE40) { for (i=0; i notes; if (appendQ) { for (i=0; i