aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHanspeter Portner <dev@open-music-kontrollers.ch>2020-02-12 19:18:05 +0100
committerHanspeter Portner <dev@open-music-kontrollers.ch>2020-02-12 19:18:05 +0100
commita7a53fbe956afd7808e67b5501b12686c71bb07b (patch)
treef1f890c3f8eaa037e72dd87641e0024f3c55623f
parentb18a15a90964f40acfba676b783b4623ac472545 (diff)
downloadsherlock.lv2-a7a53fbe956afd7808e67b5501b12686c71bb07b.tar.xz
midi: report decimal note/controller numbers.HEADmaster
-rw-r--r--VERSION2
-rw-r--r--midi_inspector_nk.c14
2 files changed, 9 insertions, 7 deletions
diff --git a/VERSION b/VERSION
index 16eb94e..e756a90 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-0.21.3
+0.21.5
diff --git a/midi_inspector_nk.c b/midi_inspector_nk.c
index f540d5e..830fbf6 100644
--- a/midi_inspector_nk.c
+++ b/midi_inspector_nk.c
@@ -322,13 +322,14 @@ _midi_inspector_expose(struct nk_context *ctx, struct nk_rect wbounds, void *dat
case LV2_MIDI_MSG_NOTE_PRESSURE:
{
nk_layout_row_push(ctx, 0.1);
- nk_labelf_colored(ctx, NK_TEXT_RIGHT, cwhite, "Ch:%02"PRIu8,
+ nk_labelf_colored(ctx, NK_TEXT_RIGHT, cwhite, "Ch:%2"PRIu8,
(msg[0] & 0x0f) + 1);
nk_layout_row_push(ctx, 0.2);
int8_t octave;
const char *key = _note(msg[1], &octave);
- nk_labelf_colored(ctx, NK_TEXT_RIGHT, cwhite, "%s%+"PRIi8, key, octave);
+ nk_labelf_colored(ctx, NK_TEXT_RIGHT, cwhite, "%s%+"PRIi8"=%3"PRIu8,
+ key, octave, msg[1]);
nk_layout_row_push(ctx, 0.1);
nk_labelf_colored(ctx, NK_TEXT_RIGHT, cwhite, "%"PRIu8, msg[2]);
@@ -336,7 +337,7 @@ _midi_inspector_expose(struct nk_context *ctx, struct nk_rect wbounds, void *dat
case LV2_MIDI_MSG_CONTROLLER:
{
nk_layout_row_push(ctx, 0.1);
- nk_labelf_colored(ctx, NK_TEXT_RIGHT, cwhite, "Ch:%02"PRIu8,
+ nk_labelf_colored(ctx, NK_TEXT_RIGHT, cwhite, "Ch:%2"PRIu8,
(msg[0] & 0x0f) + 1);
const midi_msg_t *controller_msg = _search_controller(msg[1]);
@@ -344,7 +345,8 @@ _midi_inspector_expose(struct nk_context *ctx, struct nk_rect wbounds, void *dat
? controller_msg->key
: "Unknown";
nk_layout_row_push(ctx, 0.2);
- nk_label_colored(ctx, controller_str, NK_TEXT_RIGHT, cwhite);
+ nk_labelf_colored(ctx, NK_TEXT_RIGHT, cwhite, "%s=%3"PRIu8"",
+ controller_str, msg[1]);
nk_layout_row_push(ctx, 0.1);
nk_labelf_colored(ctx, NK_TEXT_RIGHT, cwhite, "%"PRIu8, msg[2]);
@@ -354,7 +356,7 @@ _midi_inspector_expose(struct nk_context *ctx, struct nk_rect wbounds, void *dat
case LV2_MIDI_MSG_CHANNEL_PRESSURE:
{
nk_layout_row_push(ctx, 0.1);
- nk_labelf_colored(ctx, NK_TEXT_RIGHT, cwhite, "Ch:%02"PRIu8,
+ nk_labelf_colored(ctx, NK_TEXT_RIGHT, cwhite, "Ch:%2"PRIu8,
(msg[0] & 0x0f) + 1);
nk_layout_row_push(ctx, 0.2);
@@ -368,7 +370,7 @@ _midi_inspector_expose(struct nk_context *ctx, struct nk_rect wbounds, void *dat
const int16_t bender = (((int16_t)msg[2] << 7) | msg[1]) - 0x2000;
nk_layout_row_push(ctx, 0.1);
- nk_labelf_colored(ctx, NK_TEXT_RIGHT, cwhite, "Ch:%02"PRIu8,
+ nk_labelf_colored(ctx, NK_TEXT_RIGHT, cwhite, "Ch:%2"PRIu8,
(msg[0] & 0x0f) + 1);
nk_layout_row_push(ctx, 0.2);