Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add input and output MIDI ports for the Overbridge message protocol #44

Open
dagargo opened this issue Dec 7, 2022 · 0 comments
Open
Assignees

Comments

@dagargo
Copy link
Owner

dagargo commented Dec 7, 2022

Perhaps it's useful for other people have access to what it looks like the internal Overbridge message protocol.

Audio and MIDI are already available thru their respective ports. What we are talking about here is the data needed to synchronize the Overbridge plugins with the devices such as knob position or active step.

The unknown bytes in the USB blocks can be easily arranged in blocks of 128 bytes. Here you see 2 consecutive blocks from my Digitakt while being stopped.

e0 00 23 aa e9 00 00 00  00 00 00 00 00 00 00 00
00 00 00 00 00 00 32 00  00 32 00 00 32 00 00 32
00 00 32 00 00 32 00 00  32 00 00 32 00 00 32 00
00 32 00 00 32 00 00 32  00 00 32 00 00 32 00 00
32 00 00 32 00 00 00 00  00 00 00 00 00 00 00 ef
00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00 

e0 00 23 aa ea 00 00 00  00 00 00 00 00 00 00 00
00 00 00 00 00 01 00 00  00 00 00 00 00 00 00 32
00 00 32 00 00 32 00 00  32 00 00 32 00 00 32 00
00 32 00 00 32 00 00 32  00 00 32 00 00 32 00 00
32 00 00 32 00 00 00 00  00 00 00 00 00 00 00 ef
00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00 

Looks like there is an e0 xx yy zz tt header, where xx yy zz tt is a 4 bytes counter.

Data is only 80 bytes long (ending with a ef) and the last 48 bytes are zeros.

You can print these values with this patch.

$ git diff
diff --git a/src/engine.c b/src/engine.c
index e972c71..c3a2c60 100644
--- a/src/engine.c
+++ b/src/engine.c
@@ -206,6 +206,10 @@ ow_engine_read_usb_input_blocks (struct ow_engine *engine)
        {
          error_print ("o2p: Unexpected block header\n");
        }
+      for (int w = 0; w < OB_PADDING_LEN; w++) {
+              printf("%02x ", blk->padding[w]);
+      }
+      printf("\n");
       s = blk->data;
       for (int j = 0; j < OB_FRAMES_PER_BLOCK; j++)
        {

It's not sure if this would be implemented as we need to know what's really going on under. But we can create a branch.

These two blocks are with the Digitakt playing.

e0 00 60 f7 c8 19 73 00  00 00 00 00 00 00 00 43
78 00 00 00 00 01 00 00  00 00 00 00 00 00 00 4f
00 00 4f 00 00 4f 00 00  4f 00 00 4f 00 00 4f 00
00 4f 00 00 4f 00 00 4f  00 00 4f 00 00 4f 00 00
4f 00 00 4f 00 00 00 d4  00 00 00 00 00 00 00 ef
00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00

e0 00 60 f7 c9 19 82 00  00 00 00 00 00 00 00 43
9f 00 00 00 00 00 50 00  00 50 00 00 50 00 00 50
00 00 50 00 00 50 00 00  50 00 00 50 00 00 50 00
00 50 00 00 50 00 00 50  00 00 50 00 00 50 00 00
50 00 00 50 00 00 00 d2  00 00 00 00 00 00 00 ef
00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
@dagargo dagargo self-assigned this Dec 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant