dagargo / overwitch

JACK client for Overbridge devices

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Pipewire and midi

zuglufttier opened this issue · comments

I recently installed pipewire and everything is working just fine with overwitch - except midi. Here's a screenshot from qpwgraph:
qpwgraph

The audio signals from Digitone and Syntakt are coming through just fine but it's impossible to send midi signals from my controller to one of the devices or from Digitone to Syntakt. I wanted to sync both devices via midi... If I connect Digitone and Syntakt via a standard midi cable everything is working as expected.

Am I overlooking something here? Do I need to configure some special midi stuff? I'm on Arch Linux and also tried to compile the newest version from git.

Ah, I think, it may have to do something with the fact that the Elektrons don't appear in the Midi-Bridge:
Untitled

I just connected some other midi gear (Behringer Deepmind here) and was able to successfully connect my midi controller to it. Is this a bug in overwitch or should I look at pipewire?

Ah, I think, it may have to do something with the fact that the Elektrons don't appear in the Midi-Bridge:

That's it. As Overwitch is a JACK plugin, audio and MIDI ports are showed in the JACK graph as ports in the devices. ALSA MIDI ports are exposed in the MIDI-Bridge (ALSA-MIDI bridge) but this is not the case. This is by design and it is not a bug.

As you've noticed, connect your clock (or other MIDI devices) to both MIDI in ports in your Elektron devices.

Let me know if everything works for you.

This is related to dagargo/elektroid#61.

We could expose MIDI ports as ALSA ports and JACK ports or let the user choose. But I'm not sure if this is needed.

Sadly, this does not work as expected. I connected MIDI out from Digitone to MIDI in from Syntakt (see the first screenshot) and nothing happens if I press play on the Digitone.

I also tried to connect my controller to MIDI in of either device and nothing happened.

Have you checked MIDI channels, transpose and MIDI clock options in your Syntakt?
You've probably done this already but I needed to be sure.

Yes, everything will work as expected if I disable overbridge mode in the Elektron boxes (USB set to audio/midi). The Elektrons will appear in the MIDI bridge as well.

Are you using the tag 1.0 or the master branch? If using the tag, could you try with the master? Both work well for me but...

If it still doesn't work, could you try running the Syntakt from the command line with overwitch-cli -vvv? We should see the incoming MIDI messages there.

I've checked all this and MIDI signals flow as expected. In this case a free running sequence in the MicroBrute is synchronized via MIDI clock. Digitakt transport restarts the sequence too.

Overwitch with Digitakt and MicroBrute

I forgot to mention that I'm using Debian Bullseye (stable), so no PipeWire yet.

I'm on the master branch and did as you said, only used the Digitone to make things less confusing:
Untitled

In this case, every time I press a key on my midi controller, this message appears:
ERROR:jclient.c:265:(jclient_j2o_midi): j2o: MIDI ring buffer overflow. Discarding data...

But it takes a few seconds before these error messages are generated, before and after that there are loads of these:

DEBUG:jclient.c:150:(jclient_o2j_midi): Event frames: 0
DEBUG:engine.c:384:(cb_xfr_midi_in): o2p MIDI: 0f, f8, 00, 00 (2332.708166)
DEBUG:jclient.c:150:(jclient_o2j_midi): Event frames: 0
DEBUG:engine.c:384:(cb_xfr_midi_in): o2p MIDI: 0f, f8, 00, 00 (2332.748157)
DEBUG:jclient.c:150:(jclient_o2j_midi): Event frames: 0
DEBUG:engine.c:384:(cb_xfr_midi_in): o2p MIDI: 0f, f8, 00, 00 (2332.787472)
DEBUG:jclient.c:150:(jclient_o2j_midi): Event frames: 0

I then can't exit the program via CTRL-C, I have to kill -9 the process.

Do the j2o: MIDI ring buffer overflow. Discarding data... errors disappear after a while? That could be the normal behavior if the MIDI events are queued before the device is in the running state.


These are not error messages but the MIDI clock events sent by your Digitone.

DEBUG:jclient.c:150:(jclient_o2j_midi): Event frames: 0
DEBUG:engine.c:384:(cb_xfr_midi_in): o2p MIDI: 0f, f8, 00, 00 (2332.708166)

When the Digitone is receiving MIDI data, you should see something like this.

DEBUG:engine.c:901:(
run_p2o_midi): Event frames: 82084.579317; diff: 0.000000

Overwitch with Digitakt and MicroBrute

I've successfully tried to send MIDI from my MicroBrute and I was able to control a track on my Digitakt. Perhaps, the issue is in PipeWire.

Do the j2o: MIDI ring buffer overflow. Discarding data... errors disappear after a while? That could be the normal behavior if the MIDI events are queued before the device is in the running state.

No, everything is going downhill after that :D

If I find the time, I might try to remove pipewire and try jack.

OK, I tested with jack2 and it worked. So the problem seems to be pipewire...

Running with pipewire does work until I start patching the in- and outputs of the devices.

I definitely should try PipeWire. It has happened before that there was a hidden error in the code that only showed up when running PipeWire.

Let's leave this open for now.

Maybe you can try to use a virtual machine just for that. Fedora now uses pipewire by default and I guess other distributions will follow sooner or later. Just googled: Ubuntu 22.10 is supposed to come with pipewire as well.

Let me know if I can help with debugging or testing!

Manjaro also uses PipeWire by default.

I've just tried PipeWire and MIDI connections can be made easily either with qpwgrapth or Ardour without the need to run a2jmidid.

Is this still an issue, @zuglufttier? Is this working for you, @szszoke?

I've just tried PipeWire and MIDI connections can be made easily either with qpwgrapth or Ardour without the need to run a2jmidid.

Is this still an issue, @zuglufttier? Is this working for you, @szszoke?

I'm not at home right now but I will try to take a look within some days.

Is this still an issue, @zuglufttier? Is this working for you, @szszoke?

Looking good over here! Just tried it Syntakt, Digitakt and Digitone at the same time:

grafik