M-Audio MidiSport 2x2 Problem

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

Moderators: MattKingUSA, khz

Post Reply
sticks_us
Established Member
Posts: 3
Joined: Thu Dec 05, 2013 10:05 am

M-Audio MidiSport 2x2 Problem

Post by sticks_us »

Hello,

I am new to the forum. I signed up after encountering some problems with my new M-Audio MidiSport (midiman) 2x2 "Anniversary Edition."

I see some of you use it successfully; would anyone care to help me get this working?

Let me know and I can provide more details.

Thanks in advance!

sticks_us
Shadow_7
Established Member
Posts: 175
Joined: Tue Jun 08, 2010 3:35 pm

Re: M-Audio MidiSport 2x2 Problem

Post by Shadow_7 »

http://usb-midi-fw.sourceforge.net/

There's different chipsets and stuff inside, even though those many variants have the same outsides. So you might have to do some trickery, or it might work out of the box. The device page on the m-audio site shows OS X support, so it should work in linux. I have the midi uno which uses the same firmware. Although the one I have seems to be a model that doesn't need firmware.
sticks_us
Established Member
Posts: 3
Joined: Thu Dec 05, 2013 10:05 am

Re: M-Audio MidiSport 2x2 Problem

Post by sticks_us »

Shadow_7, thanks for the reply and the link! Gotta love the quick response time :D

Ok, so here's the brain dump on what I've done so far...Disclaimer: apologies for the long post. It's always difficult to know how much information is "too much," but I figured I'd err on the side of completeness.

I'm using the m-audio midisport 2x2 Anniversary Edition in Ubuntu Studio 13.10. I'd be very grateful for any suggestions.

The "wisdom of the internet" makes it look like this should be a no-brainer...

(see: http://ubuntuforums.org/showthread.php?t=96506 and http://linuxmusicians.com/viewtopic.php?f=6&t=11054 )

...but my experience has been less successful.

Perhaps I've missed a step, but I do think I can say with some confidence that the M-Audio MidiMan/MidiSport 2x2 "Anniversary Edition" is *not* compatible, out-of-the-box with a popular Linux audio platform (Ubutnu Studio), despite what you might have read.

Summary

1. I plugged the MidiSport 2x2 Anniversary edition into my USB port. The green power light came on, and pulsates gently, about 1x/second.
2. After making the usual MIDI connections, I'm not seeing any flashing activity lights as signals are sent (from the computer, or attached device). No MIDI activity detected at OS level either.
3. Several hours of directed (and possibly desperate) troubleshooting later, there's no success.

Repeat with a second device (thought the first one might be DOA).

Context

Operating System (output of uname -a):

Code: Select all

Linux 3.11.0-14-lowlatency #6-Ubuntu SMP PREEMPT Wed Nov 20 23:59:04 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
Computer/Machine: System76 "Wild Dog"

Background

The Internet made me thing this was just a "plug and play" operation. After finding out that it wasn't, I tried the following steps:S

0. Installed midisport-firmware (apt-get install midisport-firmware)
1. Reattached the device, nothing seems to have changed. I get this in /var/log/syslog:

Code: Select all

Dec  5 04:18:52 sticks_us-desktop kernel: [  893.752239] usb 1-1.6: new full-speed USB device number 4 using ehci-pci
Dec  5 04:18:58 sticks_us-desktop kernel: [  898.958226] usb 1-1.6: new full-speed USB device number 5 using ehci-pci
Dec  5 04:18:58 sticks_us-desktop kernel: [  899.044768] usb 1-1.6: New USB device found, idVendor=0763, idProduct=1050
Dec  5 04:18:58 sticks_us-desktop kernel: [  899.044773] usb 1-1.6: New USB device strings: Mfr=1, Product=2, SerialNumber=0
Dec  5 04:18:58 sticks_us-desktop kernel: [  899.044776] usb 1-1.6: Product: MIDISPORT 2x2 Anniv
Dec  5 04:18:58 sticks_us-desktop kernel: [  899.044778] usb 1-1.6: Manufacturer: M-Audio
Dec  5 04:18:58 sticks_us-desktop mtp-probe: checking bus 1, device 5: "/sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.6"
Dec  5 04:18:58 sticks_us-desktop mtp-probe: bus: 1, device: 5 was not an MTP device
Dec  5 04:18:58 sticks_us-desktop kernel: [  899.081195] usbcore: registered new interface driver snd-usb-audio
Dec  5 04:18:58 sticks_us-desktop pulseaudio[1678]: [pulseaudio] module-alsa-card.c: Failed to find a working profile.
Dec  5 04:18:58 sticks_us-desktop pulseaudio[1678]: [pulseaudio] module.c: Failed to load module "module-alsa-card" (argument: "device_id="2" name="usb-M-Audio_MIDISPORT_2x2_Anniv-00-Anniv" card_name="alsa_card.usb-M-Audio_MIDISPORT_2x2_Anniv-00-Anniv" namereg_fail=false tsched=yes fixed_latency_range=no ignore_dB=no deferred_volume=yes use_ucm=yes card_properties="module-udev-detect.discovered=1""): initialization failed.
2. The output of 'aseqdump' and 'aconnect'

Code: Select all

$ aseqdump -l
 Port    Client name                      Port name
  0:0    System                           Timer
  0:1    System                           Announce
 14:0    Midi Through                     Midi Through Port-0
 20:0    MIDISPORT 2x2 Anniv              MIDISPORT 2x2 Anniv MIDI 1
 20:1    MIDISPORT 2x2 Anniv              MIDISPORT 2x2 Anniv MIDI 2

$ aconnect -i
client 0: 'System' [type=kernel]
    0 'Timer           '
    1 'Announce        '
client 14: 'Midi Through' [type=kernel]
    0 'Midi Through Port-0'
client 20: 'MIDISPORT 2x2 Anniv' [type=kernel]
    0 'MIDISPORT 2x2 Anniv MIDI 1'
    1 'MIDISPORT 2x2 Anniv MIDI 2'
3. The output of 'lsusb'

Code: Select all

root@desktop:~# lsusb
Bus 002 Device 003: ID 058f:6364 Alcor Micro Corp. AU6477 Card Reader Controller
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 005: ID 0763:1050 Midiman 
Bus 001 Device 003: ID 046a:0048 Cherry GmbH 
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 002: ID 047d:102c Kensington Iridio
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
4. This looks good, but why no activity? I checked the udev rules file (/lib/udev/rules.d/42-midisport-firmware.rules) that ships with the midisport-firmware, and noticed that the product number wasn't present (there were listings for other similar gear, like 763/1001, 763/1010, etc.) as shown below:

Code: Select all

ACTION=="add", SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ENV{PRODUCT}=="763/1001/*", RUN+="/sbin/fxload -s /usr/share/usb/maudio/MidiSportLoader.ihx -I /usr/share/usb/maudio/MidiSport2x2.ihx"
5. I added my own line (matching the product and device ID from above--Bus 001 Device 005: ID 0763:1050 Midiman), trying to be clever:

Code: Select all

# MidiSport 2x2 Annivesary Edition LEEEEEEEEROY JENKINS
ACTION=="add", SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ENV{PRODUCT}=="763/1050/*", RUN+="/sbin/fxload -s /usr/share/usb/maudio/MidiSportLoader.ihx -I /usr/share/usb/maudio/MidiSport2x2.ihx"
...and still no luck (/var/log/syslog doesn't appear to change after I modify this file).

6. The conventional wisdom is that I need to run 'fxload' to get the firmware pushed to the device, something like

Code: Select all

fxload -I /usr/share/usb/maudio/MidiSport2x2.ihx -D /proc/bus/usb/001/006
...which is where I reach the limits of my linux-fu. My kernel (see above) contains only this in /proc/bus:

Code: Select all

root@desktop:~# ls /proc/bus/
input  pci
Apparently usbfs doesn't exist in Ubuntu Studio (?), and is no longer relevant to this discussion.

One ancient post recommends adding something (none /proc/bus/usb usbfs devgid=46,devmode=664 0 0) to fstab (http://ubuntuforums.org/archive/index.php/t-96506.html). Out of curiosity tried it, but that hangs on reboot.

Ugh...so there it is. Thanks for reading, and thanks for any ideas. :D
Shadow_7
Established Member
Posts: 175
Joined: Tue Jun 08, 2010 3:35 pm

Re: M-Audio MidiSport 2x2 Problem

Post by Shadow_7 »

Code: Select all

$ aseqdump -l
 Port    Client name                      Port name
  0:0    System                           Timer
  0:1    System                           Announce
 14:0    Midi Through                     Midi Through Port-0
 20:0    MIDISPORT 2x2 Anniv              MIDISPORT 2x2 Anniv MIDI 1
 20:1    MIDISPORT 2x2 Anniv              MIDISPORT 2x2 Anniv MIDI 2
You seem to be fine as far as the device goes. My uno blinks, pulses 1x a second too, but works. The same pulse led in windows vista although I didn't have anything in windows to test if it worked there.

Launch a jackd instance for your audio card. Launch a softsynth like fluidsynth / qsynth, timidity, or other options. Launch qjackctl (Jack Control in debians menu system). In qjackctl connect the things as you want them to be. Midi input to the softsynth, softsynth to the playback ports, and such. You can use jack_connect and aconnect to do that to if you're a CLI type. Alternatively launch qmidiroute and connect the midi input to qmidiroute and monitor events.

$ aconnect -iol
User avatar
raboof
Established Member
Posts: 1855
Joined: Tue Apr 08, 2008 11:58 am
Location: Deventer, NL
Has thanked: 50 times
Been thanked: 74 times
Contact:

Re: M-Audio MidiSport 2x2 Problem

Post by raboof »

sticks_us wrote:Perhaps I've missed a step, but I do think I can say with some confidence that the M-Audio MidiMan/MidiSport 2x2 "Anniversary Edition" is *not* compatible, out-of-the-box with a popular Linux audio platform (Ubuntu Studio), despite what you might have read.
Interesting. I have the same device, and for me it really did work out-of-the-box, without the midisport-firmware package.
sticks_us wrote:I get this in /var/log/syslog:

Code: Select all

Dec  5 04:18:58 sticks_us-desktop kernel: [  899.081195] usbcore: registered new interface driver snd-usb-audio
Dec  5 04:18:58 sticks_us-desktop pulseaudio[1678]: [pulseaudio] module-alsa-card.c: Failed to find a working profile.
Dec  5 04:18:58 sticks_us-desktop pulseaudio[1678]: [pulseaudio] module.c: Failed to load module "module-alsa-card" (argument: "device_id="2" name="usb-M-Audio_MIDISPORT_2x2_Anniv-00-Anniv" card_name="alsa_card.usb-M-Audio_MIDISPORT_2x2_Anniv-00-Anniv" namereg_fail=false tsched=yes fixed_latency_range=no ignore_dB=no deferred_volume=yes use_ucm=yes card_properties="module-udev-detect.discovered=1""): initialization failed.
Not sure what that means - I don't have pulseaudio installed myself.

As for the rest of the things you tried, I really think those should only apply to non-anniversary midisport's.

Anyway, taking a step back, you mention:
sticks_us wrote:2. After making the usual MIDI connections, I'm not seeing any flashing activity lights as signals are sent (from the computer, or attached device). No MIDI activity detected at OS level either.
Exactly which software/steps/... are you using here? (I might get into more details and suggestions when I get home tonight)
sticks_us
Established Member
Posts: 3
Joined: Thu Dec 05, 2013 10:05 am

Re: M-Audio MidiSport 2x2 Problem

Post by sticks_us »

Hey, thanks for all your help/interest so far!
Exactly which software/steps/... are you using here? (I might get into more details and suggestions when I get home tonight)
First off, I'd expected to see the MIDI activity lights blink when a signal is received. Seeing nothing, I figured I was out of luck.

However, I'm guessing that's not the case because if I try a tool like aseqdump, the behavior changes.

Here's what I'm trying:

The output of aseqdump

Code: Select all

$ aseqdump -l
 Port    Client name                      Port name
  0:0    System                           Timer
  0:1    System                           Announce
 14:0    Midi Through                     Midi Through Port-0
 20:0    MIDISPORT 2x2 Anniv              MIDISPORT 2x2 Anniv MIDI 1
 20:1    MIDISPORT 2x2 Anniv              MIDISPORT 2x2 Anniv MIDI 2
Then, with the "USB" button depressed ("USB/Merge"--the "In A" LED starts blinking (polling?) faintly), I can play notes on my keyboard and see some good news!

Code: Select all

$ aseqdump -p 20:0
 20:0   Active Sensing
 20:0   Active Sensing
 20:0   Active Sensing
 20:0   Note on                 0, note 53, velocity 76
 20:0   Note on                 0, note 55, velocity 42
 20:0   Note off                0, note 55, velocity 64
 20:0   Note off                0, note 53, velocity 64
(snip)
I haven't done much else, but...maybe this suggests that my connectivity is good? Thanks again for your patience/help. :D
User avatar
raboof
Established Member
Posts: 1855
Joined: Tue Apr 08, 2008 11:58 am
Location: Deventer, NL
Has thanked: 50 times
Been thanked: 74 times
Contact:

Re: M-Audio MidiSport 2x2 Problem

Post by raboof »

sticks_us wrote:Then, with the "USB" button depressed ("USB/Merge"--the "In A" LED starts blinking (polling?) faintly), I can play notes on my keyboard and see some good news!

Code: Select all

$ aseqdump -p 20:0
 20:0   Active Sensing
 20:0   Active Sensing
 20:0   Active Sensing
 20:0   Note on                 0, note 53, velocity 76
 20:0   Note on                 0, note 55, velocity 42
 20:0   Note off                0, note 55, velocity 64
 20:0   Note off                0, note 53, velocity 64
(snip)
I haven't done much else, but...maybe this suggests that my connectivity is good?
That indeed looks good! Let us know if you have any further problems.
Shadow_7
Established Member
Posts: 175
Joined: Tue Jun 08, 2010 3:35 pm

Re: M-Audio MidiSport 2x2 Problem

Post by Shadow_7 »

It could be that the standard usb power isn't high enough amps to fully power the device. You might try a powered usb hub to see if the blinking improves. But as you've seen midi events are reaching your system, so it works per say.

Pulseaudio is a whole other topic. Suffice to say that you don't need it for making music in linux. It's just a nice thing to have working if you have extra resources and like to multi-task. Thinks like java were likely compiled around pulseaudio and without pulseaudio in play you could be missing out on some of the audio elements. Like in one of the browser based java games I play, without pulse I only get the musak track and none of the sound effects.
synchroma
Posts: 1
Joined: Wed May 04, 2016 7:03 pm

Re: M-Audio MidiSport 2x2 Problem

Post by synchroma »

On Debian or Ubuntu, you have to install the midisport-firmware package.
j_e_f_f_g
Established Member
Posts: 2032
Joined: Fri Aug 10, 2012 10:48 pm
Been thanked: 358 times

Re: M-Audio MidiSport 2x2 Problem

Post by j_e_f_f_g »

synchroma wrote:On Debian or Ubuntu, you have to install the midisport-firmware package.
And don't use an old Ubuntu version with Upstart because it breaks that particular package.

Author of BackupBand at https://sourceforge.net/projects/backupband/files/
My fans show their support by mentioning my name in their signature.

Musicmaker
Established Member
Posts: 47
Joined: Sun Oct 19, 2014 2:34 pm
Been thanked: 5 times

Re: M-Audio MidiSport 2x2 Problem

Post by Musicmaker »

I have one 2x2 AE and two 4x4 AE and all work fine out of the box on Ubuntu on the same PC (using them since 14.10 and now 15.10)
The 2x2 has the merge and a normal (through) function, the 4x4 does not.
Normally I do not used a Hub but it works with one too,
Of-course you need check the "merge.through" button is set correctly ? In merge mode there is no data over USB I believe,
To check the unit is not defect. try boot a Ubuntu CD on this or another PC.
Does it work with Windows or other OS ?
M-Audio does not officially support Linux and does not guarantee it works, but so far I had no big issues.
I do sometimes have an issue at power on that it becomes slow, but by USB plugging in/out it's works fine.
That blinking is probably the active sensing data send over the line.
folderol
Established Member
Posts: 2080
Joined: Mon Sep 28, 2015 8:06 pm
Location: Here, of course!
Has thanked: 227 times
Been thanked: 400 times
Contact:

Re: M-Audio MidiSport 2x2 Problem

Post by folderol »

I have one of the original 2x2s and have had no problems with various versions of debian up to and including the current testing - with and without {spit} pulse audio.

At the risk of stating the obvious, are you sure your MIDI cables are OK, and that your hardware is actually sending MIDI data?
The Yoshimi guy {apparently now an 'elderly'}
User avatar
kbongosmusic
Established Member
Posts: 109
Joined: Sun Mar 06, 2016 9:14 pm
Location: Minneapolis

Re: M-Audio MidiSport 2x2 Problem

Post by kbongosmusic »

Hi @sticks_us,
I'd say by your last post it is working. aseqdump is showing keys, note-on midi messages. You are showing two ALSA midi devices. So make note which one works and which one doesn't work. My m-audio Axiom gives me this as well(come out as 24:0 and 24:1., the first(24:0) produces midi notes as expected(using aseqdump -p 24:0). The second one gives me nothing. When I connect it using QJackCtl Connections->ALSA it happens to pick the right one, but I can expand the tree-view and see the 2nd not connected.

So I'd say fire up a synth(yoshi, fluidsynth, whatever you have). Make sure the audio is working - so from yosh, use the virtual keyboard and make sure it produces sound). And/or run a GUI midi monitor program. Route the midi on qjackctl Connect->ALSA tab over to the synth and/or monitor app. You should see on the monitor same note info as from aseqdump, and the synth.

My older m-audio oxygen/radium/keystation keys need the midisport firmware package. Thru the magic of udev it appears to load the firmware when USB enumerates it, the firmware then causes it to re-enumerate or present itself as a slightly different(and compatible) USB MIDI keyboard. My newer Axiom keyboard does not need or use the midisport firmware change.

A long time ago I was very confused by the qjackctl Connect Tabs, where you have Audio(you need to make sure synth is connect to system here), and then two other tabs - one labeled MIDI the other ALSA. The ALSA tab is used to connect the ALSA MIDI keyboard to the Synth. The MIDI tab is for JACK MIDI, which you can generally ignore until you care about JACK MIDI. From my point of view, any real hardware has to go thru ALSA MIDI first, so JACK MIDI is just a complication and confusion factor. So the fact that the JACK tab comes first and is labeled MIDI, and the more important one is labeled ALSA is, to me, just wrong.

To get this stuff working, you need to start with the basics like drivers(that includes ALSA), get that working, then add jack if you need it. So for example if you can't get audio out, I'd suggest trying to take jack out of the picture and configure whatever audio producing App to use ALSA. Once that works, move on to adding and getting JACK working. The MIDI I like to think of as a separate sub-system to the audio. It's just a serial stream of control instructions complete separate from the audio. You are right on base going to the command line aseqmidi to debug it. I tend to go to the alsa speaker-test command line tool(with -c2 -twav) as a basic starting point for audio debugging.

I'm still trying to understand why I would want or need JACK MIDI myself. There are some apps that want to use it, in this case I run a2jmidid from a command prompt and then I can connect from the ALSA tab the ALSA midi devices to the Pass-Through, then on the jack 'MIDI' tab I route a2j to the application. All midi devices get combined into one a2j midi stream which I don't like. I would have to rely on setting the keyboards to different channels for instance. To me, it would seem if Jack Midi were important or needed, it would not have to run this a2j thing, that the Alsa midi devices would just show up for use in qjackctl.

Now, granted, qjackctl is a front end for Jack, right? But, It's a very prominent tool that is included in linux distros, and it's way to easy to get confused about all this stuff working together and tools would preferably point you in the right direction(get ALSA working first, then JACK). I'd be interested in trying to get qjackctl labeling adjusted. So from my point of view, the 'MIDI' tab should be labeled 'JACK-MIDI', and the 'ALSA' tab should be labeled 'ALSA-MIDI' and probably appear before the Jack one.

Sorry, I'm starting to steal your thread here and ranting. Please others pipe in and let me know what you think ;) Pulse-audio, geez, I take that out of the picture on my machines that I want to make music on by re-naming pulseaudio down in the bin folder(to say pulseaudio_NOT). That's pretty crude, but it works for me at the moment. I'll try and add it back in once I feel comfortable trying it(it would be nice if I could play stuff with firefox, youtube, etc). Yes, I know there are odd tools to try and temporarily turn off pulseaudio, or that some odd bridge is going to auto-manage it for me, but it just bothers me that I can't just tell it to turn-off, and I will turn you back on when I want you to(it always thinks it needs to restart itself, ugh, why?).

@sticks_us, give us an update! Cheers and happy music making!
j_e_f_f_g
Established Member
Posts: 2032
Joined: Fri Aug 10, 2012 10:48 pm
Been thanked: 358 times

Re: M-Audio MidiSport 2x2 Problem

Post by j_e_f_f_g »

kbongosmusic wrote:The second one gives me nothing.
A lot of companies use generic chips made by other companies, and buy them in bulk. M-Audio probably bought a lot of usb-midi chips that support two midi busses. But M-audio only used one bus. Still, the chip is designed to tell a computer it contains two usb-midi busses, regardless of the fact one bus is going unused.

Author of BackupBand at https://sourceforge.net/projects/backupband/files/
My fans show their support by mentioning my name in their signature.

Post Reply