shithub: orca

Download patch

ref: cd47fcc4f1ee3a9555989a38235ad30831fd8057
parent: af8178e8f65b48bf5065175e16d12ef1c3bfe962
author: cancel <cancel@cancel.fm>
date: Sat Jan 4 23:48:47 EST 2020

Change references to name 'PortMIDI' to 'PortMidi'

This is the official project capitalization.

--- a/README.md
+++ b/README.md
@@ -27,7 +27,7 @@
 
 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 @@
 
 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 @@
 ./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 @@
 
 ```
     --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
 ```
 
--- a/tool
+++ b/tool
@@ -32,7 +32,7 @@
     -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 @@
           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 @@
         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
--- a/tui_main.c
+++ b/tui_main.c
@@ -62,13 +62,13 @@
 #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 @@
                                     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 @@
   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 @@
         ++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 @@
       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