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

Linux: add method to MIDIClient to set ALSA MIDI client name #6252

Open
sjomae opened this issue Apr 13, 2024 · 0 comments
Open

Linux: add method to MIDIClient to set ALSA MIDI client name #6252

sjomae opened this issue Apr 13, 2024 · 0 comments

Comments

@sjomae
Copy link

sjomae commented Apr 13, 2024

Motivation

To be able to restore ALSA MIDI connections reliable across sessions with tools such as jack_connect, aj-snapshot and jackpatch, one needs to have a fixed MIDI client name for a session. Now multiple instances of SC creates their own suffix for a ALSA midi port, but this can be changed or reversed when opening the same session the other day.

Also, when a2jmidid is used, it adds the ALSA client ID to the port name, which is not stable across sessions. One can use a2jmidid -u, but, for this to work "ALSA client name uniqueness must be guartanteed externally"
https://manpages.org/a2jmidid

Description of Proposed Feature

Add a ALSA (so Linux) specific method to MIDIClient, which gives the user the option to give a name to the ALSA MIDI client. This could be the same name as the device, but that's up to the user.

Thinkable options are:

MIDIClient.InitWithName();
MIDIClient.name_("SuperCollider-drums").init;

This is probably the simplest fix.

This issue would also be solved if JACK MIDI would be added:
#6250

Code reference:


int initMIDI(int numIn, int numOut) {

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

No branches or pull requests

2 participants