Browse Source

Change references to name 'PortMIDI' to 'PortMidi'

This is the official project capitalization.
master
cancel 5 years ago
parent
commit
cd47fcc4f1
  1. 10
      README.md
  2. 6
      tool
  3. 12
      tui_main.c

10
README.md

@ -27,7 +27,7 @@ Core library: A C99 compiler (no VLAs required), plus enough libc for `malloc`,
Command-line interpreter: The above, plus POSIX, and enough libc for the common string operations (`strlen`, `strcmp`, etc.)
Livecoding terminal UI: The above, plus ncurses (or compatible curses library), and floating point support (for timing.) Optionally, PortMIDI can be used to enable direct MIDI output.
Livecoding terminal UI: The above, plus ncurses (or compatible curses library), and floating point support (for timing.) Optionally, PortMidi can be used to enable direct MIDI output.
## Build
@ -37,7 +37,7 @@ Currently known to build on macOS (`gcc`, `clang`) and Linux (`gcc`, `musl-gcc`,
There is a fire-and-forget `make` wrapper around the build script.
PortMIDI is an optional dependency. It can be enabled by adding the option `--portmidi` when running the `tool` build script.
PortMidi is an optional dependency. It can be enabled by adding the option `--portmidi` when running the `tool` build script.
Mouse awareness can be disabled by adding the `--no-mouse` option.
@ -49,7 +49,7 @@ Run `./tool help` to see usage info. Examples:
./tool build -c clang-7 --portmidi orca
# Build the livecoding environment with a compiler
# named clang-7, with optimizations enabled, and
# with PortMIDI enabled for MIDI output.
# with PortMidi enabled for MIDI output.
# Binary placed at build/orca
./tool build -d orca
@ -118,13 +118,13 @@ Additional options are available if `orca` is built with `--portmidi`:
```
--portmidi-list-devices
List the MIDI output devices available through PortMIDI,
List the MIDI output devices available through PortMidi,
along with each associated device ID number, and then exit.
Do this to figure out which ID to use with
--portmidi-output-device
--portmidi-output-device <number>
Set MIDI to be sent via PortMIDI on a specified device ID.
Set MIDI to be sent via PortMidi on a specified device ID.
Example: 1
```

6
tool

@ -32,7 +32,7 @@ Options:
-h or --help Print this message and exit.
Optional Features:
--portmidi Enable or disable hardware MIDI output support with
--no-portmidi PortMIDI. Note: PortMIDI has memory leaks and bugs.
--no-portmidi PortMidi. Note: PortMidi has memory leaks and bugs.
Default: disabled.
--mouse Enable or disable mouse features in the livecoding
--no-mouse environment.
@ -336,7 +336,7 @@ build_target() {
if [[ $portmidi_enabled = 1 ]]; then
local portmidi_dir="$brew_prefix/opt/portmidi"
if ! [[ -d "$portmidi_dir" ]]; then
echo "Error: PortMIDI directory not found at $portmidi_dir" >&2
echo "Error: PortMidi directory not found at $portmidi_dir" >&2
echo "Install with: brew install portmidi" >&2
exit 1
fi
@ -355,7 +355,7 @@ build_target() {
add libraries -lportmidi
add cc_flags -DFEAT_PORTMIDI
if [[ $config_mode = debug ]]; then
echo -e "Warning: The PortMIDI library contains code that may trigger address sanitizer in debug builds.\\nThese are not bugs in orca." >&2
echo -e "Warning: The PortMidi library contains code that may trigger address sanitizer in debug builds.\\nThese are not bugs in orca." >&2
fi
fi
if [[ $mouse_disabled = 1 ]]; then

12
tui_main.c

@ -62,13 +62,13 @@ static void usage(void) {
#ifdef FEAT_PORTMIDI
"\n"
" --portmidi-list-devices\n"
" List the MIDI output devices available through PortMIDI,\n"
" List the MIDI output devices available through PortMidi,\n"
" along with each associated device ID number, and then exit.\n"
" Do this to figure out which ID to use with\n"
" --portmidi-output-device\n"
"\n"
" --portmidi-output-device <number>\n"
" Set MIDI to be sent via PortMIDI on a specified device ID.\n"
" Set MIDI to be sent via PortMidi on a specified device ID.\n"
" Example: 1\n"
#endif
);
@ -1089,7 +1089,7 @@ void send_output_events(Oosc_dev* oosc_dev, Midi_mode const* midi_mode, Usz bpm,
Pm_Message(istatus, inote, ivel));
// todo bad
if (pme) {
fprintf(stderr, "PortMIDI error: %s\n", Pm_GetErrorText(pme));
fprintf(stderr, "PortMidi error: %s\n", Pm_GetErrorText(pme));
}
} break;
#endif
@ -1913,7 +1913,7 @@ void push_main_menu(void) {
qmenu_add_choice(qm, "Auto-fit Grid", Main_menu_autofit_grid);
qmenu_add_spacer(qm);
#ifdef FEAT_PORTMIDI
qmenu_add_choice(qm, "PortMIDI Output", Main_menu_choose_portmidi_output);
qmenu_add_choice(qm, "PortMidi Output", Main_menu_choose_portmidi_output);
qmenu_add_spacer(qm);
#endif
qmenu_add_choice(qm, "Controls...", Main_menu_controls);
@ -2491,7 +2491,7 @@ int main(int argc, char** argv) {
++output_devices;
}
if (output_devices == 0) {
printf("No PortMIDI output devices detected.\n");
printf("No PortMidi output devices detected.\n");
}
Pm_Terminate();
exit(0);
@ -2508,7 +2508,7 @@ int main(int argc, char** argv) {
midi_mode_deinit(&midi_mode);
PmError pme = midi_mode_init_portmidi(&midi_mode, dev_id);
if (pme) {
fprintf(stderr, "PortMIDI error: %s\n", Pm_GetErrorText(pme));
fprintf(stderr, "PortMidi error: %s\n", Pm_GetErrorText(pme));
exit(1);
}
// todo a bunch of places where we don't terminate pm on exit. Guess we

Loading…
Cancel
Save