Jump to content

USB Host?


widdly
 Share

Recommended Posts

Ah yes I missed the MIDI bit from your post TK!

I'm not sure how USB Host MIDI would work though as it would need to support a number of different USB MIDI devices to be useful?

I seem to remember this was discussed a few months ago as somebody was looking to do a commercial project with USB Host support....

Phil

Link to comment
Share on other sites

Unfortunately it's in japanese but this site is the one I was thinking of. It's based of the USBhostlite examples.

http://www.rjblog.net/archives/2009/e000331.php

translated...

http://translate.google.com.sg/translate?hl=en&sl=ja&u=http://www.rjblog.net/archives/2009/e000331.php&ei=K5S8TtuDMKWH4gTO_ISABA&sa=X&oi=translate&ct=result&resnum=1&ved=0CB8Q7gEwAA&prev=/search%3Fq%3Dhttp://www.rjblog.net/archives/2009/e000331.php%26hl%3Den%26biw%3D1366%26bih%3D704%26prmd%3Dimvns

There is source code included. The source code has a parser for the usb descriptors, checking if they are audio devices with midi streaming. Usbhostlite has an interrupt and a blocking function Host_ProcessTD that fills a buffer from the USB port. Other than the first byte, the buffer is written straight to a serial midi port. The example doesn't have any hotplugging implementation other than exiting if the midi usb is disconnected.

There is a description of the first byte content in the USB midi spec, on page 16...

http://www.usb.org/developers/devclass_docs/midi10.pdf

I'm not sure on the hardware side but perhaps this post might be helpful in setting up the physical USB host port on the LPC1768...

http://knowledgebase.nxp.com/showthread.php?t=2064

I would think class compliant USB-midi support would be the way to go. I imagine support for custom stuff would be a nightmare. Although support for the novation launchpad would be a neat way to add a BLM without all the soldering.

edit..

Actually looking more closely at the code from the japanese site, it doesn't look quite right. The MIDI_ParseConfiguration function is never called. I'm guessing he must have modified the usbhostlite function Host_EnumDev to call MIDI_ParseConfiguration instead of MS_ParseConfiguration.

Edited by widdly
Link to comment
Share on other sites

I would think class compliant USB-midi support would be the way to go. I imagine support for custom stuff would be a nightmare. Although support for the novation launchpad would be a neat way to add a BLM without all the soldering.

Oh wow, this would be the perfect use for my Novation Launchpad. It has only been collecting dust so far :)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...