// // Programmer: Craig Stuart Sapp // Creation Date: Sat Nov 5 01:31:39 PDT 2011 // Last Modified: Sat Nov 5 01:31:41 PDT 2011 // Filename: ...sig/examples/all/vrange.cpp // Web Address: http://sig.sapp.org/examples/museinfo/humdrum/vrange.cpp // Syntax: C++; museinfo // // Description: Estimate the vocal fuction of parts. // #include "humdrum.h" #include #include // function declarations void checkOptions (Options& opts, int argc, char* argv[]); void example (void); void usage (const char* command); void fillSequence (Array& list, int centerPosition); void processFile (HumdrumFile& infile); void printDiatonicName (int value); // global variables Options options; // database for command-line arguments int debugQ = 0; // used with --debug option /////////////////////////////////////////////////////////////////////////// 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(); Array midibins; midibins.setSize(128); midibins.setAll(0); midibins.allowGrowth(0); for (int i=0; i > diatonic; int i, j, k; int track; int tcount; char buffer[1024] = {0}; diatonic.setSize(infile.getMaxTracks() + 1); for (i=0; i 0) { diatonic[track][value]++; } } } } if (debugQ) { int startindex = Convert::kernToDiatonicPitch("AAA"); int endindex = Convert::kernToDiatonicPitch("ccc"); for (j=startindex; j& list, int centerPosition) { list.setAll(0); int& cen = centerPosition; if (cen-6 >= 0) { list[cen-6] = 0.0917; } if (cen-5 >= 0) { list[cen-5] = 0.1352; } if (cen-4 >= 0) { list[cen-4] = 0.2585; } if (cen-3 >= 0) { list[cen-3] = 0.3317; } if (cen-2 >= 0) { list[cen-2] = 0.4017; } if (cen-1 >= 0) { list[cen-1] = 0.4545; } list[cen] = 0.5004; if (cen+1 < list.getSize()) { list[cen+1] = 0.4573; } if (cen+2 < list.getSize()) { list[cen+2] = 0.4002; } if (cen+3 < list.getSize()) { list[cen+3] = 0.3442; } if (cen+4 < list.getSize()) { list[cen+4] = 0.2304; } if (cen+5 < list.getSize()) { list[cen+5] = 0.1485; } if (cen+6 < list.getSize()) { list[cen+6] = 0.1058; } if (cen+7 < list.getSize()) { list[cen+7] = 0.0957; } } ////////////////////////////// // // example -- example usage of the maxent program // void example(void) { cout << " \n" << endl; } ////////////////////////////// // // usage -- gives the usage statement for the quality program // void usage(const char* command) { cout << " \n" << endl; } // md5sum: 51425f30fced6bea01f1841023903d97 vrange.cpp [20160320]