a2jmidi bridge for jack does not start on pipewire

Desktop Environments and Multimedia
Post Reply
Message
Author
User avatar
Mixcoatl
Posts: 2
Joined: 2021-08-02 01:36
Contact:

a2jmidi bridge for jack does not start on pipewire

#1 Post by Mixcoatl »

I have a fresh intallation of Debian 11 (Testing), I I follow the instructions for install pipewire server for routing audio on the following link: https://wiki.debian.org/PipeWire

I usually use qjackctl to root midi and a2jmidid to start a midi bridge but now this one does not want to start.

Image

Image

Image

Image

Code: Select all

$ a2j_control --ehw && a2j_control --start
--- enable export of hardware ports
--- start
Traceback (most recent call last):
  File "/usr/bin/a2j_control", line 203, in <module>
    A2JControl()
  File "/usr/bin/a2j_control", line 199, in __init__
    self.call_controller_function()
  File "/usr/bin/a2j_control", line 166, in call_controller_function
    self.controller_start()
  File "/usr/bin/a2j_control", line 94, in controller_start
    self.controller_interface.start()
  File "/usr/lib/python3/dist-packages/dbus/proxies.py", line 72, in __call__
    return self._proxy_method(*args, **keywords)
  File "/usr/lib/python3/dist-packages/dbus/proxies.py", line 141, in __call__
    return self._connection.call_blocking(self._named_service,
  File "/usr/lib/python3/dist-packages/dbus/connection.py", line 652, in call_blocking
    reply_message = self.send_message_with_reply_and_block(
dbus.exceptions.DBusException: org.gna.home.a2jmidid.error.generic: a2j_start() failed.

Code: Select all

$ a2jmidid -e
JACK MIDI <-> ALSA sequencer MIDI bridge, version 9 built on Wed Dec 31 18:00:00 1969                                                        
Copyright 2006,2007 Dmitry S. Baikov                                                                                                         
Copyright 2007,2008,2009,2011,2012 Nedko Arnaudov

Bridge starting...
Using JACK server 'default'
Hardware ports will be exported.
ERROR: a2j_jack_client_create: Cannot create jack client
ERROR: a2j_start: a2j_new() failed.
Any help.

User avatar
sunrat
Global Moderator
Global Moderator
Posts: 3772
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 4 times
Been thanked: 15 times

Re: a2jmidi bridge for jack does not start on pipewire

#2 Post by sunrat »

I don't know what a2j_control is, never heard of it. Looks like it is failing though. What happens if you don't use it and just put in Execute Script after Startup in Qjackctl

Code: Select all

a2jmidid -e &
That's how I do it and it always works. Note it needs the "&" on the end to fork its process from the shell that runs it.
I'm guessing JACK wasn't started when you tried to start a2jmidid from terminal.
I'm going to avoid Pipewire for at least a couple of years, maybe it will be ready for audio production with JACK by then. In a recent post on Linux Musicians forum someone said they had it working for some things but other posts were not so positive.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

User avatar
sunrat
Global Moderator
Global Moderator
Posts: 3772
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 4 times
Been thanked: 15 times

Re: a2jmidi bridge for jack does not start on pipewire

#3 Post by sunrat »

Apparently Pipewire has its own ALSA > JACK bridge so a2jmidid is not needed. I posted about this at https://linuxmusicians.com/viewtopic.php?f=4&t=23342 which is an interesting discussion you should read.
In that wiki article you linked there is a clear statement:
As per Simon McVittie, the PipeWire package maintainer, "This is not a supported scenario for Debian 11, and is considered experimental."
It may break certain applications, lack certain functionality, or not work at all.
I'm actually confused as hell about Pipewire so far and not prepared to be an alpha tester when my current PA > JACK > ALSA setup is working well. I am interested in its development and may try it when it is no longer experimental.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

User avatar
Mixcoatl
Posts: 2
Joined: 2021-08-02 01:36
Contact:

Re: a2jmidi bridge for jack does not start on pipewire

#4 Post by Mixcoatl »

Thanks for reply.

I can see that having all the audio systems available, I can start Ardor/Mixbus connected to alsa and selecting "raw device" as the MIDI system, so I can then route midi hardware to midi tracks inside mixbus.

But I can see alsa in/outs and alsa midi in/outs on qjackctl

It seems then that a2jmidid is an essential piece to complete pipewire workflow I hope that soon we can count on it

Image
Image
Image
Image
Image
Image

User avatar
sunrat
Global Moderator
Global Moderator
Posts: 3772
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 4 times
Been thanked: 15 times

Re: a2jmidi bridge for jack does not start on pipewire

#5 Post by sunrat »

I don't quite understand the problem but then I never tried to use Pipewire. Considering its maintainer says it is experimental and not supported I wouldn't waste any time with it until it is supported.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

seeker5528
Posts: 9
Joined: 2021-09-18 00:37

Re: a2jmidi bridge for jack does not start on pipewire

#6 Post by seeker5528 »

If you did the steps to have pipewire control everything. You don't want to have other programs try to start jackd.

Unstable has pipewire 0.3.36 compared to the 0.2.something that Debian 11 has. There have been some significant improvements.

It's still early days though so some individual programs may still have issues with things that need to be improved or are not implemented yet.

I'm not really familiar with jack in general and no familiarity with the midi stuff. So maybe I am not understanding the full scenario. Is qjackctl not providing all the routing you need or is there something more than allowing routing between alsa and jack programs that a2jmidid does?

For me the pipewire wiki has been the best source for general information about pipewire https://gitlab.freedesktop.org/pipewire ... wikis/home
ArchWiki also has some good information https://wiki.archlinux.org/title/PipeWire different distribution so troubleshooting and configuration types of things don't always apply directly to Debian.

User avatar
sunrat
Global Moderator
Global Moderator
Posts: 3772
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 4 times
Been thanked: 15 times

Re: a2jmidi bridge for jack does not start on pipewire

#7 Post by sunrat »

You may get more help with Pipewire at Linux Musicians forum. A couple of people have installed it to experiment and have it working to some extent although a number of features from PA or JACK are still missing. Mostly it is considered not ready for primetime yet.
I don't think many forum members use JACK as it is for audio production and unnecessarily complicated for normal desktop use. Even less would be experimenting with Pipewire.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

arzgi
Posts: 852
Joined: 2008-02-21 17:03
Location: Finland
Been thanked: 6 times

Re: a2jmidi bridge for jack does not start on pipewire

#8 Post by arzgi »

seeker5528 wrote: 2021-09-18 07:36
Unstable has pipewire 0.3.36 compared to the 0.2.something that Debian 11 has.
Not true.

Code: Select all

$ aptitude search pipewire
p   gstreamer1.0-pipewire                                       - GStreamer 1.0 plugin for the PipeWire multimedia server              
i A libpipewire-0.3-0                                           - libraries for the PipeWire multimedia server                         
p   libpipewire-0.3-dev                                         - libraries for the PipeWire multimedia server - development           
i A libpipewire-0.3-modules                                     - libraries for the PipeWire multimedia server - modules               
i A pipewire                                                    - audio and video processing engine multimedia server                  
p   pipewire-audio-client-libraries                             - PipeWire multimedia server - audio client libraries                  
i A pipewire-bin                                                - PipeWire multimedia server - programs                                
i   pipewire-doc                                                - libraries for the PipeWire multimedia server - documentation         
p   pipewire-tests 
https://wiki.debian.org/PipeWire

seeker5528
Posts: 9
Joined: 2021-09-18 00:37

Re: a2jmidi bridge for jack does not start on pipewire

#9 Post by seeker5528 »

Thanks for the correction, I should have looked at packages.debian.org beforehand.

My project over the last couple of weeks has been to get my libvirt KVM running in the qemu:///session domain to work with the pipewire jack stuff. Seems to the the one way of doing KVM stuff that has the least amount of information on how to get audio to work.

For the OP's issue.....

From this thread... https://gitlab.freedesktop.org/pipewire ... issues/406 which has a link to https://github.com/jackaudio/a2jmidid/issues/11

It sounds to me like a2jmidid should work with pipewire if the necessary stuff is done for pipewire to be the handler off all the pulseaudio, alsa, and jack stuff, but using it with pipewire may be more limiting than not using it.

There is some other stuff that makes it seem like a2jmidid may be a problem application and individual user experience may vary.

There is an Ubuntu user that was using a2jmidid that says it is not needed with pipewire.
https://barrettcomputer.code.blog/2021/ ... 20-04/amp/

And they do have the box checked to start jack when the application starts, but that opens things up for weird things to happen if you try to start jackd when jack stuff is already being handled by pipewire. What difference it makes if you check the boxes for enable D-Bus and enable Jack D-Bus is another question.

[edit]Looks like there is no jack dbus support in pipewire yet, so that may be an issue for a2jmidid when running it in daemon mode?[/edit]

Post Reply