// // Programmer: Craig Stuart Sapp // Creation Date: Sat May 23 21:08:48 PDT 1998 // Last Modified: Fri Jul 3 14:18:04 PDT 1998 // Filename: ...sig/examples/all/base12.cpp // Web Address: http://sig.sapp.org/examples/museinfo/humdrum/base12.cpp // Syntax: C++; museinfo // Reference: http://www.ccarh.org/publications/reprints/base12 // // Description: Converts **kern pitches into/from base 12 system. // #include "humdrum.h" #include #include #include // function declarations void checkOptions(Options& opts, int argc, char* argv[]); void processDataRecord(HumdrumRecord& line); void processExclusiveInterp(HumdrumRecord& line); void processTandemRecord(HumdrumRecord& line); void splitstring(const char* line, char* front, char* basestring, char* back, const char* markstart, const char* markend); void kernsplit(const char* line, char* front, char* back, const char* markstart, const char* markend); // global variables Options options; // database for command-line arguments int octaveQ = 1; // boolean for keeping or removing octave info int transpose = 0; // transposition value from command-line int preserveQ = 0; // boolean for keeping extra kern info int kernQ = 1; // boolean for converting **base12 to **kern int cvalue = 2; // default pitch class for C int noptionQ = 0; // for -n option: convert to specific key int mode = 0; // for -n option char newkey[32] = {0}; // for -n option string markstart = ""; // start of base12 number marker string markend = ""; // end of base12 number marker /////////////////////////////////////////////////////////////////////////// int main(int argc, char** argv) { // process the command-line options checkOptions(options, argc, argv); int numinputs = options.getArgCount(); HumdrumFile input; for (int j=0; j**kern spines and converts them \n" "to a base-12 representation which preserves interval qualities between \n" "pitches. \n" " \n" "Usage: " << command << " [-r][-p] input \n" " \n" "Options: \n" " -r = keep **kern rhythms and other kern information. \n" " -p = convert to base12 pitch class, not asolute pitch. \n" " -k = convert from **base12 to **kern \n" " --options = list of all options, aliases and default values \n" " \n" << endl; } // md5sum: fa0b97502e1fb9c706860c3dad4d77bc base12.cpp [20160320]