Ardour MIDI Problems

For the last few years I’ve been using QJackCtl to configure and start jackd, and to start a2jmidid -e. Then I could start Ardour, and audio and midi worked as expected.

I moved a couple of months ago and finally have some time to sit down and start working on music again, but unfortunately my old process no longer works! Ardour is extremely slow to start when jackd is already running, and then it throws an error saying “Cannot connect to audio/midi engine”.

I saw the thread here [ https://community.ardour.org/node/15352 ] where Paul recommends avoiding QJackCtl altogether, and starting Jack and the ALSA back-end via Ardour. He says: “Just use the ALSA audio/MIDI backend for Ardour and your MIDI devices will all show up without any further work on your part.”

Unfortunately, this is not the case for me.

No MIDI devices appear in Ardour unless I manually run a2jmidid -e in a terminal window, and rescan the MIDI connections in Ardour. This makes the devices show up, but I still can’t create any connections.

Ardour 5.12
Fedora 27
MOTU 828MKII (FFADO)

Any thoughts on how I can either make my old process work again, or get Ardour to automatically recognize my midi devices? Thanks!

What I recommended in that post is NOT using JACK at all. Just use Ardour’s own ALSA backend which will find all the MIDI devices and things should just work. Obviously if you actually use JACK to route audio+MIDI between Ardour and other JACK applications, that doesn’t work. But for a lot of people, there’s no reason to use JACK at all.

I’m running 5.12 on Fedora27 so I may be of help :slight_smile: .

Usually, I run Ardour with ALSA backend. This gives me all I need: my R24 as input device, output device and DAW control surface.
When I use Jack, I start it with QJackCtl first, then run “a2jmidid -e” to expose the MIDI ports.
Then I start Ardour and select the MIDI backend. When Ardour is running, I can make the necessary MIDI connections in QJackCtl.

But probably question #1 is, why doesn’t it work with ALSA?
What does work, and what does not?

This is my checklist for Ardour, R24, using the ALSA backend:

  1. Connect the R24 and select the sound i/f function.
  2. Verify (aconnect -l) that the R24 MIDI is shown.
  3. Start Ardour
    a. select Audio System: ALSA
    b. Input Device: R24
    c. MIDI Devices: Enable R24 MIDI 1 (IO)
    d. Start
  4. If the surface functions do not work:
    a. Open the Preferences Window and select Control Surfaces
    b. Select Mackie protocol, Show protocol settings
    c. Device Type: Mackie Control, sends R24 MIDI 1(IN), receives R24 MIDI 1(OUT)

HTH

Thanks for both of the quick responses!

Paul, I realize now that I was misunderstanding your post because JACK was the only option I had available under “Audio System”, but I could see ALSA in the MIDI System dropdown. Thus, I thought that by selecting ALSA as the MIDI system, devices should appear and work automatically.
I have now installed the ALSA backend, so thanks for helping clear that up.

That said, I used to route Hydrogen Drum Machine into Ardour via Jack, so I’d like to get this figured out if possible. . . sciurius: I’m interested in how you’re getting Ardour to work with Jack on F27. Here’s the behavior I see:

  1. Open QJackCtl and click “Start”. This starts Jack and a2jmidid -e, successfully. I can see active devices and connections in QJackCtl.

  2. Click on Ardour icon. After about 20 seconds, the Session Setup dialog appears. (My system has an 8 core CPU, 32gb of RAM, and SSD, and Ardour opens much more quickly when Jack is not already running).

  3. Select an existing session or click the “New Session” button. Doesn’t matter which.

  4. Audio/MIDI Setup dialog window background appears with no labels or fields or buttons. After 10-15 seconds, content loads. It indicates that the Audio System is “Stopped”. I select JACK for the Audio System, and ALSA (JACK2, 1.9.8 and later) for the MIDI System.

  5. Click on Start, or click x to close the Audio/MIDI Setup dialog window (doesn’t matter which action I do).

  6. After 10-15 seconds, I get “Can’t connect to audio/midi engine”.

Like I said, this was working roughly up until I moved at the end of October. No changes to hardware or anything like that. I did try running ardour with gdb, and saw some messages that seem related:

[New Thread 0x7fffc4381700 (LWP 799)] [New Thread 0x7fffc4300700 (LWP 803)] Cannot read socket fd = 14 err = Success Cannot open ardourprobe client CheckRes error JackSocketClientChannel read fail JackShmReadWritePtr1::~JackShmReadWritePtr1 - Init not done for -1, skipping unlock [Thread 0x7fffc4300700 (LWP 803) exited] JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock [Thread 0x7fffc4381700 (LWP 799) exited] [New Thread 0x7fffc4381700 (LWP 7702)] [New Thread 0x7fffc4300700 (LWP 7706)] Cannot read socket fd = 14 err = Success CheckRes error JackSocketClientChannel read fail Cannot open ardourprobe client JackShmReadWritePtr1::~JackShmReadWritePtr1 - Init not done for -1, skipping unlock JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock

This repeats a few times, and certainly doesn’t look great, but I’ve no idea what to do about it. Any thoughts?

If there is no “ALSA” in the Audio/MIDI setup choice, then you’re using a badly built version of Ardour (probably one you didn’t get from ardour.org). I would suggest you stop using it and a correctly built one.

And actually, the ALSA backend doesn’t work either. I completely rebooted my machine after installing it, and selected it when starting Ardour. I get a “Failed to Open Audio Device” dialog.

Output from gdb:

[Thread 0x7fffcc36d700 (LWP 4935) exited]
Detaching after vfork from child process 4936.
[New Thread 0x7fffb5985700 (LWP 4937)]
[Thread 0x7fffb5985700 (LWP 4937) exited]
caught signal - shutting down.
Process is still running! trying SIGKILL
[Thread 0x7fffb6186700 (LWP 4908) exited]
Detaching after vfork from child process 4940.
[New Thread 0x7fffb6186700 (LWP 4941)]
[Thread 0x7fffb6186700 (LWP 4941) exited]
caught signal - shutting down.
Process is still running! trying SIGKILL
Butler drops pool trash

Errors/Messages:
ERROR: AlsaAudioBackend: failed to allocate parameters.
ERROR: AlsaAudioBackend: failed to allocate parameters.
INFO: Loading 88 MIDI patches from /usr/share/ardour5/patchfiles

run dialog
[New Thread 0x7fffb6186700 (LWP 5038)]
Cannot get session parameters.
[Thread 0x7fffcedf3700 (LWP 4899) exited]
[Thread 0x7fffcf5f4700 (LWP 4898) exited]
[Thread 0x7fffd7c64700 (LWP 4894) exited]
[Thread 0x7fffcce50700 (LWP 4900) exited]
[Thread 0x7fffb6186700 (LWP 5038) exited]
[Thread 0x7fffb7fff700 (LWP 4901) exited]
[Thread 0x7fffd6c62700 (LWP 4897) exited]
[Thread 0x7fffcffff700 (LWP 4896) exited]
[Thread 0x7fffd7463700 (LWP 4895) exited]
[Inferior 1 (process 4890) exited normally]
(gdb)

( I really like the one about the butler dropping the pool trash! :smiley: )

I can open the FFADO Mixer and control the device, so there don’t appear to be any physical connectivity issues. I’m really unsure as to what’s going on, considering I’ve used this exact rig successfully in the past. scratches head

Hi Paul, I’ve been an Ardour (financial) supporter for a while, but have always just installed from the Fedora repositories because I assumed they’d be well tailored to the distribution. If you don’t think I should be using their builds, I can try grabbing the latest download from here. Thanks.

Removed ardour version from the Fedora repository, and installed the version from this site. Same issues, unfortunately.

Sure, but you see the “ALSA” audio backend as an option now, instead of just JACK, correct? I didn’t anticipate that just making that change would fix your issues, and in fact because you’re apparently using a Firewire device, it’s likely that JACK will actually work better for you. But a version that doesn’t offer the ALSA backend isn’t built correctly.

Having said that, I have a suspicion that some enterprising Fedora packager decided to make all the backends be separate packages … either way, you really are better with the version from us.

This increasingly seems like a problem you’d be better off asking for help on IRC (link in bottom left of this page) with. Too much need for fast back and forth and output from diagnostoc commands …

Yes, I do see both backends, and you’re correct that Fedora offers the JACK and ALSA backends as separate packages. I’ve now installed from the file I downloaded here.

I’ll head over to IRC next time I have a chance to work on this. Thanks!

I do not want to disagree with Paul, but the Fedora packaged version of Ardour seemd to be okay except for the issues with libsndfile (discussed elsewhere). On my Fedora 27 system I downgraded libsndfile to 1.0.27 and as far as I can tell everything in Ardour functions as it should.

For the sake of completeness: Fedora provides separate packages for the jack, alsa and dummy backends. This is their standard policy (with PROs and CONs, but thats not something to be discussed here).
By default, when you install ardour, only the jack backend is included. So you need to install the alsa backend explicitly.