Flam with simultaneous pad hits

Discussions related to MegaDrum Hardware

Re: Flam with simultaneous pad hits

Postby jarosz » Wed Apr 11, 2018 6:03 pm

I've done my testing.

These are my results on a desktop PC:
Pentium E5300 @ 2.60
4 GB RAM
Windows 7 x86

I've run MegaDrum test twice
Desktop MegaDrum.JPG

Desktop MegaDrum2.JPG


I've also made an Arduino program which sends two MIDI Note On and increases interval between them with each second. I've ran it on the desktop machine:
Desktop Arduino.JPG


And my laptop:
Laptop Arduino.JPG


My conclusion for now:
Desktop machine failed to meet my expectations. Even though result with Arduino code is quite good (the interval between MIDI #1 and #2 is increasing gradually) it's still too inconsistent. While running various tests I've sometimes got similar result on my laptop, and sometimes much worse.

I was doing some research about USB and I've found this post: http://www.overclock.net/forum/375-mice ... ision.html
The time inbetween polls is not consistent; polls are not evenly distributed throughout time. Normally when the CPU cannot address a poll process timely and you thus get an off-timed poll, the system will try to compensate and to handle the next poll process as much faster as the previous one was slower or vice-versa.

That would explain why it can't process first and second hit without delay, but the third is in perfect sync - it's being compensated.

I believe the default USB polling frequency for Windows PC is 125 Hz, which gives around 8 ms of resolution. There is a special driver made to increase this resolution for HID devices. I'll try to use it to increase it for USBMIDI devices, but for now I know nothing about Windows drivers :)
You do not have the required permissions to view the files attached to this post.
jarosz
 
Posts: 68
Joined: Wed Jul 26, 2017 10:40 am

Re: Flam with simultaneous pad hits

Postby dmitri » Wed Apr 11, 2018 6:40 pm

As you probably noticed from my screenshots, I've done my tests on Mac which may explain the difference in results.
dmitri
Site Admin
 
Posts: 8706
Joined: Fri Aug 03, 2007 8:05 pm

Re: Flam with simultaneous pad hits

Postby jarosz » Wed Apr 11, 2018 7:51 pm

Is it a MacBook or iMac?
jarosz
 
Posts: 68
Joined: Wed Jul 26, 2017 10:40 am

Re: Flam with simultaneous pad hits

Postby dmitri » Wed Apr 11, 2018 8:11 pm

It is a MacBook Pro Mid 2015.
dmitri
Site Admin
 
Posts: 8706
Joined: Fri Aug 03, 2007 8:05 pm

Re: Flam with simultaneous pad hits

Postby jarosz » Thu Apr 12, 2018 6:15 am

Could you do me a one more favour and run my audio clip (if it's possible the 3 channel version as well) through your MD connected to MacBook and show me the results of MIDI Monitor? Maybe i'll swap the Surface with a MacBook if I can't hack into the driver.
Last edited by jarosz on Fri Apr 13, 2018 11:21 am, edited 1 time in total.
jarosz
 
Posts: 68
Joined: Wed Jul 26, 2017 10:40 am

Re: Flam with simultaneous pad hits

Postby dmitri » Thu Apr 12, 2018 8:50 am

I will do it some time this week.
dmitri
Site Admin
 
Posts: 8706
Joined: Fri Aug 03, 2007 8:05 pm

Re: Flam with simultaneous pad hits

Postby jarosz » Sat Apr 14, 2018 7:57 am

I can't use hacked HID driver because it's compatible only with interrupt-based transfer devices, and USB-MIDI transfer is bulk.

I've found out that Microsoft USB MIDI driver is not perfect and this guy (http://www.microchip.com/forums/m775230.aspx) had better result with his issue using Korg driver to support his device.

I've swapped my driver for Arduino (Korg MIDI Device instead of Windows built-in driver) and now the output is almost perfect
Korg.JPG

With MegaDrum (Korg driver) I still can't get past 20ms resolution for not-in-perfect sync, but kinda simultaneous hits.

While doing my testing I've switched Arduino to interrupt transfer mode, but it made the device to support only one MIDI message at a time (multiple messages sent simultaneously were received in 1ms delay each on MIDI monitor).

Maybe my audio test is somehow flawed. Could you prepare a firmware for MegaDrum which would send pairs of Note On messages each second with 0, 1, 2, ... up to 30 miliseconds delay and then reset to 0? Now I'm again confused whether it's an USB transfer or MegaDrum issue.

I think I could do it myself, but AFAIK unlike MDM FX, the MD firmware for ARM is not open sourced.
You do not have the required permissions to view the files attached to this post.
jarosz
 
Posts: 68
Joined: Wed Jul 26, 2017 10:40 am

Re: Flam with simultaneous pad hits

Postby jarosz » Thu Apr 19, 2018 9:36 am

Hi!

I'm still trying to identify what's wrong and have some other evidence for Surface Pro USB to be good enough to handle MIDI events in real time.

I've ran my audio test through two other modules which I own: Roland TD-4KP and Yamaha DTX Multi 12. The former doesn't have the USB-MIDI capability, so I've used Prodipe MIDI USB inteface: http://www.prodipe.co.uk/midi-interface ... -1out.html

I've configured modules to disable crosstalk and output MIDI Notes #1 and #2. I've deleted Note Off messages from screenshots.

I've also ran DTXM12 and MegaDrum MIDI outputs through Prodipe interface for comparison.

The result is:

DTXM12 USB MIDI does it's job, the interval between notes is increasing, sometimes with 1ms inaccuracy
TD-4KP though Prodipe USB MIDI is bad with resolution around 16ms even for simultaneous hit.
DTXM12 through Prodipe USB MIDI is ok, the interval is increasing but with slighty bigger inaccuracy from time to time
MegaDrum through Prodipe USB MIDI is bad with resoultion less than 16, but bigger than 10 ms

I've attached screenshots in the next post.

The thing I forgot to mention is that I've modified MegaDrum myself to connect my TD-4KP pads through a cable snake. I've soldered a DB25 socket to the ribbon cable, so it's in parallel to MegaDrum inputs on the back panel (see photo). I thought maybe it's the reason, so I've unsoldered the socket, but there was no change in MegaDrum behavoiur. Tomorrow I'm going to replace the ribbon cable inside MegaDrum with a new one (maybe its broken because of my modification), but frankly I have no hope it's going to change anything, since all of my inputs are triggering correctly when hits are not simultaneous.

MegaDrum cable snake.jpg


I've reset MegaDrum to default settings and started from scratch for this test. I'm runnig out of ideas how to investigate the problem. I have no oscilloscope and no understanding of electrical circuits inside MegaDrum to debug it on hardware level. I have a simple multimeter to check if connection between A and B is ok and measure voltage.
You do not have the required permissions to view the files attached to this post.
jarosz
 
Posts: 68
Joined: Wed Jul 26, 2017 10:40 am

Re: Flam with simultaneous pad hits

Postby jarosz » Thu Apr 19, 2018 9:40 am

DTXM12 USB MIDI
Yamaha 2.JPG

TD-4KP though Prodipe USB MIDI
Roland MIDI 2.JPG

DTXM12 through Prodipe USB MIDI
Yamaha MIDI 2.JPG

MegaDrum through Prodipe USB MIDI
MegaDrum MIDI 2.JPG
You do not have the required permissions to view the files attached to this post.
jarosz
 
Posts: 68
Joined: Wed Jul 26, 2017 10:40 am

Re: Flam with simultaneous pad hits

Postby jarosz » Fri Apr 20, 2018 1:19 pm

There's no difference with new ribbon cable and connector.
jarosz
 
Posts: 68
Joined: Wed Jul 26, 2017 10:40 am

PreviousNext

Return to MegaDrum Hardware

Who is online

Users browsing this forum: Bing [Bot] and 101 guests