Not opening midi out port on some controllers (EASY FIX)

Bug #1165501 reported by shalty
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mixxx
Fix Released
Low
RJ Skerry-Ryan

Bug Description

Using korg nanoKontrol2 i can't use led's because the midiout port is not opened.

Seeing the code, at QList<Controller*> PortMidiEnumerator::queryDevices() it lacks another check... in my controller, the ports are those:

Debug [Controller]: Found output device # 3 nanoKONTROL2 1 CTRL
Debug [Controller]: Found input device # 1 nanoKONTROL2 1 SLIDER/KNOB

So, as this code only wants same name or with a to/from pattern, it fails and only maps input. Should be easy to change.

Related branches

Revision history for this message
rob (another-rob) wrote :

Have you used the Korg config software to set the LED mode to "external"? If you haven't done that, the NanoKontrol2 won't respond to external LED messages.

There's a bit more detail on that and a link to the Korg config software on the forum page for my Nanokontrol2 mapping:
http://www.mixxx.org/forums/viewtopic.php?f=7&t=4759

Revision history for this message
shalty (neogeo-dc) wrote :

Yes.

I have seen all the documentation on Korg's site (including parameters guide), and I have tested it (works fine) with the demo tracktor version.

The mapping on the forums it doesn't work for me (the led part, that is, the rest is fine). I have done a reset of the device, so it's standar configuration, CC mode, LED external. No weird config, no scene changing.

Using Korg usb midi driver (usermode driver 1.14.00.04, kernel driver 1.07.00.01) in win8 x64, firm 1.03. The only option apparently on the drivers is to remove the " 1 " (midi port) from the input/output midi name.

Revision history for this message
rob (another-rob) wrote :

Hm. I use Linux, and the Nanokontrol2 works fine for me, LEDs and all. I'll put a note in the mapping thread pointing to this bug to see if other windows people are having the same problem.

Revision history for this message
shalty (neogeo-dc) wrote :

I've done a fast test on a ubuntu vmware, and with the mapping on the forum led works fine.

The log:

Debug [Main]: Scanning PortMIDI devices:
Debug [Main]: Found output device # 2 nanoKONTROL2 MIDI 1
Debug [Main]: Found input device # 3 nanoKONTROL2 MIDI 1
Debug [Main]: Linking to output device # 2 "nanoKONTROL2 MIDI 1"

So i assume is working well because the name is the same for both. What i don't know is why under windows i have different names... probably because of the korg midi driver (and not the windows standard one).

If you see the screenshots for the korg's kontrol editor you'll see on the screenshots the same midi names assigned as i have.

Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

Hm, it's actually a little complicated and as you can see we're pretty conservative in what we allow to be linked.

Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

I added a heuristic that tries to link devices based on pattern-matching in r3810.

shalty -- could you give it a try?
http://builds.mixxx.org/builds/release-1.11.x/r3810

Changed in mixxx:
milestone: none → 1.11.0
assignee: nobody → RJ Ryan (rryan)
importance: Undecided → Low
status: New → Fix Committed
Revision history for this message
shalty (neogeo-dc) wrote :

I have tested with both, 3810 and 3811 and it fails exactly the same as before...

Debug [Controller]: Found output device # 3 nanoKONTROL2 1 CTRL
Debug [Controller]: Found input device # 1 nanoKONTROL2 1 SLIDER/KNOB
...
Debug [Controller]: Opening controller: "nanoKONTROL2 1 SLIDER/KNOB"
Debug [Controller]: PortMidiController: Opening nanoKONTROL2 1 SLIDER/KNOB index 1 for input
Debug [Controller]: Starting engine
Debug [Controller]: Controller in script engine is: "nanoKONTROL2 1 SLIDER/KNOB"

Allright , that's not an "easy" fix, my mistake.

After looking at the code changes, i think that the problem is in the MIDI regexp... i'm afraid that the different "device ID strings" from windows and linux has mislead you, windows doesn't have the MIDI substring, and the windows one doesn't give you an obvious "token".

In fact, i understand your "conservativeness" (better to have no leds than bad inputs), but i don't know even if there is a generic rule for this. In fact, if it has worked for everybody till now...

A possible solution would be a "white list" of specific models strings (for known exceptions), or even a user-managed one (where you could map in/out ports especifically), but it's a lot of work more, obviously.

Or i can always make a build env. and patch myself my own version, i don't want to spend people time for a bug that only affects me :)

Revision history for this message
shalty (neogeo-dc) wrote :

FWIW, after uninstalling the official korg midi driver (and removing the leftovers), everything works as expected:

Debug [Controller]: Found output device # 3 nanoKONTROL2
Debug [Controller]: Found input device # 1 nanoKONTROL2
Debug [Controller]: Linking to output device # 3 "nanoKONTROL2"

The only reason i installed it in the first place was because the documentation (of the device) says so, but if the standard windows driver works well enough, that's problem solved (for me at least).

RJ Skerry-Ryan (rryan)
Changed in mixxx:
status: Fix Committed → Triaged
Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

Thanks for the debug info Shalty -- I did misread what you had posted before. I added another heuristic and added your test strings to the test suite so I am sure it is fixed now :). Glad to hear the workaround of uninstalling the Korg driver works though.

Changed in mixxx:
status: Triaged → Fix Committed
Revision history for this message
shalty (neogeo-dc) wrote :

After re-installing korg's midi driver, it works fine now (i'm using build 3825)

Debug [Controller]: Found output device # 3 nanoKONTROL2 1 CTRL
Debug [Controller]: Found input device # 1 nanoKONTROL2 1 SLIDER/KNOB
Debug [Controller]: Linking to output device # 3 "nanoKONTROL2 1 CTRL"

Thank you, Ryan!

RJ Skerry-Ryan (rryan)
Changed in mixxx:
status: Fix Committed → Fix Released
Revision history for this message
Swiftb0y (swiftb0y) wrote :

Mixxx now uses GitHub for bug tracking. This bug has been migrated to:
https://github.com/mixxxdj/mixxx/issues/6980

lock status: Metadata changes locked and limited to project staff
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.