/*
Copyright (C) 2010-2012 Florian Jung
This file is part of flo's FM synth.
flo's FM synth is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
flo's FM synth is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with flo's FM synth. If not, see .
*/
#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);
}
}
}