Overwitch, a JACK client for Overbridge devices, AKA Overbridge for Linux

@Bignill thx for the advice :wave:

1 Like

Has anyone got this working on a steam deck (Arch-based)? I’d love to use this to add extra outs to my DTII. I’m pretty unfamiliar with linux, so if anyone could help point me in the right direction for what dependencies I’d need, that would be extremely helpful.

Hello,
I read in some comments(I cannot find the place where this comment was) that for the mk1 devices such as the A4 the pit is needet to make the .jason file. I have an A4 is the pid the number in Hex when i type in lsusb with the connectet device. I could not find the ~/.config/overwitch/devices.ddirectory, Do I have to rewrite the devices.json in the /res/ directory?
And is the type 2?
I am a noob in linux but want t help this interresting projekt.
Regards

I think you can install the needed dependencies with this.

sudo pacman -S base-devel autoconf libtool gtk4 libsndfile gettext libsamplerate json-glib libusb jack

Let us know if this is enough so I can add this to the docs.

I think this is the comment you’re talking about.

As I said there some days ago, support for MKI devices might be working now.

For everyone wanting to test this, I suggest to comment there as information will be more centralized.

Regarding your questions, notice that the file extension must be json and not jason. Very likely it was just a typo but wanted to discard it.

Also, you’ll need to create the ~/.config/overwitch/devices.d directory and put your file in there. This is a new way to add devices and it’s the preferred way to define MKI machines as they will be self contained. Nothing else should be needed for Overwitch to detect your device.

1 Like

@DG2 Can OW handle two pieces of the same? F.ex. two DN or will their usb id be identical resulting in a conflict? If so, is there any way to “spoof” the id?

Overwitch can handle many devices of the same type. It works the same way as Overbridge.

Overbridge allows the user to have a custom name, which is displayed on the Overwitch GUI.

It’s also possible to rename them from Overwitch by clicking on the name in the table.

2 Likes

Thank you for the prompt answer!
Overwitch is such a great utility.

1 Like

I was able to get this up and running, though it took a lot of trial and error and a little help from Grok :sweat_smile:.

Ultimately, it was easiest to install everything in a distrobox environment. From my understanding, Steam Deck pins itself to a few older versions of various dependencies to improve stability, so using a separate distrobox environment allowed me to install everything I needed.

For anyone not familiar with Linux, I also installed QjackCtl to allow me to patch all the tracks from my DTII to my audio interface. I didn’t realize that was a separate software I needed to install right away but it seems pretty standard for Jack clients and is relatively straightforward.

One question I have for the group is if it’s possible to take over the DTII’s Main outs and/or Headphone jacks. I would love to be able to route my drum tracks to one set of inputs and my melody tracks to another. I can do this with an audio interface, but that means an extra piece of kit to lug to the gig. Between the steam deck and the DTII I have 6 stereo outputs (DT Headphones, DT Main Outs, and Steam Deck Headphones). If I could use some combination of these to achieve the separate drum and melody busses that would be amazing.

I tried patching my melody tracks to the steam deck headphone out and muting them on from the main outs using the Audio Routing menu inside the DTII, but theirs a noticeable latency difference between the tracks coming from the DT and those in sent to the steam deck. I feel like there are two approaches I can take here:

  • Monitor the overwitch tracks through the DTII. I’m not sure how to set that up in QjackCtl / the DT II Audio settings though.
  • Or, get the latency low enough from Overwitch that it’s not so noticeable. I haven’t attempted any of the optimizations in the Github yet, but I’m curious if people here think those will be enough to acheive my goal.

If anyone here thinks one approach would be better than the other, let me know!

2 Likes

A few things to comment there.

First of all, thanks for reporting that Overwitch works on Steam Deck. :heart:

The main reason for the difficulties to install Overwitch are because it tries to cover as many use cases as possible.

  • Typical desktop audio user, with a small GUI and ready to to be connected to their preferred applications.
  • Embedded user, with a systemd service.
  • Development user with CLI utils, mainly used for testing purposes but useful nonetheless.

(Notice that all 3 scenarios are mutually exclusive during run time. Also, the GUI and the systemd service share the same code and configuration files.)

On top of this, the USB rules need to be updated from time to time and the transitions from JACK/PulseAudio to PipweWire and GTK3 to GTK4 have caught us in the middle. But from now on, this should not change much. For instance. on Debian testing, PipeWire 1.2.7 is really stable and its ecosystem is nice. This includes their own patching utility, Helvum.

Of course, when trying to install anything on not-up-to-date platforms, dependencies issues appear and some tweaks are needed.

In case you want to add a specific note to the Installation instructions feel free to open a PR. And if anyone has suggestions on how to improve the docs, let’s discuss it too.


Regarding the connections, there is always gonna be some latency when comparing the direct DTII output and the signal going thru Overwitch and patched to the Steam Deck output.

You haven’t said what JACK buffer length you are using. I’d suggest to try setting PipeWire to use a 256 buffer and using 8 blocks in Overwitch, which would lead to less than 10 ms without much effort.

Not great but if you want to go below 5 ms, try the recomendations you saw in the docs.

(Note that these latencies do not consider the time to playback the audio.)

If the difference in latency is crucial, try routing all audio tracks from the computer.

Thanks for the response! I will try go back and isolate the steps that worked and submit a pr on docs for steam deck installation.

I was able to get a workable solution with the following settings:

  • Route my Melody & Effects tracks to the steam deck headphone port
  • Route the drum tracks to the Main In L and R from Overwitch
  • In the DTII Audio Routing settings set Int to Main to OFF and turn up the USB to Main to +18db.

With that I was able to make sure that everything is delayed by the same amount. I’m still working through a few bugs in the overall setup up, but I think those are mostly around setting up the steam deck so that there are no hiccups when setting all of this up at the gig.

Hi everyone,
I am trying to make the overbridge working with Digitone II (latest firmware) and Kubuntu 24.04 and pipewire, without success.
I have compiled overwitch, and created a new device in the “devices.json” file (device #2868).
When I run Overwitch I get the following message :

Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
ERROR:engine.c:751:ow_engine_init_from_bus_address: Error while opening device: LIBUSB_ERROR_ACCESS
ERROR:jclient.c:316:jclient_init: Overwitch error: can’t find a matching device

and when I run “Overwitch-service”, it gives me the following error message:

DEBUG:overwitch.c:663:ow_get_device_desc_from_vid_pid: Searching device in /home/emmanuel/.config/overwitch/de
vices.json
DEBUG:overwitch.c:486:ow_get_device_desc_from_vid_pid_file: Device with PID 2868 found
DEBUG:overwitch.c:367:ow_get_usb_device_list: Found Digitone 2 (bus 001, address 003, ID 1935:0b34)
DEBUG:overwitch.c:663:ow_get_device_desc_from_vid_pid: Searching device in /home/emmanuel/.config/overwitch/de
vices.json
DEBUG:overwitch.c:486:ow_get_device_desc_from_vid_pid_file: Device with PID 2868 found
ERROR:engine.c:751:ow_engine_init_from_bus_address: Error while opening device: LIBUSB_ERROR_ACCESS
ERROR:jclient.c:316:jclient_init: Overwitch error: can’t find a matching device
DEBUG:engine.c:1231:ow_hotplug_loop: Registering USB hotplug callback…

The device is found but… Of course I do not see any new connection in qpwgraph.

I do not know what to do now. Any recommendation? What did I miss?

Thanks in advance for your help.

Let’s focus on making overwitch-cli to work.

This error below means that there is a permission issue.

Every new USB device must be registered in the system in order to work. To do this, add your device in udev/91-usb-elektron.hwdb, run sudo make install from the udev directory and run elektroid-cli -n $ID, where $ID is the number for your device that elektroid-cli -l shows.

We’ll try to solve the JACK error later.

BTW, what configuration have you created for the Digitone II? It should be the same as the Digitakt II one with the new ID you mentioned.

Did that fixed the LIBUSB_ERROR_ACCESS error?

Thank you so much !

Now, when I run overwitch-service I get the following:

DEBUG:overwitch.c:663:ow_get_device_desc_from_vid_pid: Searching device in /home/emmanuel/.config/overwitch/de
vices.json
DEBUG:overwitch.c:433:ow_get_device_desc_from_vid_pid_file: /home/emmanuel/.config/overwitch/devices.json:819:
3: Parse error: unexpected character }', expected character ,’
DEBUG:overwitch.c:673:ow_get_device_desc_from_vid_pid: Searching device in /usr/local/share/overwitch/devices.
json…
DEBUG:engine.c:1231:ow_hotplug_loop: Registering USB hotplug callback…

And after running overwitch

Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock

The configuration is the same as the Digitakt II.

Thanks again.

You’re welcome!

Great! Theoretically, that should do it.

But there’s a syntax error in your devices.json file as indicated here.

You’ll need to fix that.

Please, do not run overwitch-service for now and let’s focus on overwitch-cli -vv -n $ID to better detect your issues.

(Sorry! I forgot to mention using the -vv option with overwitch-cli before. The service is not meant to have configurable verbosity and runs with a minimal level by default, which is right for a service. By the way, overwitch, overwitch-service, and overwitch-cli are different programs that cover different use cases but all are mutually exclusive as only a single process can open a USB device.)

Regarding these lines, this is a JACK related error. Actually, the JACK server is not running and could not be started and this is a requirement.

it definitely has something to do with your system. Did you install JACK?
I can’t help you with this but I’d recommend you to upgrade your Ubuntu installation and use PipeWire, which is what every distribution is using now by default.

I have fixed the parsing error. Now I need to check what happens with Jack.
I have installed the latest Kubuntu LTS, which comes with Pipewire. I was expecting not to use jack anymore when I upgraded to Pipewire ;-).

overwitch-cli -vv -n 2868

DEBUG:overwitch.c:663:ow_get_device_desc_from_vid_pid: Searching device in /home/emmanuel/.config/overwitch/devices.json
DEBUG:overwitch.c:486:ow_get_device_desc_from_vid_pid_file: Device with PID 2868 found
DEBUG:overwitch.c:367:ow_get_usb_device_list: Found Digitone II (bus 001, address 007, ID 1935:0b34)

1 Like

The number you need to use with -n is the identifier Overwitch assignes to a particular USB device. Keep in mind that a USB product ID will be used by every device of the same kind!

This is the way to get the Overwitch ID (first number before the colon).

$ overwitch-cli -l
0: Digitakt (ID 1935:000c) at bus 001, address 005

$ overwitch-cli -vv -n 0

Is it working now? I guess you’d still get the JACK error.