The No.1 Website for Pro Audio
 Search This Thread  Search This Forum  Search Reviews  Search Gear Database  Search Synths for sale  Search Gearslutz Go Advanced
Free software measures MIDI latency and jitter. Drum Machines & Samplers
Old 2nd October 2014
  #1
Gear Addict
 
Mmmmqac's Avatar
 

Thread Starter
Free program measures MIDI latency and jitter.

I have written some software to help us determine the effects that hardware, driver and software changes have upon MIDI latency and jitter. The program is also handy for identifying the ideal number of samples of offset to apply to MIDI tracks to compensate for round-trip latency when recording them to audio tracks. I hope you find it useful.

You can download it for free here: Latency Analysis Software


Recorded synth is late compared to its MIDI track


Old 2nd October 2014
  #2
Lives for gear
 
Spazoo's Avatar
any plans for an atari version?
Old 2nd October 2014
  #3
Gear Maniac
deleted: irrelevant
Old 2nd October 2014
  #4
Lives for gear
 
mutilatedlip's Avatar
This is a great idea.

Thanks for sharing!

I'm just working out whether I can logically use all my HW in my existing set up or whether I need new gear etc. So something like this at least gives me a big hand!

Cheers
Old 7th October 2014
  #5
Gear Addict
 
Mmmmqac's Avatar
 

Thread Starter
Quote:
Originally Posted by Spazoo View Post
any plans for an atari version?
Can you record audio on an Atari?
Old 7th October 2014
  #6
Lives for gear
 
Spazoo's Avatar
no my ataris are packed up and in storage
Old 7th October 2014
  #7
Lives for gear
 
Teknobeam's Avatar
 

This whole "latency" thing is such a PITA.. I mean really, it's obviously a problem with this software based synth stuff. BS stacked on top of complexity, keys, dongles, licenses, software companies going South, etc. I'm in the box in terms of recording to a DAW, but for me the problem with software instruments is that they eat up resources, but really they might not be around tomorrow. You invest a lot of time in any instrument in terms of mastering it and exploring it's depths. When it is no longer supported or your dongle breaks), or your hard drive melts. A huge chunk of time invested falls off of the edge of the earth into oblivion.
Old 7th October 2014
  #8
Lives for gear
 
Acid Mitch's Avatar
 

Quote:
Originally Posted by Mmmmqac View Post
Can you record audio on an Atari?
yes
Old 7th October 2014
  #9
Gear Head
 
Caveman672's Avatar
 

Quote:
Originally Posted by Teknobeam View Post
This whole "latency" thing is such a PITA.. I mean really, it's obviously a problem with this software based synth stuff. BS stacked on top of complexity, keys, dongles, licenses, software companies going South, etc. I'm in the box in terms of recording to a DAW, but for me the problem with software instruments is that they eat up resources, but really they might not be around tomorrow. You invest a lot of time in any instrument in terms of mastering it and exploring it's depths. When it is no longer supported or your dongle breaks), or your hard drive melts. A huge chunk of time invested falls off of the edge of the earth into oblivion.
And these are the reasons why I wouldn't want any software synth. A hardware synth can for the most part be repaired of even totally replaced with an identical one. Software synths could become obsolete overnight and make old songs impossible to open in an up to to date system. No thanks.
Old 13th October 2014
  #10
Gear Addict
 
Mmmmqac's Avatar
 

Thread Starter
What should I do next?

I have been writing DSP and MIDI software for years for my own use. I always used a console interface (press "Y" for YES or "N" for no) as opposed to GUI because I wanted working software immediately. This MIDI synth latency+jitter program is my first GUI adaptation of one of my old programs.

What should I do next? I have another program called Andante that I could wrap in a GUI to make it user friendly (as opposed to nerd-gratifying), or I could start a brand-new program that analyses MIDI data recorded as audio to accurately measure clock jitter, and determine how much latency is caused at "A" and "B" in the attached diagram:


Two MIDI ports that sometimes have to wait

Andante is for recording an instrument, like lead-guitar or sax, that has a part that is too hard to play due to insane timing (either too fast or changes in difficult ways). The program takes a wave-file where you have recorded the part at an easy pace with no tempo variation, then it outputs a new wave-file with every note copied and cross-faded into the correct place.

I must point out that the MIDI clock analysis program would require you to solder up a MIDI to audio cable with 2 resistors, 2 diodes and 1 capacitor.

I will make the programs available for free. Just let me know which one you would prefer me to work on.
Thanks.

____________________________________________
WARNING Do not operate the Epoptic Circuits BTH1 in a naked flame or next to a sulfuric acid throwing machine. See it on YouTube
Old 13th October 2014
  #11
I can't run the program, I get an error asking for "mt7r19.dll". Any idea what that is?

Edit: Windows 7 64 bit if that matters. Fully updated.
Old 13th October 2014
  #12
Gear Addict
 
Mmmmqac's Avatar
 

Thread Starter
Sorry that you cannot run it. I have found that DLL on my machine, and it is a math extension belonging to my compiler. This looks like my mistake. Stay tuned.

Edit:
Yes, it was indeed my mistake. I have updated the Windows version to WINv1.1.1 and corrected the web-site. Thankyou trapezius for bringing my attention to this problem.

Last edited by Mmmmqac; 13th October 2014 at 05:33 AM.. Reason: Bug fixed
Old 13th October 2014
  #13
Still getting the same error message here, only with "clbr19.dll" missing this time.

Almost there
Old 13th October 2014
  #14
Gear Addict
 
Mmmmqac's Avatar
 

Thread Starter
OK trapezius. I'm on it.
Old 13th October 2014
  #15
Old 13th October 2014
  #16
Lives for gear
 
Johnny Wrong's Avatar
 

I'm confused.........
In the image on the web site it appears to be a windows program by the look of it, yet all I can see to download is a mac version.
Am I missing something?
Old 14th October 2014
  #17
Gear Addict
 
Mmmmqac's Avatar
 

Thread Starter
Quote:
Originally Posted by antto View Post
Hey antto, great resource, thanks.
I have the issue worked out now: When I wrapped my original DOS program in a GUI, I used Anthemion DialogBlocks to invoke my compiler. (In the past I simply worked within my compiler, which was set up to use static libraries.) I did not realise that DialogBlocks was telling my compiler to use dynamic libraries. Of course, my program always worked on my computer where the libraries were stored.
Old 14th October 2014
  #18
Gear Addict
 
Mmmmqac's Avatar
 

Thread Starter
Quote:
Originally Posted by Johnny Wrong View Post
I'm confused.........
In the image on the web site it appears to be a windows program by the look of it, yet all I can see to download is a mac version.
Am I missing something?
Hi Johnny,
I took away the link for downloading the Windows version while I am fixing the DLL issue. It will be returned soon.

Edit:
A big sorry to all the people who were having trouble with the Windows version (WINv1.1) due to the DLL error. I have compiled a new version with static libraries. Version WINv1.2 is now available for free download. Please let me know if there are further issues.

Thankyou
Darren Mac

Last edited by Mmmmqac; 14th October 2014 at 10:10 AM.. Reason: Windows download link is active again.
Old 14th October 2014
  #19
It's working now.
Old 14th October 2014
  #20
rv0
Gear Nut
 
rv0's Avatar
OSX version does not work on OSX Intel, only the ancient deprecated OSX PPC (untested)
Old 15th October 2014
  #21
Gear Addict
 
Mmmmqac's Avatar
 

Thread Starter
Quote:
Originally Posted by rv0 View Post
OSX version does not work on OSX Intel, only the ancient deprecated OSX PPC (untested)
Hi rv0
D'oh!! I have just found out that Apple removed PPC emulation from 10.7 Lion. I compiled my application on a G5 PPC machine running 10.4 so that it would work on the older Macs too. It does run on Intel Macs, but only up to 10.6 Snow Leopard (which is what I tested it on). Sorry, I did not know that the Rosetta emulation layer had been removed from later OSX releases. It looks like I have some more work to do.
Old 20th October 2014
  #22
Gear Addict
 
Mmmmqac's Avatar
 

Thread Starter

I have compiled an Intel Mac version. I also took this opportunity to improve the attack detection algorithm to make the software less fussy about the shape of the synth envelope decay, which should reduce the spurious attack detection (Error Code 30).
Old 23rd November 2014
  #23
Jose Ramón Alvarado Villa
 
Don Solaris's Avatar
Quote:
Originally Posted by Mmmmqac View Post
I have written some software to help us determine the effects that hardware, driver and software changes have upon MIDI latency and jitter.
Awesome!!!

Quick question. Is it possible to build a version for external sequencers? I have noticed that it is necessary to run the track at 132.3BPM which is fine for a DAW. But external sequencers, even if they give you 132.3BPM reading are most likely off a few decimal points. I know for a fact that 132 BPM on my Atari and 132 BPM on my PC are slightly different (one can hear phasing after 15 or so seconds indicating they run at different speeds). I'm sure the same applies to external sequencers and quality of their digital clocks, etc.

So, it would be cool if there would be a version of your program that just analyzes audio without 132.2 BPM requirement, computes average value from all pulses and then compares that to individual pulse pairs and gives stats out. This would be awesome program for external sequencer tests where we aren't sure about actual true BPM value.
Old 23rd November 2014
  #24
Gear Addict
 
Mmmmqac's Avatar
 

Thread Starter
Yes Don, I can do that.
That very method you have described is exactly the way that I was imagining for the MIDI clock analyser I mentioned in post #10. It would be even easier to analyse the synth audio (as you have suggested) because you would not need to solder the special cable, and I would not need to debug code that interprets 31.25kBaud that has been under-sampled at 44.1k or 48k. The synth audio would accurately reveal the sequencer's tempo, but be aware that the jitter stats would be for the sequencer and the synth combined.

Give me a week to start on it as our summer has arrived early and I am currently hacking our ducted swampy air-cond to make its fan-speed vary automatically.

Last edited by Mmmmqac; 23rd November 2014 at 11:46 PM.. Reason: removed hashtag URL that I didn't ask for
Old 24th November 2014
  #25
Jose Ramón Alvarado Villa
 
Don Solaris's Avatar
Quote:
Originally Posted by Mmmmqac View Post
The synth audio would accurately reveal the sequencer's tempo, but be aware that the jitter stats would be for the sequencer and the synth combined.
Aarrgh! Yeah, it would measure combined jitter. :(

Ok no other option but to go with the cable. The good thing is many soundcards can sample at 96kHz which should be enough for MIDI's 31k baud (i assume MIDI is one symbol per bit).
Old 25th November 2014
  #26
Gear Addict
 
Mmmmqac's Avatar
 

Thread Starter
Here's one I prepared earlier
Free software measures MIDI latency and jitter.-midi-audio-tap.gif

It gives a peak voltage of around 600 mV, which is good, and it has the DC removed so that it is easier to view on your audio software.

EDIT:
This circuit is for tapping into a MIDI line that goes from a MIDI-out to a MIDI-in. If you want to go direct from MIDI-out to audio-in you must add an 820 Ohm resistor between pin-5 and pin-4 to emulate a MIDI-in connection.
Attached Thumbnails
Free software measures MIDI latency and jitter.-midi-audio-tap.gif  

Last edited by Mmmmqac; 31st December 2014 at 03:46 AM.. Reason: Describe circuit mod needed for direct connection instead of "line-tapping"
Old 25th November 2014
  #27
Jose Ramón Alvarado Villa
 
Don Solaris's Avatar
Quote:
Originally Posted by Mmmmqac View Post
Here's one I prepared earlier

It gives a peak voltage of around 600 mV, which is good, and it has the DC removed so that it is easier to view on your audio software.
Awesome! One question. Since MIDI is 31250 bits/s, if we sample at 96kHz then audio card will grab all data, right?

I have a boatload of sequencer related gear to test:

Yamaha RS7000
Roland MC-300 MkII
Kawai Q-80EX
Yamaha QX-3
Ensoniq TS-10
Ensoniq ASR-10
E-MU EIV
E-MU E5000
Roland XP-50
Kurzweil K2600R
Roland S-550 (with Director S)

Can't wait to do it.
Old 25th November 2014
  #28
RDP
Gear Maniac
I obviously am not doing this right.

File has been recorded and the program does not do anything when I click analyse. It does not provide an error message, but also does not finish the analysis in the same way the GoldRef.wav file does with the blue vertical line showing up at +/- jitter.

Is it my file type? Wav, 32bits, 44,100 sample rate. length: 0:56, mono.

I used Ableton to play the midi track and set the BPM manually as I didn't know how to have Ableton use the tempo from the midi file.

thanks,
RDP
Old 26th November 2014
  #29
Gear Addict
 
Mmmmqac's Avatar
 

Thread Starter
Quote:
Originally Posted by RDP View Post
File has been recorded and the program does not do anything when I click analyse. Is it my file type? Wav, 32bits, 44,100 sample rate. length: 0:56, mono.
Mono ... perfect
44,100 sample rate ... perfect
.wav ... perfect
length of 0:56 ... perfect
32bits ... D'oh! An error condition I didn't anticipate.

Sorry RDP, make it 16-bits and all should be well (assuming Ableton is showing all the MIDI notes starting on sample numbers that are multiples of 10,000).

Regards,
Darren Mac
Old 26th November 2014
  #30
Jose Ramón Alvarado Villa
 
Don Solaris's Avatar


Built the cable. Can't wait to test it.

Last edited by Don Solaris; 27th December 2014 at 07:48 PM.. Reason: removed the obsolete text
New Reply Submit Thread to Facebook Facebook  Submit Thread to Twitter Twitter  Submit Thread to LinkedIn LinkedIn  Submit Thread to Google+ Google+  Submit Thread to Reddit Reddit 
 
Topic:
Post Reply

Welcome to the Gearslutz Pro Audio Community!

Registration benefits include:
  • The ability to reply to and create new discussions
  • Access to members-only giveaways & competitions
  • Interact with VIP industry experts in our guest Q&As
  • Access to members-only sub forum discussions
  • Access to members-only Chat Room
  • Get INSTANT ACCESS to the world's best private pro audio Classifieds for only USD $20/year
  • Promote your eBay auctions and Reverb.com listings for free
  • Remove this message!
You need an account to post a reply. Create a username and password below and an account will be created and your post entered.


 
 
Slide to join now Processing…
Thread Tools
Search this Thread
Search this Thread:

Advanced Search
Forum Jump
Forum Jump