summaryrefslogtreecommitdiff
path: root/src/drumgizmo.cc
diff options
context:
space:
mode:
authordeva <deva>2009-02-20 17:22:14 +0000
committerdeva <deva>2009-02-20 17:22:14 +0000
commitfda7eaa26e0d796cac151275fc5b9bcb7b312c2b (patch)
tree7979c3678a08439218024c38cf04cc69d6dbbb10 /src/drumgizmo.cc
parent3a2fbb13a8571832fd8b7bd7b3e378b3f38814b2 (diff)
Incremented version number.
Diffstat (limited to 'src/drumgizmo.cc')
-rw-r--r--src/drumgizmo.cc23
1 files changed, 16 insertions, 7 deletions
diff --git a/src/drumgizmo.cc b/src/drumgizmo.cc
index 77b8433..cfc8ad5 100644
--- a/src/drumgizmo.cc
+++ b/src/drumgizmo.cc
@@ -46,10 +46,11 @@ static const char copyright_str[] =
static const char usage_str[] =
"Usage: %s [options] drumkitfile\n"
"Options:\n"
-" -p, --preload Load entire kit audio files into memory (uses ALOT of memory).\n"
-" -m, --midi midifile Load midifile, and play it.\n"
-" -v, --version Print version information and exit.\n"
-" -h, --help Print this message and exit.\n"
+" -p, --preload Load entire kit audio files into memory (uses ALOT of memory).\n"
+" -P, --preload_vel vel Load all files with velocity above vel into memory (uses a little less memory).\n"
+" -m, --midi midifile Load midifile, and play it.\n"
+" -v, --version Print version information and exit.\n"
+" -h, --help Print this message and exit.\n"
;
int main(int argc, char *argv[])
@@ -57,18 +58,21 @@ int main(int argc, char *argv[])
int c;
char *midifile = NULL;
- bool preload = false;
+ bool preload = true;
+ int min_velocity = 18;
int option_index = 0;
while(1) {
static struct option long_options[] = {
+ {"preload_vel", required_argument, 0, 'P'},
+ {"preload", no_argument, 0, 'p'},
{"midi", required_argument, 0, 'm'},
{"help", no_argument, 0, 'h'},
{"version", no_argument, 0, 'v'},
{0, 0, 0, 0}
};
- c = getopt_long (argc, argv, "hvpm:", long_options, &option_index);
+ c = getopt_long (argc, argv, "hvpP:m:", long_options, &option_index);
if (c == -1)
break;
@@ -82,6 +86,11 @@ int main(int argc, char *argv[])
preload = true;
break;
+ case 'P':
+ preload = true;
+ min_velocity = atoi(optarg);
+ break;
+
case '?':
case 'h':
printf(version_str);
@@ -114,7 +123,7 @@ int main(int argc, char *argv[])
printf("Using kitfile: %s\n", kitfile.c_str());
- DrumKitParser parser(kitfile, preload);
+ DrumKitParser parser(kitfile, preload, min_velocity);
if(parser.parse()) return 1;
JackClient client(parser.getDrumkit());