Skip to search.
lpc2000 · LPC ARM Group

Group Information

  • Members: 7405
  • Category: Microcontrollers
  • Founded: Nov 17, 2003
  • Language: English
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Real people. Real stories. See how Yahoo! Groups impacts members worldwide.

Messages

  Messages Help
Advanced
USB Device Class for MIDI - followup   Message List  
Reply Message #44602 of 57401 |
Re: USB Device Class for MIDI - followup

The implementation of USB audio MIDI class is easy.
It's good for exercise of class implementation.
Then, try it.

0) Start with an existing USB example, such as HID, CDC (virtual COM port).
Confirm that this example works on your board - if not, fix it.

1) Descriptor work
Replace the descriptors following the example on the USB MIDI spec.

http://www.usb.org/developers/devclass_docs/midi10.pdf
Appendix B. Example: Simple MIDI Adapter (p37)

This PIC descriptor is coded with above example.
http://www.microchip.com/forums/tm.aspx?m=371796&mpage=2#376451
Modifying a little for LPC, it is directly available for you.

Device descriptor
- Vendor ID / Product ID
Apply a temporary pair, such as 0xFFFF/0x0000, for development
Before releasing your device, get an official one.

Configuration set
Move IN and OUT endpoint address (bEndpointAddress) to EP2 for bulk.

With this change, your device is recognized as a MIDI device immediately, when
it is connected to a PC. But to make it work, you have to add a little more code
to it.

2) Endpoint work
In and OUT endpoints exchange USB-MIDI event packets, defined on this chapter of
the spec.

http://www.usb.org/developers/devclass_docs/midi10.pdf
4 USB-MIDI Event Packets (p16)

As this chapter describes, USB add a prefix byte before usual 3-byte MIDI
packet.
Put this 4-byte packet(s) to the IN endpoint 2, when the device sees key make/
release.

3) Clean up your code

That's all.

Tsuneo

--- In lpc2000@yahoogroups.com, "radim100" <radim100@...> wrote:
>
> I was just wondering if anybody has some LPC214X or LPC2100 based
> MIDI USB Class code available to share .
> Thanks. Radim
>





Mon Sep 7, 2009 9:36 am

t_chinzei
Offline Offline
Send Email Send Email

Message #44602 of 57401 |
Expand Messages Author Sort by Date

I was just wondering if anybody has some LPC214X or LPC2100 based MIDI USB Class code available to share . Thanks. Radim...
radim100 Offline Send Email Sep 5, 2009
6:09 pm

The implementation of USB audio MIDI class is easy. It's good for exercise of class implementation. Then, try it. 0) Start with an existing USB example, such...
t_chinzei Offline Send Email Sep 7, 2009
9:36 am

Hello everyone, I found this topic about USB-MIDI to be already very helpful in designing a simple MIDI device using the LPC2148. Following the steps provided...
nilstijtgat Offline Send Email Dec 5, 2010
10:45 am

Hello Nils, can you tell us what you have taken as base for your implementation. I never have implemented MIDI with lpcusb, but when midi uses bulk endpoints,...
capiman26061973 Offline Send Email Dec 5, 2010
11:42 am

I used the HID example which comes as an example with the LPCUSB stack (main_hid.c). I used this file because Tsuneo suggested to start with a HID or CDC...
nilstijtgat Offline Send Email Dec 5, 2010
12:14 pm

Hello Nils, sorry, last email was very quick, my family called for lunch :-) If you have a look into main_serial.c There is a function static void BulkOut(U8...
capiman26061973 Offline Send Email Dec 5, 2010
12:27 pm
Advanced

Copyright © 2010 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines NEW - Help