#include #include #include #include "util.h" #include "globals.h" #include "load.h" #include "helpstring.h" using namespace std; #define VERSION "1.0" void show_help() { cout << HELPSTRING <=0) && (num<=127)) { if (programfile[num]=="") programfile[num]=str.substr(pos+1); else output_note("NOTE: program #"+IntToStr(num)+" has already been defined. ignoring it..."); } else { output_warning("WARNING: number out of range (0..127) in --program option.\n ignoring the option..."); } } else { output_warning("WARNING: not a number in --program option. ignoring the option..."); } } else { output_warning("WARNING: missing number in --program option. ignoring the option..."); } } break; case 'i': if (isfloat(optarg)) cleanup_interval_sec=atof(optarg); else output_warning("WARNING: not a number in --interval option. ignoring it..."); break; case 'w': #ifdef WATCH_FILES watchfiles=false; #else output_note("NOTE: support for watching files isn't compiled in, so you can't disable it"); #endif break; case 304: if (isfloat(optarg)) snh_freq_hz=atof(optarg); else output_warning("WARNING: not a number in --sample-and-hold-freq option. ignoring it..."); break; case 400: //FINDLFO case 401: case 402: if (isfloat(optarg)) lfo_freq_hz[result-400]=atof(optarg); else output_warning("WARNING: not a number in --lfoN-freq option. ignoring it..."); break; case 303: if (isfloat(optarg)) max_port_time_sec=atof(optarg); else output_warning("WARNING: not a number in --max-portamento-time option. ignoring it..."); break; case 305: if (isfloat(optarg)) if (atoi(optarg)<=0) output_warning("WARNING: filter-update-freq must be positive. ignoring it..."); else filter_update_freq_hz=atof(optarg); else output_warning("WARNING: not a number in --filter-update-freq option. ignoring it..."); break; case 306: if (isfloat(optarg)) if (atoi(optarg)<=0) output_warning("WARNING: lfo-update-freq must be positive. ignoring it..."); else lfo_update_freq_hz=atof(optarg); else output_warning("WARNING: not a number in --lfo-update-freq option. ignoring it..."); break; case 307: if (isfloat(optarg)) if (atoi(optarg)<=0) output_warning("WARNING: envelope-update-freq must be positive. ignoring it..."); else envelope_update_freq_hz=atof(optarg); else output_warning("WARNING: not a number in --envelope-update-freq option. ignoring it..."); break; default: cout << "ERROR: invalid command line options. try the --help switch" << endl; exit(1); } } }