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

Attempting to probe minilogue XD through logue-sdk fails [Linux] #43

Closed
serratedserenade opened this issue Sep 6, 2020 · 5 comments
Closed

Comments

@serratedserenade
Copy link

serratedserenade commented Sep 6, 2020

Describe the bug
When I try to probe my minilogue through the cli it produces either "Search device request timed out" or "API version request timed out"

To Reproduce
Here is my terminal output:

✘ adamdc@AdamHome  ~/Documents/loguesdk modules/KorgCorrosion102/minilogue xd  logue-cli probe
Error: Could not find matching logue MIDI ports.

Logue interface connection failed.
  Available MIDI inputs:
    in  0: Midi Through:Midi Through Port-0 14:0
    in  1: minilogue xd:minilogue xd MIDI 1 32:0
    in  2: minilogue xd:minilogue xd MIDI 2 32:1

  Available MIDI ouputs:
    out 0: Midi Through:Midi Through Port-0 14:0
    out 1: minilogue xd:minilogue xd MIDI 1 32:0
    out 2: minilogue xd:minilogue xd MIDI 2 32:1

 ✘ adamdc@AdamHome  ~/Documents/loguesdk modules/KorgCorrosion102/minilogue xd  logue-cli probe -i 1 -o 1
Error: Search device request timed out.
Logue handshake failed.
 ✘ adamdc@AdamHome  ~/Documents/loguesdk modules/KorgCorrosion102/minilogue xd  logue-cli probe -i 2 -o 2
Error: API version request timed out.
Logue handshake failed.
 ✘ adamdc@AdamHome  ~/Documents/loguesdk modules/KorgCorrosion102/minilogue xd  logue-cli probe -v -d -i 2 -o 2

>>> { f0, 42, 50, 0, 55, f7 }
<<< { f0, 42, 50, 1, a, 55, 51, 1, 0, 0, 2, 0, 1, 0, f7 }
> Device: minilogue xd
> System version: 2.10
>>> { f0, 42, 32, 0, 1, 51, 17, f7 }
Error: API version request timed out.
Logue handshake failed.

Expected behavior
Able to probe my minilogue xd

Desktop (please complete the following information):
Arch Linux 5.8.5-arch1-1

@msil
Copy link

msil commented Oct 22, 2020

For what it's worth I am seeing exactly the same issue with my minilogue xd and Ubuntu 20.04 (kernel 5.4)

Running latest firmware (v2.10)

@volca02
Copy link

volca02 commented Feb 13, 2021

I am encountering the exact same behavior on arch linux with kernel 5.10. It would seem minilogue does not get the second sysex message or does not respond to it.

I tried using a usb to midi cable, which yielded the same result.

./logue-cli probe -v -d -i 2 -o 2

>>> { f0, 42, 50, 0, 55, f7 }
<<< { f0, 42, 50, 1, 8, 55, 51, 1, 0, 0, 2, 0, 1, 0, f7 }
> Device: minilogue xd
> System version: 2.01
>>> { f0, 42, 30, 0, 1, 51, 17, f7 }
Error: API version request timed out.
Logue handshake failed.

I'd wager this is a problem of the message not being composed well in the first place (can't be sure here, but the third byte differs in my case compared to the report above) or alsa changing the midi message content or outright dropping it.

Either way, after running the logue-cli exactly once on new connection, this is the result:

cat /proc/asound/xd/midi0 
minilogue xd

Output 0
  Tx bytes     : 0
Output 1
  Tx bytes     : 14
Input 0
  Rx bytes     : 0
Input 1
  Rx bytes     : 64

The number of bytes sent is correct, but the received bytes does not match, which is probably okay due to midi clock being sent on the midi out of the minilogue all the time.

Edit: can confirm that sending the sequences logue-cli generates using amidi results in the same behavior:

> amidi -S "F0 42 50 00 55 F7" -d -p hw:4,0,1
F0 42 50 01 08 55 51 01 00 00 02 00 01 00 F7
> amidi -S "F0 42 30 00 01 51 17 F7" -d -p hw:4,0,1
.... nothing ...

@volca02
Copy link

volca02 commented Feb 14, 2021

Okay after digging through this, the issue is simple - logue-cli does not handle MIDI Channel well.

The API version request does not use the correct midi channel - the first response from minilogue reports channel no 9 (hex 8) clearly, yet the second request uses midi channel 1 (hex 0) instead. (As per Korg's own MIDI implementation document, the third byte should be 3g, where g is the midi channel)

Changing the midi channel on minilogue to 1 fixes the issue.

>>> { f0, 42, 50, 0, 55, f7 }
<<< { f0, 42, 50, 1, 0, 55, 51, 1, 0, 0, 2, 0, 1, 0, f7 }
> Device: minilogue xd
> System version: 2.01
>>> { f0, 42, 30, 0, 1, 51, 17, f7 }
<<< { f0, 42, 30, 0, 1, 51, 47, 2, 1, 1, 0, f7 }
> Logue API version: 1.01-0
> Available modules:

>>> { f0, 42, 30, 0, 1, 51, 18, 0, f7 }
<<< { f0, 42, 30, 0, 1, 51, 48, 0, f7 }
Global: no info.
>>> { f0, 42, 30, 0, 1, 51, 18, 1, f7 }
<<< { f0, 42, 30, 0, 1, 51, 48, 1, 0, 1, 74, 1f, 0, 0, 0, 18, 0, 0, 0, 10, f7 }
Modulation FX: [ slot_count: 16, max_payload_size: 8180, max_load_size: 6144 ]
>>> { f0, 42, 30, 0, 1, 51, 18, 2, f7 }
<<< { f0, 42, 30, 0, 1, 51, 48, 2, 0, 1, 70, 3f, 0, 0, 0, 30, 0, 0, 0, 8, f7 }
Delay FX: [ slot_count: 8, max_payload_size: 16368, max_load_size: 12288 ]
>>> { f0, 42, 30, 0, 1, 51, 18, 3, f7 }
<<< { f0, 42, 30, 0, 1, 51, 48, 3, 0, 1, 70, 3f, 0, 0, 0, 30, 0, 0, 0, 8, f7 }
Reverb FX: [ slot_count: 8, max_payload_size: 16368, max_load_size: 12288 ]
>>> { f0, 42, 30, 0, 1, 51, 18, 4, f7 }
<<< { f0, 42, 30, 0, 1, 51, 48, 4, 0, 23, 70, f, 0, 0, 0, 0, 0, 0, 0, 10, f7 }
Oscillator: [ slot_count: 16, max_payload_size: 36848, max_load_size: 32768 ]

... and so on...

The same problem happens with logue-cli.exe (tried that by using it via wine).

Please, Korg, fix the logue-cli utility so it is usable on a different channel than no. 1.

@rafaelpernil2
Copy link

I can confirm. I was having issues with logue-cli using MIDI channel 2. Thanks for the input, @volca02 and I hope KORG fixes this issue.

@znmeb
Copy link

znmeb commented Feb 11, 2023

This might explain some of the issues I've been having with a completely different use case: sending user scales to the Minilogue XD via SysEx from the ODDSound MTS-ESP suite. Maybe I need to specify channel 1 and make sure the Minilogue XD is set to listen on channel 1.

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

No branches or pull requests

5 participants