Anything at least distantly related to MegaDrum


Postby Red » Wed Nov 25, 2009 3:05 pm

I've seen many people say in the Internet that for "lower latency" MIDI is better than USB.

I can only imagine this refers to the possible latency between the device (MegaDrum in this case) and the PC software in use. Maybe USB has a slight overhead?

How is this statement true or false for MegaDrum?
Posts: 14
Joined: Sun Nov 01, 2009 5:46 pm

Re: MIDI or USB?

Postby Ken Forgettable » Sun Feb 21, 2010 2:11 am

Megadrum is a standard MIDI device with a USB bolt on (the PIC).
I mean the AVR does MIDI as fast as it can and sends the MIDI data outbound.

If you use the standard 5 pin MIDI port then that is at MIDI speed.

The PIC USB interface is piggybacked onto this standard MIDI interface.
The PIC reads the standard MIDI data and shovels it through a USB 'full speed' port.

Standard MIDI has always been too slow at @ 31K bps (they wanted to use cheap watch crystals).
'Full speed' USB is about 3000 times faster (@ 12Mbits) so there shouldn't be a problem.

USB 3 is somewhere about two orders of magnitude faster than MIDI but I don't see why it could make Megadrum any more responsive :)
Last edited by Ken Forgettable on Sat May 01, 2010 8:34 pm, edited 1 time in total.
Ken Forgettable
Posts: 402
Joined: Tue Jan 06, 2009 5:04 pm

Re: MIDI or USB?

Postby Effraktor » Sun Mar 21, 2010 11:44 pm

As far as latency goes I haven't experience any difference between usb and midi. But if you don't have a good sound card there is going to be latency.

Isn't the other problem with usb that only one program can connect at a time? I recall someone posting a workaround for this, but I lost the link. Anyone know about this problem?
Posts: 43
Joined: Tue Nov 24, 2009 1:44 am

Re: MIDI or USB?

Postby Ken Forgettable » Sat May 01, 2010 7:22 pm

I have Dmitri's PIC firmware which always makes 64 byte transactions. I think bulk comm's is very similar to IRQ comm's if so, there are two ways the USB bus can 'know' when a message is complete:

either buffer length < buffer size

or in our case, going back a second time for an empty packet.
Could mean 128 bytes for a note-on!

Maybe this tweek could get tweeked :|
Ken Forgettable
Posts: 402
Joined: Tue Jan 06, 2009 5:04 pm

Re: MIDI or USB?

Postby dmitri » Sat May 01, 2010 9:28 pm

Even 128 bytes at 12Mbs is faster than 3 bytes at 33Kbs
Site Admin
Posts: 8453
Joined: Fri Aug 03, 2007 8:05 pm

Re: MIDI or USB?

Postby Ken Forgettable » Mon May 03, 2010 12:05 pm

You're right.
But it does consume the bandwidth from a shared bus and finding the optimal socket to use on a system with a few faster USB devices is pretty much down at chipset level.

A bulk purchaser may expect the full quota of chained IDs :|
Ken Forgettable
Posts: 402
Joined: Tue Jan 06, 2009 5:04 pm

Return to Off topic

Who is online

Users browsing this forum: No registered users and 10 guests