[go: nahoru, domu]

Skip to content

Commit

Permalink
README update and command line arg and usage tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
jimm committed Aug 20, 2021
1 parent 2e0a811 commit 59bed97
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 13 deletions.
23 changes: 12 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,29 +14,30 @@ install it via `brew install portmidi`.
To compile the code, run `make`. To compile and run the tests, run `make
test`.

To install `kronut` system-wide, run `make install`. By default the
executable is installed to `/usr/local/bin` but you can override that with
the `prefix`, `exec_prefix`, or `bindir` variables. For example, `make
prefix=/tmp install` would install `kronut` at `/tmp/bin/kronut`.

# Running Kronut

```
$ ./kronut save my_set_list.org
$ ./kronut save 2 my_set_list.org
$ # ...edit that file...
$ ./kronut load my_set_list.org
$ ./kronut load 2 my_set_list.org
```

Run `./kronut --help` to see all of the command line options.
Run `./kronut help` to see all of the command line options.

Kronut tries to auto-detect the Kronos' MIDI input and output ports, but if
it can't find them you can specify them on the command line. To list all of
the available input and output ports, run `./kronut --list`.
the available input and output ports, run `./kronut list`.

## Set List Saving and Loading

Kronut's save command works by reading the current set list from the Kronos
and writing it to a file (or to stdout). The load command reads from a file
(or stdout) and sends that to the current set list on the Kronos. Note that
it doesn't save the set list. You'll have to do that on the Kronos.

By default, `kronut` loads and saves the current set list but there's a
command line option that lets you specify which set list to save or load.
Kronut's save command works by reading a set list from the Kronos and
writing it to a file (or to stdout). The load command reads from a file (or
stdout) and saves it to the set list you specify.

Files are written in either the [Markdown](https://www.markdownguide.org/)
or [Org Mode](https://orgmode.org/) format. The default is Org Mode. To use
Expand Down
5 changes: 3 additions & 2 deletions src/kronut.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ void usage(const char *prog_name) {
<< endl
<< " -c, --channel N Kronos general MIDI channel (1-16, default 1)" << endl
<< " -f, --format FMT Format: \"o\" (Org Mode, default) or \"m\" (Markdown)" << endl
<< " -h, --help This help" << endl
<< " -i, --input N Input number (default: attempts to find it automatically)" << endl
<< " -o, --output N Output number (default: attempts to find it automatically)" << endl
<< endl
Expand All @@ -73,7 +72,9 @@ void usage(const char *prog_name) {
<< " Remember: kronut does not save the set list; you" << endl
<< " must do that yourself on the Kronos." << endl
<< endl
<< " save N FILE Saves set list N into a file." << endl;
<< " save N FILE Saves set list N into a file." << endl
<< endl
<< " help This help." << endl;
}

void parse_command_line(int argc, char * const *argv, struct opts &opts) {
Expand Down

0 comments on commit 59bed97

Please sign in to comment.