Debugging MIDI

I’m having an issue getting my usb midi controller to be recognized by the zynthian.

When I go in through the terminal, when I do lsusb, I see the midi controller.
When I do amidi -l at the terminal, I see the controller listed as well.

However, the devices are not showing up on the “Select Midi Input…” screen.

When I do jack_lsp, I don’t see it. The a2jmidid is running.

I’m not sure what the next step in debugging this is. A handy list of steps for debugging midi problems would be useful (the wiki page on this topic is blank.)

Hi @ralmond !

What if you give some context info to help us to help you? We really want to do it but we can’t if you don’t give us all the details :grin:

  • What version of zynthian are you using? A screenshot of webconf dashboard would be nice.
  • What hardware are you using? Detailed, please.
  • What is the brand and model of your MIDI controller?
  • Etc.

No info because almost nobody has this kind of issues because it’s really rare that a MIDI controller is not recognized at all.

BTW, could you send the output of this command:

jack_lsp -A

Thanks!

1 Like

For the record, I was using the 5.10.103-v7l+ on a V5 when I was having the issues. I’ve since upgraded to ORAM. The USB-MIDI issues have gone away, but I’m having some wifi issues.

I’ve made some progress here. I’ve upgraded to ORAM (the 5-22 version and applied patches).

At this point, I’m now properly seeing wired midi connection, but my WIDI UHost is not showing up on the capture screen.

Here is the output from lsusb

(venv) root@zynthian:~# lsusb
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 006: ID 09e8:0076 AKAI  Professional M.I. Corp. LPK25 MIDI Keyboard
Bus 001 Device 007: ID 7104:1001 CME (Central Music Co.) WIDI Uhost
Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Next from amidi -l

(venv) root@zynthian:~# amidi -l
Dir Device    Name
IO  hw:2,0    f_midi
IO  hw:3,0,0  WIDI Uhost MIDI 1
IO  hw:4,0,0  LPK25 MIDI 1

And now from jack_lsp -A (some redundant lines deleted).

(venv) root@zynthian:~# jack_lsp -A
system:capture_1
   alsa_pcm:hw:sndrpihifiberry:out1
system:capture_2
   alsa_pcm:hw:sndrpihifiberry:out2
system:playback_1
   alsa_pcm:hw:sndrpihifiberry:in1
system:playback_2
   alsa_pcm:hw:sndrpihifiberry:in2
system:midi_capture_1
   USB:f_midi OUT 1 IN 1
   USB HOST
system:midi_playback_1
   USB:f_midi IN 1 OUT 1
   USB HOST
ttymidi:MIDI_in
   ttymidi:MIDI_in
   DIN-5 MIDI
ttymidi:MIDI_out
   ttymidi:MIDI_out
   DIN-5 MIDI
a2j:Midi Through [14] (capture): Midi Through Port-0
a2j:Midi Through [14] (playback): Midi Through Port-0
ZynMidiRouter:dev0_in
...
ZynMidiRouter:dev23_out
ZynMaster:midi_in
   ZynMaster:midi_in
   CV/Gate
ZynMaster:midi_out
   ZynMaster:midi_out
   CV/Gate
zynmixer:input_01a
...
zynmixer:output_17b
zynseq:input
zynseq:output
zynseq:metronome
zynsmf:midi_out
zynsmf:midi_in
audioplayer:in
audioplayer:out_01a
audioplayer:out_01b
system:midi_capture_6
   in-hw-3-0-0-WIDI-Uhost-MIDI-1
system:midi_playback_6
   out-hw-3-0-0-WIDI-Uhost-MIDI-1
zynaddsubfx:out-L
zynaddsubfx:out-R
...
zynaddsubfx-01:midi_input
system:midi_capture_5
   USB:1.1.4/LPK25 IN 1
   LPK25
system:midi_playback_5
   USB:1.1.4/LPK25 OUT 1
   LPK25

Finally, here is what shows on the front panel of my Zynthian:

Capture Midi from ...
Internal Devices
X -> DIN-5 MIDI
X -CV/Gate
USB Devices
O -> LPK25

So the LPK25 (which is a direct wire USB midi controller) shows in the input list, but the WIDI UHost (which is a BLE midi link device) does not show, whether or not there is a controller attached through bluetooth.

Not sure the next step in debugging this.

Hi @ralmond!

This is odd! So that we can be absolutely clear of your configuration, will you confirm that you flashed a fresh image of/2024-05-22-zynthianos-bookworm-aarch64-oram-2405 to a uSD card, inserted in the Zynthian, powered and waited for the reboot (after initial config) then performed an update within the Zynthian UI or webconf? You have not done anything else manually, like change config files, installed drivers, etc.?

[Edit] And, is Bluetooth enabled in the admin/bluetooth menu? Does the WIDI device appear there? (I would assume not but it may be worth playing with the settings there to see if it has any effect, e.g. disable Bluetooth / enable Bluetooth, etc.)

[Edit] Sorry - the result from jack_lsp didn’t scroll. I now see the MIDI device is shown in jack. I will look at the code to see why it isn’t appearing in Zynthian. Will you please raise a ticket in github, preferably using the “Report Issue” button in webconf? When you report, please include the output of cat /proc/asound/card3/midi0 and cat /proc/asound/card3/usbbus.

2 Likes

I did do a few extra steps in the install.

  1. reformatted the card to a single partition.
  2. Copied the 2024-05-22 image to the SD card.
  3. Remounted the card, and manually increased the size of the /rootfs partition to fill the card.
  4. Copied some soundfont files into the /zynthian/zynthinan-mydata directory.
  5. Unmounted the card from my computer and installed in the zynthian.
  6. Went through the first book cycle
  7. Attached to my home network.
  8. Ran the zynthian-update.sh script.

I don’t think anything I did would affect the jack/alsa stack.

I believe I had the internal bluetooth turned off, but I will try a few different ways tonight.

BTW, I talked with CTE tech support, and he offered to send you a UHost WIDI adapter if that would help your testing. (Not sure you how much you can test if you don’t have a MIDI BLE controller handy).

Is there some other log file I should be looking at?

This is not required. The image contains 2 partitions and should be written to the whole media.

This is not required - Zynthian first boot script does this.

This can be done after first boot.

It is best to update through the GUI or webconf.

That may be advantageous.

I have some BLE devices that connect to Zynthian’s Bluetooth controller - I am not sure whether CTE may intefere with this.

Please see my previous comment about adding a ticket to issue tracker and the info from commands that will help.

Hello,

I think there is either a problem with @ralmond raspberry pi or WIDI Uhost. This combination of hardwares works for me.

The problem must be somewhere on the USB side. WIDI Uhost manages the BLE connection itself, as I wrote above, and its BLE is independent of the BLE of Zynthian.

— EDIT: I find that my jack shows WIDI Uhost, on the @ralmond list is not WIDI Uhost —

EDIT2: The difference is:
my setup:

system:midi_capture_1
   USB:1.1.1.1/WIDI Uhost IN 1
   WIDI Uhost
system:midi_playback_1
   USB:1.1.1.1/WIDI Uhost OUT 1
   WIDI Uhost

@ralmond :

system:midi_capture_6
   in-hw-3-0-0-WIDI-Uhost-MIDI-1
system:midi_playback_6
   out-hw-3-0-0-WIDI-Uhost-MIDI-1

Here are all the listings as with @ralmond .

lsusb

Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 002: ID 05e3:0626 Genesys Logic, Inc. Hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 005: ID 04d9:0007 Holtek Semiconductor, Inc. Raspberry Pi Internal Keyboard
Bus 001 Device 004: ID 0484:5750 Specialix 7H Custom Human interface
Bus 001 Device 007: ID 09e8:006d AKAI  Professional M.I. Corp. EWI electronic wind instrument
Bus 001 Device 006: ID 7104:1001 CME (Central Music Co.) WIDI Uhost
Bus 001 Device 003: ID 05e3:0610 Genesys Logic, Inc. Hub
Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

amidi -l

Dir Device    Name
IO  hw:1,0,0  WIDI Uhost MIDI 1
IO  hw:2,0,0  EWI-USB EWI-USB
IO  hw:4,0    f_midi

jack_lsp -A

system:playback_1
   alsa_pcm:hw:sndrpihifiberry:in1
system:playback_2
   alsa_pcm:hw:sndrpihifiberry:in2
system:midi_capture_1
   USB:1.1.1.1/WIDI Uhost IN 1
   WIDI Uhost
system:midi_playback_1
   USB:1.1.1.1/WIDI Uhost OUT 1
   WIDI Uhost
system:midi_capture_2
   USB:1.1.1.3/EWI-USB IN 1
   EWI-USB
system:midi_playback_2
   USB:1.1.1.3/EWI-USB OUT 1
   EWI-USB
system:midi_capture_3
   USB:f_midi OUT 1 IN 1
   USB HOST
system:midi_playback_3
   USB:f_midi IN 1 OUT 1
   USB HOST
ttymidi:MIDI_in
   ttymidi:MIDI_in
   DIN-5 MIDI
ttymidi:MIDI_out
   ttymidi:MIDI_out
   DIN-5 MIDI
a2j:Midi Through [14] (capture): Midi Through Port-0
a2j:Midi Through [14] (playback): Midi Through Port-0

screenshot form MIDI Input Devices window

Info about my Zynthian

HARDWARE

Raspberry Pi 400 Rev 1.1
Audio: HifiBerry DAC+
Display: WaveShare 7 HDMI+USB 1024x600
Wiring: DUMMIES
I2C: Not detected
Profile:

SYSTEM

Debian GNU/Linux 12 (bookworm)
Build Date: 2024-03-01
Memory: 11% (437M/3792M)
SD Card: 49% (14G/29G)
Temperature: 36.0ºC
Overclock: None

MIDI & UI

Tuning: 440 Hz
Master Channel: Off
Preload Presets: On
ZS3 (SubSnapShots): On
Power Save: 60 minutes
Audio Levels on Snapshots: On

SOFTWARE

zyncoder: oram (e0014fe)
zynthian-ui: oram (9c58b3e)
zynthian-sys: oram (943713b)
zynthian-data: oram (e222e11)
zynthian-webconf: oram (2dba270)

And this is my zynthian setup on table