You are here

Cannot make connections on ALSA tab

I know that's not a 100% accurate statement in the subject line, I can make connections from the "Midi Through" output port to any software synth that appears in the Writable Clients / Input Ports pane, but not from the output port that I need. For the record, I am using Kubuntu 8.04 on the system in question.

Fact, not all JACK compatible soft synths support the JACK MIDI implementation, so the only way you can connect a MIDI instrument to them is through the ALSA tab. Let's use the ZynAddSubFX soft synth in this example, it only shows up on the ALSA tab in the connections window. Now, in that tab I also have a Yamaha UX16 USB MIDI interface. All my MIDI messages come in on that interface, so I need to connect the UX16 Readable Client / Output Port to the ZynAddSubFX Writable Clients / Input Port.

The problem is that every time I try to make that connection nothing happens. Except, when you look at the messages window, it says "ALSA Connection Change". Unfortunately, you can never make that connection on the ALSA tab. Now, if a program has JACK MIDI support (such as AZR3 or QSampler) you can just connect the "system" output port (midi_capture_1) to the midi_input of any soft synth on that tab and it works flawlessly.

So, my question here is this...How can I force my Yamaha UX16 USB MIDI interface to connect to soft synths that don't have JACK MIDI support?

Forums: 
rncbc's picture

You can, of course, connect any ALSA sequencer client/ports as you want. In fact, ALSA-seq connections predates JACK-MIDI by many years in QjackCtl implementation ;)

However, whether the connection does not persist or shows in the ALSA Connections tab window is odd.

Check your current Patchbay profile, maybe there's some rule re. Yamaha USB MIDI and/or ZynAddSubFX marked with the exclusive bit?

Cheers

Nothing in the patchbay section at all. So for the life of me, I can't figure out how to control any JACK compatible instruments that don't have JACK MIDI support.

rncbc's picture

Hmmm... I assume you're also using one of the JACK-MIDI drivers available, either "raw" or "seq" (see in Setup/Settings/MIDI Driver).

Try restarting jackd with either one, and retry the ALSA connections. It has been to my experience that using the "seq" driver has some nasty interferences as to disappearing or non-effective ALSA MIDI connections. If you actually need to connect external MIDI devices to/from JACK-MIDI, I recommend you to use "raw". If you want to have "seq" as your JACK-MIDI driver, you should abstain from using the ALSA Connections tab and you're better off disabling ALSA-MIDI altogether (ie. turn Setup/Misc/Enable ALSA Sequencer support off).

YMMV.

I've been using the Raw MIDI driver, that's the only one I could get to work for me. Neither one would allow connections to soft synths in the ALSA tab. I pretty much have no other choice than to abstain from using the ALSA tab since I can't establish connections on that tab anyway. The problem is, how do I get programs like QSynth, Horgand, ZynAddSubFX, etc to make their MIDI connections show up in the MIDI tab of QJackCtl? (since disabling the ALSA Sequencer support makes the ALSA tab go away and that's where the MIDI inputs of those soft synths show up). Using your suggestion in the above, how would you play QSynth with an external MIDI keyboard?

rncbc's picture

There must be something really wrong with your ALSA sequencer setup. Please try listing and making the actual connections on the command line, via aconnect (from alsa-utils); there you might have a better clue of what's (not) happening.

HTH

I'm using all default packages from Kubuntu 8.04 so I'm not sure what might be messed up. I'll admit, I'm not a JACK expert, I just know that I never had problems like this until they came up with that JACK MIDI feature (the -X option). Anyway, I started QJackctl and had it start jackd. Then started Qsynth and ran a couple aconnect commands. Here are the results:

midiman@kubuntu:~ $ aconnect -i
client 0: 'System' [type=kernel]
0 'Timer '
1 'Announce '
client 14: 'Midi Through' [type=kernel]
0 'Midi Through Port-0'
client 20: 'UX16' [type=kernel]
0 'UX16 MIDI 1 '
midiman@kubuntu:~ $ aconnect -o
client 14: 'Midi Through' [type=kernel]
0 'Midi Through Port-0'
client 20: 'UX16' [type=kernel]
0 'UX16 MIDI 1 '
client 128: 'FLUID Synth (5374)' [type=user]
0 'Synth input port (5374:0)'

Since "Enable ALSA Sequencer Support" is disabled in QJackctl, I no longer have an ALSA tab in the connections window, and the only place qsynth appears is in the AUDIO tab of the connections window.

If I execute "aconnect 20 128" I get "Connection failed (Resource temporarily unavailable)" which I don't understand because nothing is using it.

If I execute "aconnect 14 128" it establishes a connection, but that's useless to me because I'm not using the "Midi Through" port for anything, nor would I really even know how to use it. I mean, I know what the MIDI Thru port on any MIDI device does, but the "Midi Through" in ALSA sure doesn't seem to relay MIDI messages received on my UX16 MIDI input.

In my sound system settings in KDE, I have the "audio device" set to ALSA and the "MIDI device" set to the UX16 MIDI interface. I know the MIDI interface works because anything I have that is JACK MIDI aware receives MIDI messages from it just fine.

Scrap all that, I think I figured out what was happening. To make the connections in the MIDI tab work, I had to set the MIDI Driver to "raw" and set the Input Device to "hw1" (the UX16). As soon as I set the input device back to "default" and set the MIDI Driver to "seq", I can now make connections on the ALSA tab. However, this does lead me to wonder why this method is considered the bad way to do things and what makes JACK MIDI support superior. After this little run around, I don't see the superiority of the raw MIDI driver and JACK MIDI support.

rncbc's picture

Good catch. I'm glad you got it squared alright :)

Take note that JACK-MIDI and ALSA-MIDI (aka ALSA sequencer) are two alternative MIDI transport and inter-application connectivity solutions, each one with its own merits, pros and cons. In my watch, I don't compare each as one being superior to the other, or vice-versa. JACK-MIDI is indeed appointed to have sample-accurate MIDI event transport and thus more resilient to jitter. However that is only true and seen from their respective clients. If all you have are JACK-MIDI clients and one external MIDI I/O interface to outboard hardware (eg. MIDI keyboard controller), the best approach wrt. minimal jitter, is in using the "raw" driver.

Cheers

I've been having the same problem with my ALSA MIDI connections for a few months now. It makes no difference whether the devices are internal or external. However, applying your "fix" to my system fixed my problem as well. My Jack-MIDI was set to RAW as well, and setting to seq now allows me to connect my ALSA MIDI devices again.

This is strange, as I have not changed my JACK parameters in at least a year....but I have upgraded my Jack, Qtractor and Qjackctl many times in that time frame. I just never mentioned it before because I thought the problem was unique to my system, having not until now seen anyone else experience it. However, sometimes I could make the ALSA MIDI connections, but they would not last long, and disconnected unexpectedly never to reconnect again. I'll let you know if this "fix" holds up.

cheers,
Lexridge

I'm assuming JACK MIDI is easier to work with when your MIDI interface and audio interface are one. With me having to manually select hw1 as my MIDI capture device, that prevented me from using it anywhere else. So I would assume that if I had a card like my M-Audio card in my studio system, the built in MIDI interface would probably just worked with the system defaults.

Add new comment