Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reliable restoration, jack1, Alsa port names #26

Open
sjomae opened this issue Aug 29, 2024 · 5 comments
Open

Reliable restoration, jack1, Alsa port names #26

sjomae opened this issue Aug 29, 2024 · 5 comments

Comments

@sjomae
Copy link

sjomae commented Aug 29, 2024

To ensure this uniqueness, a2jmidid will add the unique numeric ALSA client ID to the JACK port name. However this behaviour is known to be problematic when restoring connections using simplistic tools like aj-snapshot and jack_connect.

Jack1 has changed the ALSA port names so they never use the client number.

alsa_midi:Midi Through Port-0 (out)
alsa_midi:Midi Through Port-0 (in)
alsa_midi:MOTU-AVB MIDI 1 (out)
alsa_midi:MOTU-AVB MIDI 1 (in)
alsa_midi:Keystation 88 MIDI 1 (out)
alsa_midi:Keystation 88 MIDI 1 (in)
alsa_midi:Keystation 88 MIDI 2 (out)
alsa_midi:MidiSport 2x2 MIDI 1 (out)
alsa_midi:MidiSport 2x2 MIDI 1 (in)
alsa_midi:MidiSport 2x2 MIDI 2 (out)
alsa_midi:MidiSport 2x2 MIDI 2 (in)

This has never been picked up by a2jmidid, according to Paul Davis. Room for improvement here?

@romsom
Copy link
Contributor

romsom commented Sep 5, 2024

Can you provide a bit more context, like links to the quotes and the change in jack you mention?

@sjomae
Copy link
Author

sjomae commented Sep 5, 2024

Was a discussion in #ardour irc with las / paul davis. For details you might be best of to ask him directly (via IRC or mail)

> ALSA midi port names, converted by a2jmidi are not consistent in the numbering right? That's a annoyance when using session management
>>> what do you mean by consistent?
> sometimes it seems to get number 129, sometimes 130 etc
>>> i changed things in jackd1 so that the names are better (they never use the ALSA client number), this was not picked up (so far) by a2jmidid

@sjomae
Copy link
Author

sjomae commented Sep 5, 2024

Small annoyance, but it hurts workflow quite a bit when working with NSM session manager.

The a2jmidid manpage says:

ALSA does not guarantee client names to by unique. I.e. it is possible to have two apps that create two clients with same ALSA client name. JACK however requires port names to be unqiue. To ensure this uniqueness, a2jmidid will add the unique numeric ALSA client ID to the JACK port name. However this behaviour is known to be problematic when restoring connections using simplistic tools like aj-snapshot and jack_connect. In order to make them work, the -u option can be used. This option will cause a2jmidid to omit the numeric ALSA Client ID from JACK port names. In this mode, ALSA client name uniqueness must be guartanteed externally. 

https://manpages.org/a2jmidid

@romsom
Copy link
Contributor

romsom commented Sep 5, 2024

Thanks! 👍

@sjomae
Copy link
Author

sjomae commented Sep 5, 2024

No problem. Actually, when I think about it now, I think those midi ports is the only thing which I currently can't restore reliable in such a session manager. That means you don't have sound and you need to figure out what is causing it, find out that it's the midi connection ... and so forth.... So all though a small thing, it would be a big thing if this would be fixed. Not sure how pipewire handles this, but I use jack2 anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants