USB driver, latency, mixing

Post Reply
gantz
Posts: 10
Joined: Fri Jan 17, 2020 1:12 am

USB driver, latency, mixing

Post by gantz »

It's my understanding that MIDI out is provided either through the DIN port, or through MIDI over USB, is that correct? If so, the product pages mention a very low latency of just a few milliseconds. Is that just internal processing latency, or latency until the MIDI note is transmitted to and received by the USB host?

I'm asking because in the realm of USB audio interfaces there are vast differences from one product/vendor to the next, with RME leading the pack with very low latency over USB while others struggle. So how does eDRUMin solve this, is the device using a generic USB transmitter solution with generic OS-level drivers? If so, are there any measurements confirming low latency of the USB implementation?

And suppose I'd like to connect 8 pads/cymbals through 2 eDRUMin devices where both send notes over USB and where the USB chipset in the USB host is trying to juggle both devices sending "real-time" notes to the host - would such a solution have higher latency than, say, DSP trigger running on a very fast Mac where audio in is provided by an RME UFX+?

Both scenarios would be routing the MIDI notes to Superior Drummer 3.
User avatar
Rob
Site Admin
Posts: 4681
Joined: Sat Aug 01, 2009 2:04 pm

Re: USB driver, latency, mixing

Post by Rob »

I have detailed information about latency here:
viewtopic.php?f=29&t=485&p=1941&hilit=l ... scan#p1941

eDRUMin uses the generic USB MIDI drivers baked into operating systems. It's fast. Do you read about anyone on the forums complaining about latency? Ultimately any user's experience of latency comes do to their audio interface settings and not the eDRUMin itself.
gantz
Posts: 10
Joined: Fri Jan 17, 2020 1:12 am

Re: USB driver, latency, mixing

Post by gantz »

Thanks. As you mentioned in the other thread you haven't measured latency on Mac OS, which'd be my primary OS for connecting an eDRUMin. To gauge what kind of latency I'd get on Mac OS, are you able to reveal which USB transmitter chip you're using in the device? Asking because some chips behave better under Mac OS than others.
User avatar
Rob
Site Admin
Posts: 4681
Joined: Sat Aug 01, 2009 2:04 pm

Re: USB driver, latency, mixing

Post by Rob »

The USB hardware is built into the microcontroller inside the eDRUMin. The code for USB packet handling is very well written by a highly regarded developer. I'm quite confident eDRUMin provides the lowest latency and jitter possible. Again, you would hear complaints if that weren't the case.
gantz
Posts: 10
Joined: Fri Jan 17, 2020 1:12 am

Re: USB driver, latency, mixing

Post by gantz »

I have no doubt about that. The packets sent from the eDRUMin still have to be processed by a USB driver in the OS, and depending on the model family of the USB transmitter inside the eDRUMin MacOS will choose different drivers, with some being faster than others. Generally speaking, the more widely used USB transmitter models will have dedicated OS-level drivers that Apple ships with Mac OS, while more fringe models will have to rely on more generic drivers which might not perform as well.

So is this some kind of super-secret that you can't reveal which USB transmitter is inside the eDRUMin?
User avatar
Rob
Site Admin
Posts: 4681
Joined: Sat Aug 01, 2009 2:04 pm

Re: USB driver, latency, mixing

Post by Rob »

Hardware is class compliant or not. There are not different degrees of class compliance. Class compliant hardware uses the built-in drivers, while hardware that is not requires a 3rd party driver that is not maintained by the OS. eDRUMin, as with all my hardware, is class compliant and therefore uses the built-in drivers.
marviz
Posts: 9
Joined: Fri Jan 17, 2020 5:01 pm

Re: USB driver, latency, mixing

Post by marviz »

The funny stuf is this...

If you play accustic drums, and you sitting within 1meter from.. i dont know, a Ride cymbal. The sound from your hit travels that 1meter in 3ms. And this is accustic instrument ;)

I have Windows 10, Behringer UMC 404HD as my audio interface and i can do Addictive drums with 32 samplerate at 44.1KHz. That is less latency that that Ride cymbal sound travels to ears.
gantz
Posts: 10
Joined: Fri Jan 17, 2020 1:12 am

Re: USB driver, latency, mixing

Post by gantz »

Hardware is class compliant or not. There are not different degrees of class compliance.
Actually, there are vast differences in driver support of USB chips. If the USB solution chosen in the eDRUMin is not properly supported under Mac OS then you get all sorts of artifacts, most commonly jitter, i.e. even though the receiving latency on average might be 3ms, individual packets might be processed by the USB driver at 3ms, 2ms, 3ms, 3ms, 19ms, 2ms, 3ms, 3ms, 3ms, 3ms, 3ms, 3ms etc. You get the point. The average might be still at 3ms, but what you're actually hearing are those occasional spikes in latency.

If you want to know more about the subject of USB jitter in poorly chosen or supported USB transmission solutions I highly recommend the research of Amir at Audio Science Review, who again and again has pointed out the issue of USB latency jitter which affects all types of USB transmissions. And the most common cause of USB jitter is poor choice of USB topologies.

By the way, that's the reason why both Roland and Yamaha offer their own USB drivers for most of their drum modules. If you looked at the manual of, for example, the TD-17 it specifically mentions that you can set the drum module to use a generic driver, or to use a dedicated Roland USB driver which is optimized for the USB topology used in the TD-17 - for precisely the reason I outlined above: to make sure that the generic driver in the OS doesn't introduce jitter or other issues on its own.
User avatar
Rob
Site Admin
Posts: 4681
Joined: Sat Aug 01, 2009 2:04 pm

Re: USB driver, latency, mixing

Post by Rob »

In my own tests, I placed a microphone over a drum to capture the real transients of the pad and compared that to the MIDI output by the eDRUMin. I did this to calculate latency and jitter. Jitter was so low that I couldn't accurately measure it. Likely well below 1ms.

The MCU is a mk20dx256. I imagine you can learn more about the USB hardware on that chip by reading the datasheets.
Post Reply