M Audio Keystation 49 MK3 No Midi Connection

Talk about your MIDI interfaces, microphones, keyboards...

Moderators: MattKingUSA, khz

Linux_Voivod
Established Member
Posts: 27
Joined: Thu Jun 18, 2020 4:26 pm
Been thanked: 1 time

M Audio Keystation 49 MK3 No Midi Connection

Post by Linux_Voivod »

Hi there,

Just bought a M Audio Keystation 49 MK3, only to find out that it doesn't work as my Nektar does. That's just plugging in, running a2jmidid -e &, fixing 2 connections in the Qjackctl graph and everything works fine.

In the terminal I now get the following error message:
a2jmidid -e &
[1] 15290
ralph@ralph-Inspiron-14-5410:~$ JACK MIDI <-> ALSA sequencer MIDI bridge, version 9 built on Thu Jan 1 01:00:00 1970
Copyright 2006,2007 Dmitry S. Baikov
Copyright 2007,2008,2009,2011,2012 Nedko Arnaudov

Bridge starting...
Using JACK server 'default'
Hardware ports will be exported.
Bridge started
Press ctrl-c to stop the bridge
port created: Midi Through [14] (capture): Midi Through Port-0
port created: Midi Through [14] (playback): Midi Through Port-0
port created: Keystation 49 MK3 [24] (capture): Keystation 49 MK3 Keystation 49
port created: Keystation 49 MK3 [24] (playback): Keystation 49 MK3 Keystation 49
ERROR: a2j_port_create: jack_port_register() failed for 'Keystation 49 MK3 [24] (capture): Keystation 49 MK3 Keystation 49'
ERROR: a2j_port_create: jack_port_register() failed for 'Keystation 49 MK3 [24] (playback): Keystation 49 MK3 Keystation 49'

Those errors are unknown with the previous midikeyboards I used (Nektar and earlier a simpler version: M Audio keystation 32 MINI.

I tried a lot, also an update of midisports firmware. The trouble is still there.

Someone got a clue?

Linux Ubuntu 22.04. Yabridge, Kontakt, Metal

asbak
Established Member
Posts: 897
Joined: Thu Sep 11, 2014 3:04 pm
Has thanked: 71 times
Been thanked: 64 times

Re: M Audio Keystation 49 MK3 No Midi Connection

Post by asbak »

Is the midi driver in qjackctl set to "none", if that does not work try setting to "seq", if that also does not work then something else is causing an issue.
Some Focal / 20.04 audio packages and resources https://midistudio.groups.io/g/linuxaudio
Linux_Voivod
Established Member
Posts: 27
Joined: Thu Jun 18, 2020 4:26 pm
Been thanked: 1 time

Re: M Audio Keystation 49 MK3 No Midi Connection

Post by Linux_Voivod »

This unfortunately doesn't solve the problem. seq, raw or none. The issue remains the same, although in raw there are some extra problems added.

Linux Ubuntu 22.04. Yabridge, Kontakt, Metal

User avatar
noedig
Established Member
Posts: 239
Joined: Wed Feb 12, 2014 4:39 am
Location: South Africa
Has thanked: 9 times
Been thanked: 54 times

Re: M Audio Keystation 49 MK3 No Midi Connection

Post by noedig »

Some things to try (if you haven't already):
- Do you have your Nektar there now? Test it along with the MK3, on the exact same software setup and/or procedure to confirm that a2jmidid does work now for the Nektar (or other USB MIDI gear).
- The MK3 manual describes how you can do a factory reset, maybe try that?
- Ensure there are no other instances of a2jmidid running.
- Kill all instances of a2jmidid and Jack and try it with ALSA only. (Also try another USB MIDI device as a reference.)
- Try in Windows and/or a Linux Live USB like AVLinux
merlyn
Established Member
Posts: 1392
Joined: Thu Oct 11, 2018 4:13 pm
Has thanked: 168 times
Been thanked: 247 times

Re: M Audio Keystation 49 MK3 No Midi Connection

Post by merlyn »

When I plug a MIDI keyboard in JACK automatically recognises it and sets up inputs and outputs. I don't have to run a2jmidid. A USB keyboard when plugged in appears as JACK MIDI.

To take JACK out the equation you could use ALSA. First find what port your keyboard is on with aconnect -l

Code: Select all

$ aconnect -l
client 0: 'System' [type=kernel]
    0 'Timer           '
    1 'Announce        '
	Connecting To: 128:0
client 14: 'Midi Through' [type=kernel]
    0 'Midi Through Port-0'
	Connecting To: 128:0[real:0]
	Connected From: 128:0
client 20: 'Hammerfall DSP' [type=kernel,card=1]
    0 'HDSP MIDI 1     '
	Connecting To: 128:0[real:0]
	Connected From: 128:0
client 24: 'Hoontech SoundTrack Audio DSP24' [type=kernel,card=2]
    0 'MIDI-1 Hoontech/STA DSP24 2'
	Connecting To: 128:0[real:0]
	Connected From: 128:0
   32 'MIDI-2 Hoontech/STA DSP24 2'
	Connecting To: 128:0[real:0]
	Connected From: 128:0
client 28: 'Hoontech SoundTrack Audio DSP24' [type=kernel,card=3]
    0 'MIDI-1 Hoontech/STA DSP24 3'
	Connecting To: 128:0[real:0]
	Connected From: 128:0
   32 'MIDI-2 Hoontech/STA DSP24 3'
	Connecting To: 128:0[real:0]
	Connected From: 128:0
client 32: 'PhotonX25' [type=kernel,card=4]
    0 'PhotonX25 PhotonX25'
	Connecting To: 128:0[real:0]
	Connected From: 128:0
    1 'PhotonX25 PhotonX25'
	Connecting To: 128:0[real:0]
In the above output the PhotonX25 is a USB keyboard. Now use aseqdump -p with the correct port number to output MIDI messages in the terminal.

Code: Select all

$ aseqdump -p 32
Waiting for data. Press Ctrl+C to end.
Source  Event                  Ch  Data
  0:1   Port subscribed            128:0 -> 129:0
 32:0   Note on                 0, note 59, velocity 33
 32:0   Note off                0, note 59
 32:0   Note on                 0, note 59, velocity 57
 32:0   Note off                0, note 59
 32:0   Note on                 0, note 59, velocity 36
 32:0   Note off                0, note 59
 32:0   Note on                 0, note 59, velocity 43
 32:0   Note off                0, note 59
 32:0   Note on                 0, note 59, velocity 45
 32:0   Note off                0, note 59
 32:0   Note on                 0, note 59, velocity 48
 32:0   Note off                0, note 59
 32:0   Note on                 0, note 59, velocity 52
 32:0   Note off                0, note 59
 32:0   Note on                 0, note 59, velocity 39
 32:0   Note off                0, note 59
If you get nothing that would suggest the USB cable or keyboard may be the problem.
Linux_Voivod
Established Member
Posts: 27
Joined: Thu Jun 18, 2020 4:26 pm
Been thanked: 1 time

Re: M Audio Keystation 49 MK3 No Midi Connection

Post by Linux_Voivod »

So I ran through what Merlyn said and the USB shows it works that way.

I also did what noedig suggested, including factory reset, but the issue remains.

Here's what I get when both the Nektar and the M Audio are in a2jmidid -e &

JACK MIDI <-> ALSA sequencer MIDI bridge, version 9 built on Thu Jan 1 01:00:00 1970
Copyright 2006,2007 Dmitry S. Baikov
Copyright 2007,2008,2009,2011,2012 Nedko Arnaudov

Bridge starting...
Using JACK server 'default'
Hardware ports will be exported.
Bridge started
Press ctrl-c to stop the bridge
port created: Midi Through [14] (capture): Midi Through Port-0
port created: Midi Through [14] (playback): Midi Through Port-0
port created: Keystation 49 MK3 [20] (capture): Keystation 49 MK3 Keystation 49
port created: Keystation 49 MK3 [20] (playback): Keystation 49 MK3 Keystation 49
ERROR: a2j_port_create: jack_port_register() failed for 'Keystation 49 MK3 [20] (capture): Keystation 49 MK3 Keystation 49'
ERROR: a2j_port_create: jack_port_register() failed for 'Keystation 49 MK3 [20] (playback): Keystation 49 MK3 Keystation 49'
port created: Impact GX49 [28] (capture): Impact GX49 MIDI1
port created: Impact GX49 [28] (playback): Impact GX49 MIDI1
port created: Impact GX49 [28] (capture): Impact GX49 MIDI2

You can see that the Nektar has two capture channels, while M Audio has only 1 plus the known errors.

Still searching and your help so far is much appreciated!

Linux Ubuntu 22.04. Yabridge, Kontakt, Metal

merlyn
Established Member
Posts: 1392
Joined: Thu Oct 11, 2018 4:13 pm
Has thanked: 168 times
Been thanked: 247 times

Re: M Audio Keystation 49 MK3 No Midi Connection

Post by merlyn »

Linux_Voivod wrote: Thu Mar 03, 2022 2:35 pm ...
ERROR: a2j_port_create: jack_port_register() failed for 'Keystation 49 MK3 [20] (capture): Keystation 49 MK3 Keystation 49'
ERROR: a2j_port_create: jack_port_register() failed for 'Keystation 49 MK3 [20] (playback): Keystation 49 MK3 Keystation 49'
...
Is that because the port already exists? In QjackCtl look under 'JACK MIDI'. The M-Audio may already be there. I used to have a2jmidid running, but I don't now, and MIDI still works. JACK MIDI anyway, which is different from ALSA MIDI bridged to JACK. What happens if you leave the '-e' off?
Linux_Voivod
Established Member
Posts: 27
Joined: Thu Jun 18, 2020 4:26 pm
Been thanked: 1 time

Re: M Audio Keystation 49 MK3 No Midi Connection

Post by Linux_Voivod »

Hi Merlyn,

Leaving the -e doesn't do much (haven't checked it with the Nektar though).
How to find what's loaded in JACK MIDI?
Up till now I always have to run a2jmidid. I seem to miss a 'capture' channel for Reaper and thus have no input.

Linux Ubuntu 22.04. Yabridge, Kontakt, Metal

User avatar
Linuxmusician01
Established Member
Posts: 1547
Joined: Mon Feb 23, 2015 2:38 pm
Location: Holland (Europe)
Has thanked: 784 times
Been thanked: 144 times

Re: M Audio Keystation 49 MK3 No Midi Connection

Post by Linuxmusician01 »

@Linux_Voivod: why do you want to use Jack Midi instead of Alsa Midi? The utility that you use, a2jmidid, is a daemon that bridges Alsa Midi to Jack Midi. It seems to me like an unnecessary extra step.

Let me show/explain to you what I mean (see screenshot below):
Image
That's Qjackctl with the Connections window open. There are 3 tabs. The first is for audio signals. The second for the Jack version of Midi and the third for Alsa's Midi. You use a2jmidid to bridge the Alsa Midi to Jack Midi. That's not necessary. We Linuxers use Alsa anyway for audio and without bridging your Midi devices will show up under the Alsa tab in the Connections windows from Qjackctl.

Also see the screeny below.
Image
As you can see on the left-hand side, I've selected Alsa as my driver for Jack. Did you that too? It might help if you start Jack from the command line without any fancy schmancy options like so:

Code: Select all

jackd -d alsa --device hw:0
If you've got a second (external, USB) sound card/sound device then replace hw:0 with hw:1.


P.S. It'll help us if you put command line output between [code) tags.
merlyn
Established Member
Posts: 1392
Joined: Thu Oct 11, 2018 4:13 pm
Has thanked: 168 times
Been thanked: 247 times

Re: M Audio Keystation 49 MK3 No Midi Connection

Post by merlyn »

Linux_Voivod wrote: Thu Mar 03, 2022 6:44 pm How to find what's loaded in JACK MIDI?
Up till now I always have to run a2jmidid. I seem to miss a 'capture' channel for Reaper and thus have no input.
How do you start JACK? If you use QjackCtl, JACK MIDI shows up in the 'MIDI' tab.

We have established that your keyboard works, and that ALSA recognises it. You could try using Reaper with ALSA. JACK is only required if multiple audio applications are used at the same time e.g. you use Reaper at the same time as Hydrogen.

If you want to try it stop JACK and select ALSA as the driver in Reaper preferences.
Linux_Voivod
Established Member
Posts: 27
Joined: Thu Jun 18, 2020 4:26 pm
Been thanked: 1 time

Re: M Audio Keystation 49 MK3 No Midi Connection

Post by Linux_Voivod »

Here are some printscreens from my set-up, which is different then shown and doing it the suggested ways here, I have no input from a keyboard at all.

First the default with reaper started:
Schermafdruk van 2022-03-04 16-25-22.png
Schermafdruk van 2022-03-04 16-25-22.png (216.23 KiB) Viewed 3328 times
Then the version of Qjackctl I use:
Schermafdruk van 2022-03-04 16-25-33.png
Schermafdruk van 2022-03-04 16-25-33.png (212.68 KiB) Viewed 3328 times
Followed by a2jmidid started:
Schermafdruk van 2022-03-04 16-25-53.png
Schermafdruk van 2022-03-04 16-25-53.png (240.07 KiB) Viewed 3328 times
Message 1/2

Linux Ubuntu 22.04. Yabridge, Kontakt, Metal

Linux_Voivod
Established Member
Posts: 27
Joined: Thu Jun 18, 2020 4:26 pm
Been thanked: 1 time

Re: M Audio Keystation 49 MK3 No Midi Connection

Post by Linux_Voivod »

Message 2/2

And here Nektar connected and giving sound. M Audio also connected but without success, no sound:
Schermafdruk van 2022-03-04 16-51-24.png
Schermafdruk van 2022-03-04 16-51-24.png (194.35 KiB) Viewed 3328 times

Linux Ubuntu 22.04. Yabridge, Kontakt, Metal

merlyn
Established Member
Posts: 1392
Joined: Thu Oct 11, 2018 4:13 pm
Has thanked: 168 times
Been thanked: 247 times

Re: M Audio Keystation 49 MK3 No Midi Connection

Post by merlyn »

Thanks for the detailed information. Your setup appears to work differently from mine. The red ports in your screenshots are what I'm calling 'JACK MIDI'. And on your setup a2jmidid is required. The purple ports are ALSA MIDI. They don't appear on my setup unless I run a2jmdid. Strange. I am using QjackCtl 0.9.6.

Before you run a2jmidid you could check if it's already running with

Code: Select all

$ ps -aux|grep a2j
I would have thought it must be.

There's a JACK MIDI monitor :

Code: Select all

$ jack_midi_dump
When you run that a client appears in the QjackCtl graph window. Connect this client to the M-Audio. This will determine if it's a JACK or a Reaper issue. Given there is a port for the M-Audio I would expect it to work.
asbak
Established Member
Posts: 897
Joined: Thu Sep 11, 2014 3:04 pm
Has thanked: 71 times
Been thanked: 64 times

Re: M Audio Keystation 49 MK3 No Midi Connection

Post by asbak »

Run a MIDI events monitor and see what events - if any - are being generated by the keyboard in alsa and jack.
You can use Sherlock, Drumstick etc for this. Take your pick.

Other obvious diagnostic tests include
- Hooking the keyboard up to a hardware synth to confirm that it works at all
- Checking what MIDI Channel the keyboard is set to transmit on, ensuring that the receiving device is set to a matching MIDI channel
- Testing the keyboard on a different OS, and also capturing traffic with a utility such as Midi-Ox to confirm it's working
- To try different MIDI interfaces on the keyboard, for example does it have a DIN MIDI interface, or a USB Midi interface, or both? If it has both, try them both
- Is the keyboard getting sufficient power. Just because the LEDs light up that doesn't necessarily mean it is working properly. Sometimes they need more juice and a separate power supply is required. If it's USB port powered, not all USB ports are the same or deliver sufficient amounts of power.
Some Focal / 20.04 audio packages and resources https://midistudio.groups.io/g/linuxaudio
Linux_Voivod
Established Member
Posts: 27
Joined: Thu Jun 18, 2020 4:26 pm
Been thanked: 1 time

Re: M Audio Keystation 49 MK3 No Midi Connection

Post by Linux_Voivod »

merlyn wrote: Fri Mar 04, 2022 4:31 pm
Before you run a2jmidid you could check if it's already running with

Code: Select all

$ ps -aux|grep a2j
Running above command, I get this info:
ps -aux|grep a2j
ralph 11277 0.0 0.0 11904 5020 ? S 10:20 0:01 /usr/bin/a2jmidid dbus
ralph 23374 0.0 0.0 9072 2692 pts/0 S+ 11:13 0:00 grep --color=auto a2j
I don't know how to understand this info.

Linux Ubuntu 22.04. Yabridge, Kontakt, Metal

Post Reply