MIDI device class not working.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MIDI device class not working.

1,038 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by smoorby on Thu Apr 19 14:55:31 MST 2012
Hi all,

I've tried using the MIDI device class but have problems in both the IN and OUT directions. 

In the OUT direction I get some MIDI events but a lot of garbage too.  The data returned by MIDI_Device_ReceiveEventPacket sometimes but not always contains valid MIDI events.  Also the rate and number of events doesn't match what I know is being sent from the host. Looking at the code the problem is with the Endpoint_Read_Stream_LE() function which does not correctly consume the bytes received.  I've already commented on this in the context of the virtual serial device topic. I've done a fix which seems to work for MIDI out.  I hope a similar fix for CDCClassDevice.c will work too (haven't tried it yet).

Don't know what the problem is with MIDI IN, I don't see any bulk in traffic at the host.  The code appears to be sending the MIDI events but I'm not seeing them using usbmon.  I do get bulk in traffic with the CDC example code so I'm going to use that to help me debug.

Regards
Steve

P.S. The code base I'm working with is v0.94

Original Attachment has been moved to: MIDIClassDevice.c.zip

Original Attachment has been moved to: EndpointStream_LPC.c.zip

Labels (1)
0 Kudos
1 Reply

783 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by boston on Mon May 20 09:03:07 MST 2013

I'm trying to use MIDI over USB myself. Have you made any progress on these problems? Do you mind sharing examples of using the USB MIDI library functions to transmit MIDI data from a device to host. Thanks and good luck.

0 Kudos