M-Audio Axiom 25 midi setup in Ardour 5


(zenseidk) #1

Hi all,
I purchased a used Axiom 25 and I’m struggling to get it working in Ardour.
It is recoqnized in dmsg, but QJackCtl does not see it unless I manually load a2jmidid -e from cmdline as described here http://manual.ardour.org/setting-up-your-system/setting-up-midi/midi-on-linux/
I start the project using ALSA (Jack2) as the midi system.
I set the General midi to enabled under Control Surfaces and choose the Axiom25 mapping.
When I ctrl-middle click the “operate knob now” is presented and I turn the knob. the “operate…” window disappears, but turning the knob does not change the volume position.

I was led to believe that it was just plug and play for USB devices?

Can someone please help me? :slight_smile:


(zenseidk) #2

All right, I have it working now.
I managed to get it going by closing Ardour and Jack, starting a2jmidid first, then starting Jack and the Ardour and then connecting General MIDI Control In to Axiom 2520: Axiom 25 MIDI 1 in the midi connection settings.


(Chris) #3

If you start a2jmidid and jackd is not already running you get these error messages:

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: a2j_jack_client_create: Cannot create jack client
ERROR: a2j_start: a2j_new() failed.

So either you still had a jackd running but did not know it, or your applications are starting jackd for you.
To make sure that jackd starts using the correct audio device and the sample rate you want you should start jackd first with the desired parameters, then start any jack aware applications.

It is possible that your system is starting jackdbus for you, so when you start a2jmidid run ps -e | grep jack and make sure what is getting autostarted for you in that case, either jackd or jackdbus.

Also note that there is no reason to use jack at all if you do not have other applications that you want to route audio and/or MIDI to or from. If you are only using Ardour then just start Ardour and select the ALSA backend instead of the JACK backend, Ardour will bridge the MIDI devices for you. It has essentially the same engine as jackd built in, but without the capability of routing to other applications.


(zenseidk) #4

Hi Chris.
Than you for replying. I will get back tomorrow, it is bedtime now.
I have managed to get silder, knob and piano working so far. But there is still way to go in understanding exactly how this is all stitched together.
I’ll do what you suggested and get back tomorrow.

Thank you for your time.


(zenseidk) #5

Okay, so…
If I only start Ardour, the midi controls don’t work.
If I start a2jmidid first without having Jack or Ardour open, I get this error message
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
ERROR: a2j_jack_client_create: Cannot create jack client
ERROR: a2j_start: a2j_new() failed.

That is understandable, since Jack is not running.

If I open Ardour and run ps -e | grep jack, I get:
1574 ? 00:00:00 jackd

With only Ardour open (and not QJackCtl) and running a2jmidid -e, I get:

Bridge starting…
Using JACK server ‘default’
Hardware ports will be exported.
Bridge started
Press ctrl-c to stop the bridge
port created: Midi Through [14] (capture): Midi Through Port-0
port created: Midi Through [14] (playback): Midi Through Port-0
ERROR: a2j_alsa_connect_from: can’t subscribe to 20:0 - Resource temporarily unavailable
port skipped: Axiom 25 [20] (capture): Axiom 25 MIDI 1
ERROR: a2j_port_create: snd_seq_connect_to() for 20:0 failed with error -11
port skipped: Axiom 25 [20] (playback): Axiom 25 MIDI 1
ERROR: a2j_alsa_connect_from: can’t subscribe to 20:1 - Resource temporarily unavailable
port skipped: Axiom 25 [20] (capture): Axiom 25 MIDI 2
ERROR: a2j_port_create: snd_seq_connect_to() for 20:1 failed with error -11
port skipped: Axiom 25 [20] (playback): Axiom 25 MIDI 2
ERROR: a2j_alsa_connect_from: can’t subscribe to 20:2 - Resource temporarily unavailable
port skipped: Axiom 25 [20] (capture): Axiom 25 MIDI 3

So, Ardour has already locked the Axiom25. However, it is not working unless I run it like

  1. Open QJackCtl
  2. run a2jmidid -e from terminal
  3. Open Ardour 5

(el-robo) #6

Qjackctl should have a post startup option where you could run a command so as to avoid doing it manually every time.
The order you describe seems to be consistent with what Chris described mentioned earlier. Jack had to be running for a2j to connect to it.


(zenseidk) #7

Hi,
I see an option to execute a startup script after startup, but can it be any type? (bash/python)


(Len) #8

Anything that can run on a command line… even just the name of a program. It is generally a good idea to include a & at the end of the line or of each line in a script file to make sure things are run in background and the script “finished” rather than waiting for a2jmidid to finish.


(zenseidk) #9

Hi,
I made a python script and it works if I run it in python, but not via QJackCtl.

Contents:
#!/usr/bin/python3
import subprocess
subprocess.call([‘a2jmidid’, ‘-e’])


(zenseidk) #10

And it’s set as Execute script after startup, under the Options fan.


(Len) #11

If that is your whole script, I would just put:
a2jmidid -e &
As the definition for the script in the qjackctl execute script after startup box.


(zenseidk) #12

I tried that but it does not work. No midi devices show up in the connection manager in jack…


(zenseidk) #13

All right, I got it working…

I didn’t put bash or python in the script lineEdit, just the script name…
So when I put “bash path/to/midi.sh” with contents of midi:
#!/bin/bash
a2jmidid -e &

as the script content, it now works.
Thanks a bunch for your help :slight_smile: