Same names for ALSA Sequencer clients of two hw USB controllers
MIDI libraries for Qt/C++
Brought to you by:
plcl
I have two identical USB KeyRigs attached and run a VMPK for each.
I have to disconnect K49 to configure K49_1 before I can configure K49.
Details:
$ cat /proc/asound/cards | tail -4
3 [K49 ]: USB-Audio - KeyRig 49
M-Audio KeyRig 49 at usb-0000:08:00.0-1, full speed
4 [K49_1 ]: USB-Audio - KeyRig 49
M-Audio KeyRig 49 at usb-0000:08:00.0-2, full speed
$ lsusb | grep KeyRig
Bus 003 Device 003: ID 0763:019b M-Audio KeyRig 49
Bus 003 Device 004: ID 0763:019b M-Audio KeyRig 49
$ rpm -q -a vmpk
vmpk-0.7.2-1.fc31.x86_64
$ uname -r
5.5.17-200.fc31.x86_64
Here is the second screenshot.
I suppose that you are using Linux, distribution: Fedora 31. This kind of information is relevant when seeking support for a multiplatform application.
I don't understand this sentence:
About your screenshots, the interesting part would be the contents of the "Input MIDI Connection" combo, but you show it closed.
VMPK uses the client:port names provided by ALSA sequencer. These command outputs are irrelevant for VMPK:
Instead, you should post the output of this command, when all your devices are attached:
$ cat /proc/asound/seq/clientsThis command also show the relevant client and port names:
$ aconnect -liYou can use
aconnectorqjackctlto make the connections to/from VMPK instances, instead of using the connection window if it is easier for you. Closing and reopening the connection window or checking/unchecking the "show advanced connections" checkbox may also refresh the contents of the combos, if there are some refreshing problems in your case.Anyway, I don't have two identical MIDI controllers to reproduce your scenario, so you should try to figure the problem by yourself.
This conversation may be useful for you:
http://linux-audio.4202.n7.nabble.com/Renaming-aliasing-ALSa-sequencer-hardware-clients-td82501.html
Last edit: Pedro Lopez-Cabanillas 2020-04-24
A side note: why do you need two VMPK instances? It would be easier to assign a different MIDI channel on each KeyRig, and use a single VMPK instance. In this case, you may want to activate the "MIDI Omni mode" in MIDI Setup and in Preferences->Note highlight color->MIDI Channels. And of course, connect externally both KeyRigs to VMPK, not using the "MIDI Setup" dialog.
It all depends on what is your need to use VMPK. You have two real MIDI controllers connected to your computer, and then you also run a program which is a software emulated MIDI controller? This may be appropriate if you use VMPK to visualize the incoming MIDI events.
$ cat /proc/asound/cards
0 [PCH ]: HDA-Intel - HDA Intel PCH
HDA Intel PCH at 0xef420000 irq 51
1 [NVidia ]: HDA-Intel - HDA NVidia
HDA NVidia at 0xef080000 irq 52
2 [DAC ]: USB-Audio - USB Audio DAC
Burr-Brown from TI USB Audio DAC at usb-0000:00:1d.0-1.1, full speed
3 [K49 ]: USB-Audio - KeyRig 49
M-Audio KeyRig 49 at usb-0000:08:00.0-1, full speed
4 [K49_1 ]: USB-Audio - KeyRig 49
M-Audio KeyRig 49 at usb-0000:08:00.0-2, full speed
Pedro,
VMPK is a great application. I'm testing it with two USB KeyRigs and two sound cards. I only need Qsynth and VMPK without the need for jackd. Each keyboard can have several VMPK instances pointing to different QsynthX each pointing to different sound cards. This way two VMPKs can each point to the same Qsynth sound card with different soundfonts and use PAN to simulate a new stereo font.
I have a work around for the device naming issue but I thought you might want to fix it for the Fedora 31 distro. Let me know of anything I can do to help.
Thanks for this great application and your quick response.
Some more output you requested:
$ cat /proc/asound/seq/clients
Client info
cur clients : 4
peak clients : 8
max clients : 192
Client 0 : "System" [Kernel]
Port 0 : "Timer" (Rwe-)
Port 1 : "Announce" (R-e-)
Client 14 : "Midi Through" [Kernel]
Port 0 : "Midi Through Port-0" (RWe-)
Client 28 : "KeyRig 49" [Kernel]
Port 0 : "KeyRig 49 MIDI 1" (R-e-)
Client 32 : "KeyRig 49" [Kernel]
Port 0 : "KeyRig 49 MIDI 1" (R-e-)
$ aconnect -li
client 0: 'System' [type=kernel]
0 'Timer '
1 'Announce '
client 14: 'Midi Through' [type=kernel]
0 'Midi Through Port-0'
client 28: 'KeyRig 49' [type=kernel,card=3]
0 'KeyRig 49 MIDI 1'
client 32: 'KeyRig 49' [type=kernel,card=4]
0 'KeyRig 49 MIDI 1'
$ cat /proc/asound/cards
0 [PCH ]: HDA-Intel - HDA Intel PCH
HDA Intel PCH at 0xef420000 irq 51
1 [NVidia ]: HDA-Intel - HDA NVidia
HDA NVidia at 0xef080000 irq 52
2 [DAC ]: USB-Audio - USB Audio DAC
Burr-Brown from TI USB Audio DAC at usb-0000:00:1d.0-1.1, full speed
3 [K49 ]: USB-Audio - KeyRig 49
M-Audio KeyRig 49 at usb-0000:08:00.0-1, full speed
4 [K49_1 ]: USB-Audio - KeyRig 49
M-Audio KeyRig 49 at usb-0000:08:00.0-2, full speed
My work around:
I power off K49 to configure K49_1.
The I can power on K49 and configure another VMPK with it.
Here is the command-line output when adding 48:0
$ vmpk
Failure loading Qt5 translations for "en_US" from "/usr/share/qt5/translations"
Failure loading VMPK translations for "en_US" from "/usr/bin/../share/vmpk/locale/"
pthread_setschedparam() failed, err= 0 Success
This is the problem:
ALSA Sequencer gives the same names to both clients, and this is the string that VMPK shows as connection to the user. This may be is a bug in ALSA, because a subscription between two ports can be specified using the client name and the port number. In this case, for both devices the specification would be the same:
"KeyRig 49":0.Fortunately, there is another way to write the specification: using the client number and port. In this case, the specifications for both would be "28:0" and "32:0". In
aconnectyou can use this format, and it can be the way to implement a workaround in Drumstick.Changing the ticket to Drumstick.
Ticket moved from /p/vmpk/bugs/63/
fixes in [r430] thru [r432]
Related
Commit: [r430]
Commit: [r432]