Hi, I am trying to get MIDI working on XK-AUDIO-316-MC-AB (the pair of DIN5 connectors on the board) with no success so far.
I don't really need USB MIDI (though the USB MIDI part of the reference sw_usb_audio didn't seem to work too), I want to be able to receive/send MIDI commands from my firmware via those pair of DIN5 connectors. So, I've found app_midi_simple.xc from lib_xua tests, adjusted its CMakeLists.txt to set target like set(APP_HW_TARGET xk-audio-316-mc.xn) and set ports to PORT_MIDI_OUT and PORT_MIDI_IN. Then I have adjusted the transmit function to just send one command midi_send_data(c_midi, byterev(tx_packet)). When I monitor what's being sent on the other side — I get some garbage, regardless of what I am trying to send.
What am I missing? How to properly send/receive MIDI data via the built-in DIN5 connectors? Are they supposed to work?
Thanks.
Problem with XK-AUDIO-316-MC-AB and its MIDI
-
hohoho
- Member
- Posts: 11
- Joined: Tue Jun 02, 2020 3:40 pm
-
infiniteimprobability
Verified - XCore Legend
- Posts: 1185
- Joined: Thu May 27, 2010 10:08 am
Hi,
the DIN connectors on the board do work and MIDI is both simulator tested in XUA and HW regression tested in sw_usb_audio on the XU316 MC board (and previous XU216 too).
If you just want MIDI (without USB) then app_midi_simple.xc is a great place to start. You could do MIDI with lib_uart instead but the USB audio (lib_xua) MIDI (aka UART) implementation is specialised for MIDI being fixed at 31,250 baud and also only using one thread (Tx and Rx optimised into single task) so is more efficient with resources.
What you are doing should work - would you be able to expand on what you mean by garbage? Could you possibly append a capture of what you see?
It is worth probing on the test points of J41 so you see the full 3v3 signal rather than on the MIDI side.
the DIN connectors on the board do work and MIDI is both simulator tested in XUA and HW regression tested in sw_usb_audio on the XU316 MC board (and previous XU216 too).
If you just want MIDI (without USB) then app_midi_simple.xc is a great place to start. You could do MIDI with lib_uart instead but the USB audio (lib_xua) MIDI (aka UART) implementation is specialised for MIDI being fixed at 31,250 baud and also only using one thread (Tx and Rx optimised into single task) so is more efficient with resources.
What you are doing should work - would you be able to expand on what you mean by garbage? Could you possibly append a capture of what you see?
It is worth probing on the test points of J41 so you see the full 3v3 signal rather than on the MIDI side.
Engineer at XMOS
