Jump to content

Making a USB to MIDI Interface


vsmGuy
 Share

Recommended Posts

Hi,

In August 2005, N&V had published Robert Lang's Midi-nator design, which showed that a hobbyist could create a USB-based MIDI device.

I had made one, but now the problem is that the software works only on Win XP and I need to update my systems to Vista, and I would rather shift to openSuse.

It seems like you guys are the last (and the first) word in MIDI designs, and I had a look at all the "stuff" and frankly I am overwhelmed by it all.

I just can't understand which project I need to build (like the Midi-nator design) so that I can hook up my synth to the USB port.

Note that I have amix of USB1.1 and USB2.0 ports .. will that make a difference?

Link to comment
Share on other sites

well you have two options

you can either go for the gm5 which has usb to midi with one in-out physical port and the others as digital or you can go for the gm5x5x5 five in and out midi interface.

do a search for these on the forum also hit the ucapps button on the top of this page to goto the ucapps.de site and look in the left hand menu scroll down till you see the gm5 listed click and read, then read more.

Link to comment
Share on other sites

I have written a "system-side" USB MIDI driver for a personal computer. Based on that, I can tell you that writing USB software is NOT trivial. It's really a tall order to get it working, and a much taller one to get it working right.

I can also tell you that USB-MIDI interfaces fall into two groups: Those that have a "custom" driver, and those that are "Class-Compliant" (Meaning they will work with the OS "standard" driver). Some devices have a switch to select which way you want it.

What you'll find around here includes :

USB-PIC interface that was abandoned because the PIC hardware wasn't quite right.

Cypress AN2131SC device, but that chip is no longer available.

The new Core32 device with built-in USB, but it's still in development.

GM5 1 in 1 out, pre-programmed, very reasonable price and works great.

GM5X5X5 5 in, 5 out, the board is designed by MIDIBoxers, same chip as above.

So there's all of them. The GM5's really are your best choice, for the reasons above.

They work using "class compliant" drivers, so most OS's already have the drivers built in, or you

can download the ploytec specific drivers. They are tested by a lot of people here, and everyone seems happy. The cost is excellent, but you may have to wait for the next "bulk order".

regarding USB1.1 vs 2.0, 1.1 is plenty fast for MIDI.. so either should be fine.

Have Fun,

LyleHaze

Link to comment
Share on other sites

Thanks for the replies.

Wow .. my choices are pretty limited.

I would rather stay out of ordering custom silicon.

I have experienced this before - you have to wait for a long lead time first, and later if it stops working, you have to wait even more, and the wait tends to become infinite as the years go by and companies rise and fall. I would rather not face this again.

From what I see, the best choice would be the PIC based solution.

What were/is the issues with it?

Would it be able to do the USB <-> MIDI conversion that I want?

Link to comment
Share on other sites

there a quite a few guys here that have spare gm5 boards and chips, put up a request in the fleamarket thats wht i have done, they will oblige you if they have spares to offer. the usb gm5 is fine and the chip is a new product from ploytec.

the gm5 will do everything you want its the most sensible choice to make really

Link to comment
Share on other sites

...The GM5's really are your best choice, for the reasons above...

ditto

...the usb gm5 is fine and the chip is a new product from ploytec...the gm5 will do everything you want its the most sensible choice to make really

ditto

Don't be put off by this one. It really is an excellent USB MIDI interface. It is much better than my M-Audio USB MIDI interface. Class drivers are fine, and custom drivers are better still. I don't use Vista, but I imagine some here would, so just do your reading.

Check out Ploytec to see what they are about. They are a commercial venture. TK arranged a bulk order of their chips w/ drivers for this community. There is really no reason to be concerned about their devices.

For the price of the chips, you could quite happily buy several of these, and keep some for spares, if you like.

Link to comment
Share on other sites

Why do I have this feeling that the GM5 is a buy-from-ATMEL-today AVR with a customized firmware?

In that case, what's up with the bulk orders when all they need to do is sell the firmware?

Unlike most of the projects here, the GM5 chip is a commercial product.

Ploytec gets to make all the choices regarding how to distribute their property.

I think the bulk orders they have filled for our community represent excellent value, as well as an unusual willingness to work with hobbyists.

Because the GM5 is "closed", I really don't care what silicon it's running on. But that's just my opinion.

:-)

LyleHaze

Link to comment
Share on other sites

Why do I have this feeling that the GM5 is a buy-from-ATMEL-today AVR with a customized firmware?

probably because that's what it is ;)

In that case, what's up with the bulk orders when all they need to do is sell the firmware?

and how would you think they'd be able to protect their intellectual property, is there something as a viable copy protection for .hex files? I guess not.

Anyway, the GM5 is quite cheap, not much more expensive than the plain USB AVR and does a great job for the money. If you don't like their way of business for whatever reasons you might have, just don't use it. DIYing a Midi interface, especially if you need only one port (you said "hook up my synth" - singular), won't be so much cheaper than simply buying e.g. a MidiSport Uno.

S

Link to comment
Share on other sites

then prehaps nothing we suggest will suffice for you then, the gm5 is the most easiest interface to use with either mios for future projects or as an interface in its own right, laso the very fact you can get it as a 5x5 x5 module from the guys here and the fact that the last group buy on that setup was gone in no time shows how well the units operate for everyone in this community

we have all tried to give you a good reason to use the gm5 and as the chips are cheap on a bulk buy that tk arranges they dont cost much per chip either , neither do the pcbs, by the time you have built it you have got one much cheaper than the off the shelf one.

i cant hang around here...... bttd

Link to comment
Share on other sites

You should also note that the GM5 handles sysex transfers correctly, which you may not get from a cheap commercial product.

If you really like DIY design for its own sake, then you may as well go ahead. Personally, I would rather waste my time writing crap music than re-inventing the MIDI interface.

Anyway, I think it's a no brainer.

i cant hang around here...... bttd

nuf said

Link to comment
Share on other sites

I really appreciate your help and efforts into giving the answers guys.

Thanks a lot for your time.

The GM5 is really cheap, and has the "bang for the buck" - really a nice design.

Yet it's an overkill for my needs - maybe when I become more serious.

It's not the cost that is a factor, it's far too cheap tp be. What matters to me is I have no specific lead time should the part go wrong, especially since it's a DIY.

I am really not sure if I sysex transfers are a priority for me for my specific scenario?

Anyways, thanks a lot really, and I apologize if I rubbed anyone the wrong way - I honestly did not mean to.

Good day.

Link to comment
Share on other sites

its not that you have rubbed anyone up the wrong way , far from it.

we are just curious as to why you dismiss the gm5 so easily? ploytec are not some fly by night company and are making new developments all the time.

the gm5 is a nice basic usb interface and will do exactly what you wanted one for, but it also has the functionality to be expanded on should you so wish.

failing that, if you just want a cheap simple off the shelf interface that just does what it does then you will find hndreds of usb-midi interfaces on ebay for a couple of bux

the gm5 is a nice little bit of kit and something good for a build and its handy because of its size, the thing is bloody tiny! then at a later date say you fancied making a core and some modules you can control it with the gm5 using the onboard ports. all good points to this unit.

the pic one that you refer to is another chioce ut your in for a little bit extra work and setup  etc.

for what you want to do and the sheer cheapness and simplicity of it the gm5 gives you more bang for your buck.

Link to comment
Share on other sites

What matters to me is I have no specific lead time should the part go wrong, especially since it's a DIY.

Because it works with "Class compatible" drivers, the GM5 should be replaceable with any class compatible interface if it should "go wrong". Only a device with a device-specific driver could leave you hanging in a bad spot.

The bonus points for the GM5 include: being expandable up to 5 in and 5 out, being "embeddable" into a  MIDI device so that only a USB cable is needed for connection, and the rather cool option of being able to add an eeprom and make "custom" text labels for each port.

Even though this community is based on "Do It Yourself", we have seen a great deal of problems as a result of cheap USB-MIDI converters that almost work right. Because we NEED a solid connection from our computers to our toys, we have collectively learned that a dependable USB-MIDI cable is not a project so much as it is a tool. a tool that HAS to work right if we want to build toys with it.

Have Fun,

LyleHaze

Link to comment
Share on other sites

...a tool that HAS to work right ...

Damn straight. Data integrity can be critical, for more than just the sounds we play.

I know some people on the Viscount OB-12 mailing list who have bricked their synth by transferring an erroneous sysex dump. It may not be caused by the interface, and probably the synth isn't performing error checking in a robust way (or at all), but this sort of thing is just not worth messing with.

Sysex is actually fairly commonly used, and may even be used without you knowing it, with virtual editors etc. Some not so nice MIDI implementations pretty much require sysex be used for basic instrument control. I believe sysex has also been used by manufacturers to implement features a little outside the foreseen scope of the original MIDI specification. OS updates of instruments are frequently sysex based, and are quite commonly worthwhile, provided you have a reliable interface.

As mentioned, I don't think anyone is upset by what you have written in this thread, so apologies are not necessary. The community likes to help people who are interested, and I think most people here would want to do so as best we know how. The reasons you have put forward really didn't make sense. I think most people would be happy to give you advice, but also willing to just leave you to do your own thing, in that case. We certainly don't need to convince you.

In terms of lead time for a replacement part, you have a couple of options mentioned already. You can buy spare chips up front. I bought a couple more than I needed, as I know they will get used. Furthermore, you are in no way bound to replace a GM5 with a GM5. You could just as well by a $5 interface from eBay as your spare, backup, or replacement (though the quality may suffer), or even an expensive MOTU device, which is unlikely to perform any better than a GM5, and possibly worse.

Of course a blank PIC is probably an easier replacement (although obsolescence can also be an issue here). However, the work involved to bring your own PIC based interface, and drivers up to the performance of a GM5, would be substantial for most people. If you are a good programmer, and have a good handle on hardware and microcontroller architecture already, or are wanting to learn these things anyway, then that effort may be worthwhile. If you just want a tool to run your studio, then it seems a little ill advised.

I hope that makes sense, and apologies if I seemed upset. I'm really not. I think everyone would be more than happy to welcome you to the community here, and hope you have fun with it all.

Cheers,

madox

Link to comment
Share on other sites

Madox:

Well said, but I take one exception to your comments:

Of course a blank PIC is probably an easier replacement (although obsolescence can also be an issue here). However, the work involved to bring your own PIC based interface, and drivers up to the performance of a GM5, would be substantial for most people. If you are a good programmer, and have a good handle on hardware and microcontroller architecture already, or are wanting to learn these things anyway, then that effort may be worthwhile. If you just want a tool to run your studio, then it seems a little ill advised.

As best I can tell, the problems with making a USB-MIDI interface that is PIC based are related to internal problems in the PIC devices. Based on what I have read, it is NOT POSSIBLE to make it right, unless you are somehow more talented than all who have tried so far. The PICs are broken, and until Microchip bothers to fix this, they will remain broken.

Enjoy the day,

LyleHaze

Link to comment
Share on other sites

Thanks people for all the answers, I really really apprecaite it.

I know that I would be wasting around 90 - 100 hours chasing behind a PIC based solution, and the chances are I would end up buying the GM5 anyways, but the fun is in the chase :-)

I just wanted to ask - would I get similar warm and informative responses if I came up with questions/queries when building the PIC based USB - MIDI interface?

I am not so much interested in "making music" rather than "making my own".

In the end, when all of this works, all I would be doing is editing my tracks on a PC and playing it back on the keyboard... no settings/sample storing/OS upgrading (sysex stuff)

So far, the PIC interface looks like it can do that pretty well.

Link to comment
Share on other sites

As best I can tell, the problems with making a USB-MIDI interface that is PIC based are related to internal problems in the PIC devices. Based on what I have read, it is NOT POSSIBLE to make it right, unless you are somehow more talented than all who have tried so far. The PICs are broken, and until Microchip bothers to fix this, they will remain broken.

Hi, thanks for bringing that up. I had thought that Microchip had fixed the issues with the USB interface. This is not something which I have reviewed thoroughly, though.

For the benefit of vsmGuy, PICs have had a long standing silicon bug with their USB interfaces, which prevented reliable operation. This is not limited to sysex transfers. All communications had been subject to random corruption. Microchip had swept this under the carpet, even removing threads on the subject in their forum.

I thought this issue had been addressed already, but I could easily be mistaken about this. I haven't ever needed to use that interface on a PIC. I imagine TK may have kept in touch with this issue. You could try contacting him. From memory, this is something that he abandoned some time ago, due to the unworkable hardware.

If you are really keen to do this yourself, you really should review this issue first. If the issue has been resolved, then you would have to be sure to use a recent revision of the PIC. Also, I expect you would be largely on your own, in following that course. Probably people would answer questions as best we could, though I doubt it will be something that other members will be involved in.

If the hardware issues still exist, you could try an Atmel device. Alternatively, you may be able to use a PIC with a UART/MSSP to USB bridge IC. Your PIC would drive comms as a standard serial port, and the bridge would handle the USB side. Again, I think you would be on your own with these options.

I also don't know how much support is available here for writing a driver for your USB device. I have had no involvement with this side of things.

Although you may be on your own in some of these endeavors, I think members here may take some interest in your work, although I suspect it would not have a lot of relevance to the current directions of the MIDIBox platform.

I think that is probably about as much advice as I can offer, other than to restate that for what you are doing, a cheapy eBay purchase may work out better.

Good luck, and hope you enjoy it.

Link to comment
Share on other sites

Hello, I in my case have armed a couple of modules USB-PIC + IIc and they work very well.

The problem is that it is very much  costly to use 2 PIC it to construct that the GM5. In my case I have many PIC of these in stock.  :)

Note: I use Win XP in my machine and not have faults.

I am waiting for the next bulk order to acquire some gm5.  ;)

Eduardo

Link to comment
Share on other sites

Hi Eduardo,

I'm not quite sure what you mean. I think you are saying that you have used a MIOS based PIC, with a USB link to WinXP based PC, with IIC MIDI ports? That seems to fit the bill pretty well. Presumably this works with the class compatible drivers.

Did you have to do any development for this?

Cheers,

madox

Link to comment
Share on other sites

Hi Madox.

Not, it is not a PIC with MIOS.

It is one 18F4550 with TK USB-PIC program + 1 PIC 16F88 with IIC program.

I use the MIDI in and out of the PIC in the module IIC not them of 18F4550 (due to the famous bug of the UART of the PIC though it is possible to use the midi out of the 18F4550).

I have one constructed with 4 modules IIC they work very well.

I am sorry that my English is very bad. :(

Eduardo

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...