USB - Audio / MIDI device using external IC?

Go To Last Post
11 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I would like to add USB capability to a circuit I have built, in order to keep things more simple I thought to look into a controller or some sorts that manages the whole stack and whatnot. Are these IC available? Perhaps someone has experience with any? It should support audio device class in order to come up as a MIDI device I think. 

This topic has a solution.
Last Edited: Mon. Mar 28, 2022 - 08:50 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

When using USB there is no realistic possibility of keeping things "simple" or "more simple". 

 

Seriously, I would ignore everything about USB modes and classes except COM ports. Your best option (if you are not already a professional USB designer) is to use the USB-UART  modules (sometimes called "FTDI" boards) to create a COM port on the PC.  These boards nowdays use the CH340-type chips and cost only a dollar or two on eBay.  Your embedded application will format, organize, and use the raw data going back and forth to the PC through its UART.

 

Put your energy and brain cycles into developing a good user-interface on a reliable product, instead of trying to master the mind-numbing, over-engineered mess that is USB.

 

However, Microsoft, with characteristic stupidity, has chosen to assign an arbitrary number to the COM port created (instead of doing something smart like numbering them sequentially as they are created or allowing the user to assign a COM port number to a specific type of device interface).

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I've used FTDI and similar bridges many times, the problem is that DAW software will not recognize UART as a MIDI source. To overcome this you need to use software that would create a virtual MIDI device...

This reply has been marked as the solution. 
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

This was an easy find: USB to MIDI Bridge Controller CH345. Can we assume you've already found and dismissed it.

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Simonetta wrote:
However, Microsoft, with characteristic stupidity, has chosen to assign an arbitrary number to the COM port created (instead of doing something smart like numbering them sequentially as they are created or allowing the user to assign a COM port number to a specific type of device interface).

 

Yes, Microsnot does assign comport numbers, but theres nothing stopping you from going into Device Manager, and changing the port number if you must.

 

My theory on why Windows assigns the way it does has to do with the hardware.  Say you plug in com widget A and it assigns port 3 to that widget, Widget B gets port 4.  You then configure your software to communicate with teh com port of the widget you want that software to talk to.  Windows keeps track of the comport based on teh widget and each time that widget is plugged in and enumerates, it gets that same Com Port number to coincide with the software so you do not have to re-configure the software each time its launched.

 

Same goes for widget B, and so on.

 

Just my observation, might not be right, but then again...might be right too.

 

JIm

I would rather attempt something great and fail, than attempt nothing and succeed - Fortune Cookie

 

"The critical shortage here is not stuff, but time." - Johan Ekdahl

 

"Step N is required before you can do step N+1!" - ka7ehk

 

"If you want a career with a known path - become an undertaker. Dead people don't sue!" - Kartman

"Why is there a "Highway to Hell" and only a "Stairway to Heaven"? A prediction of the expected traffic load?"  - Lee "theusch"

 

Speak sweetly. It makes your words easier to digest when at a later date you have to eat them ;-)  - Source Unknown

Please Read: Code-of-Conduct

Atmel Studio6.2/AS7, DipTrace, Quartus, MPLAB, RSLogix user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Same goes for widget B, and so on.

There is an app to clear out the memory of the chip assignments. It gets to be an issue on a production line when new units are getting plugged in right & left for testing, cal, etc. All of a sudden you get to com100 or such and troubles may occur somewhere in the chain (such as the app only allowing a comm 1-30 selection).

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

How to clear com ports:

https://blogs.gwu.edu/ecelabs/20...

 

Interesting reference to a certain well known product wink

 

Jim

I would rather attempt something great and fail, than attempt nothing and succeed - Fortune Cookie

 

"The critical shortage here is not stuff, but time." - Johan Ekdahl

 

"Step N is required before you can do step N+1!" - ka7ehk

 

"If you want a career with a known path - become an undertaker. Dead people don't sue!" - Kartman

"Why is there a "Highway to Hell" and only a "Stairway to Heaven"? A prediction of the expected traffic load?"  - Lee "theusch"

 

Speak sweetly. It makes your words easier to digest when at a later date you have to eat them ;-)  - Source Unknown

Please Read: Code-of-Conduct

Atmel Studio6.2/AS7, DipTrace, Quartus, MPLAB, RSLogix user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

N.Winterbottom wrote:

This was an easy find: USB to MIDI Bridge Controller CH345. Can we assume you've already found and dismissed it.

 

 

I've searched more abstract terms laugh

Thanks!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

There is another trick, that was not widely published...you could force windows to not generate a new port in the first place (keep using the same one for different units)

 

http://dangerousprototypes.com/b...

 

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If you are not manufacturing hundreds of these devices, and only need less than five or ten, then I recommend getting pre-made USB-MIDI "purple egg" interfaces from eBay. They are only about $5-10 each and will save you lots of development time and debugging troubles: https://www.ebay.com/itm/3035205...

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

 

Simonetta wrote:
recommend getting pre-made USB-MIDI "purple egg" interfaces from eBay.
I've got one of those (GBP 4):

 

https://github.com/wrightflyer/S...

 

 

Not purple in this case but works nicely nonetheless!

 

BTW you didn't ask for this but, when tinkering with MIDI, I also have and find this very useful:

 

https://www.doremidi.cn/h-pd-2.html

On AliExpress

 

 

As modern MIDI controllers don't actually have MIDI (well they do but usually not 5pin DIN MIDI), they just have MIDI over USB so if you have a device you are working on with a proper 5 pin MIDI interface you cannot connect such a controller directly to it. Or rather you can't until you get one of these. It's effectively a "little PC in a box". It has a USB host port into which you can plug a modern style MIDI controller and it then gives it good old fashioned 5 pin DIN MIDI that it otherwise would not have.

 

Very useful!

Last Edited: Tue. Mar 29, 2022 - 08:31 AM