You are here

Support for aj2midid in QjackCtl

Hi Rui

Is there a possibility to add support for aj2midid in QjackCtl? It's a neat little command line tool for showing up hardware-midi-keyboards as jack-midi connections.

I tried putting 'a2jmidid -e' as a command to start after jackd in QjackCtl's set-up optionsl but QjackCtl hangs as the a2jmidid thread stays open until it receives a control-c to stop the bridge.

Perhaps you have a better idea.

Best regards, Simon

Forums: 
rncbc's picture

missing a trailing ampersand ?

a2jmidid -e &

you need it, if you reaaly want to run the program in the background, otherwise qjackctl will just hang waiting for it to finish.

cheers

Simon Lewis's picture

Hi Rui

The ampersand trick is perfect.

A need a second trick to stop the a2jmidid bridge when I hit stop on QjackCtl's control panel - any Ideas?

Best regards, Simon

rncbc's picture

hth

Hello Simon, Rui, I'd love to do this, but I have no expertise in programming, how difficult would it be to make this modifications? Or could you send me a copy of the code I need to modify? If it's not much trouble for you of course.

thanks very much

rncbc's picture

@maghoxfr

What exactly would you like to do?

Simon asked to run `a2jmidid &` as a post-startup script and I suggested `killall a2jmidid` as a pre-shutdown script. These are options under Setup.../Options/Scripting, while on QjackCtl configuration. What you'd like to do more?

Seeya

Thank you, that's exactly what I wanted to do. It was to connect my midi keyboard to yoshimi, now I can do that. I know it must be annoying having guys like me asking stupid questions.

Thanks for your help and for all your software, I'm a huge fan and base my linux-music-production on them. Qjackctl, Qtractor and Qsynth are the ones I open as soon as I turn on the pc.

09:26:26.620 Statistics reset.
09:26:26.644 ALSA connection change.
09:26:26.652 D-BUS: Service is available (org.jackaudio.service aka jackdbus).
09:26:26.666 Startup script...
09:26:26.667 a2jmidid -e &
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
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
09:26:26.799 ALSA connection graph change.
Directory "/home/dirk/.log/a2j" does not exist. Creating...
Directory "/home/dirk/.config/a2j" does not exist. Creating...
JACK MIDI <-> ALSA sequencer MIDI bridge, version 9 built on Wed Dec 31 16: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.
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
[31mERROR: [0ma2j_jack_client_create: Cannot create jack client
[31mERROR: [0ma2j_start: a2j_new() failed.
09:26:27.068 Startup script terminated successfully.
09:26:27.153 D-BUS: JACK server could not be started. Sorry
09:26:27.359 ALSA active patchbay scan...
Tue Jul 21 09:26:27 2020: Starting jack server...
Tue Jul 21 09:26:27 2020: JACK server starting in realtime mode with priority 10
Tue Jul 21 09:26:27 2020: self-connect-mode is "Don't restrict self connect requests"
Tue Jul 21 09:26:27 2020: ERROR: Cannot lock down 82280346 byte memory area (Cannot allocate memory)
Tue Jul 21 09:26:27 2020: Acquired audio card Audio1
Tue Jul 21 09:26:27 2020: creating alsa driver ... hw:USB|hw:USB|1024|2|44100|4|4|hwmon|hwmeter|-|32bit
Tue Jul 21 09:26:27 2020: configuring for 44100Hz, period = 1024 frames (23.2 ms), buffer = 2 periods
Tue Jul 21 09:26:27 2020: ALSA: final selected sample format for capture: 32bit integer little-endian
Tue Jul 21 09:26:27 2020: ERROR: ALSA: cannot set channel count to 4 for capture
Tue Jul 21 09:26:27 2020: ERROR: ALSA: cannot configure capture channel
Tue Jul 21 09:26:27 2020: Released audio card Audio1
Tue Jul 21 09:26:27 2020: ERROR: Cannot initialize driver
Tue Jul 21 09:26:27 2020: ERROR: JackServer::Open failed with -1
Tue Jul 21 09:26:27 2020: ERROR: Failed to open server
Tue Jul 21 09:26:28 2020: Saving settings to "/home/dirk/.config/jack/conf.xml" ...
09:26:29.368 Could not connect to JACK server as client. - Overall operation failed. - Unable to connect to server. Please check the messages window for more info.
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

rncbc's picture

hi, Dirk Ouellette,

a2jmidid should get started *after* the jack-server is up and running, hence it can only be set on "Execute script after Startup" (and not before).

cheers

Add new comment