Jack Interface Numbering?

Support & discussion regarding DAWs and MIDI sequencers.

Moderators: MattKingUSA, khz

Post Reply
everythingsgonegreen
Established Member
Posts: 3
Joined: Sun Mar 11, 2018 4:01 pm

Jack Interface Numbering?

Post by everythingsgonegreen »

Hi, I'm just getting started with this whole making/recording music thing, but have been using linux extensively for the past 20+ years, so please bear with me.

I've got my system setup as far as I can tell and just picked up a Roland Rubix22 and an Akai MPK mini mk2 to play around with along with my guitars and everything seems to be working, but I've run into a slight annoyance and was wondering if those with experience with Jack/Ardour5 might have an answer.

I've noticed if I reboot or unplug the midi controller, the midi_capture_x interface numbering changes for the devices depending on how they are enumerated when booting up, or if I've unplugged and re-plugged in one of the interfaces. Anytime this happens I need to go into my saved session in Ardour and re-map the inputs. Is there any way in Jack to setup a static config with the interface numbers being fixed based on the USB device id?

I noticed this start happening as I was writing a native config tool to setup the MPK mini so I don't have to run wine and I noticed my numbering changing after I released to controller back to the kernel driver. Ideally I'd like to be able to edit the config while Jack and Ardour are running, rather than shutting everything down, changing the programming on the MPK mini and then re-launching everything, mainly for testing as I'm aware most people won't be editting the stored programs on the fly.

Anyway, is Jack in its current form capable of handling this? I know people likely aren't removing devices and re-attaching them to the bus while recording, but I did see it happen across a reboot where the controller was enumerated before the Rubix while it was the other way around when I first started things up.

Thanks!

Pablo
Established Member
Posts: 1269
Joined: Thu Apr 17, 2008 9:57 pm

Re: Jack Interface Numbering?

Post by Pablo »

Does this help?

https://alsa.opensrc.org/MultipleCards

Sorry but I don't think the problem has anything to do with jack even if it seems so. :)

EDIT. Sorry for the confusion. I just reread the article and decided to strike through the above :oops:
EDIT, again: I just deleted the bad hint . Take a look at the article, I hope it helps

everythingsgonegreen
Established Member
Posts: 3
Joined: Sun Mar 11, 2018 4:01 pm

Re: Jack Interface Numbering?

Post by everythingsgonegreen »

Thanks, I'll take a look. Initially it looks like it may resolve the ordering issue, but I'll see if it also resolves the incrementing index when the devices go away and come back individually.

User avatar
noedig
Established Member
Posts: 148
Joined: Wed Feb 12, 2014 4:39 am
Location: South Africa

Re: Jack Interface Numbering?

Post by noedig »

Hardware MIDI devices are handled by ALSA and are made avaiable to JACK via some kind of bridge.
For instance, I use "a2jmidid -ue" to make the devices visible in JACK.
The "e" option ensures that hardware devices are bridged (i.e. your MIDI controller);
The "u" option removes the ALSA port numbering, which helps a lot for JACK clients when the ALSA port numbers change as you have noticed.

I'm not sure how to achieve this with other ALSA/JACK MIDI bridges.

Baggypants
Established Member
Posts: 101
Joined: Fri Jul 31, 2015 11:28 pm

Re: Jack Interface Numbering?

Post by Baggypants »

I don't know how to do it with Ardour but using qjackctl you can use regular expressions in the patchbay definitions. Edit your plug so it's 'midi_capture_.*'

jaimiejaimie
Established Member
Posts: 6
Joined: Sat Mar 21, 2020 7:03 pm
Contact:

Re: Jack Interface Numbering?

Post by jaimiejaimie »

Hi, any luck setting up the Rubix22? I am trying but I might have to return it.

User avatar
thumbknuckle
Established Member
Posts: 36
Joined: Sun Oct 19, 2014 6:16 pm
Location: Western Massachusetts
Contact:

Re: Jack Interface Numbering?

Post by thumbknuckle »

noedig wrote:
Mon Mar 19, 2018 1:46 pm
The "u" option removes the ALSA port numbering, which helps a lot for JACK clients when the ALSA port numbers change as you have noticed.
This is super helpful, now the patchbay in QjackCtl doesn't get confused every time I reboot.

Thanks!
Faster than a laser bullet.
Louder than an atom bomb.

Post Reply