Re: [LAD] [64studio-users] MIDI jitter

From: Niels Mayer <nielsmayer@email-addr-hidden>
Date: Fri Jul 02 2010 - 02:31:45 EEST

[[see also latency test results for USB 1.0 devices Emagic MT-4 and
Edirol UM-2, below reply]]

On Wed, Jun 30, 2010 at 12:26 AM, Ralf Mardorf
<ralf.mardorf@email-addr-hidden-dsl.net> wrote:
> You say I can use my ElCheapo EWX 24/96 with another ElCheapo for audio,
> by any other vendor, just by connecting S/PDIF to sync the channels?

I don't think that is possible, except by luck. I meant two of the
same brand/manufacturer cheapo cards with SPDIF ins, e.g.
two or three Delta-66's (nb: no vt17212 midi), to or three Dmx6Fire's
(one vt1712 real midi, one ttl midi), or Audiophile 24/96's (one
vt1712 real midi)....
It is possible that you could do this with multiple cards all using
snd-ice1712 -- because anything's possible and you have the sourcecode
to the drivers... :-)

> FWIW, there aren't jumpers on the Terratec and I guess the used MPU by
> the two provided by the EnvyChip is broken. For my old mobo's gameport I
> soldered an adapter without TTLs and opto-couplers. This cable wasn't
> fine for the Terratec, hence I took my BreadBoard and checked several
> circuits, without TTLs, but opto-couplers.

One big issue is that real MIDI is a current-loop interface, with the
optocoupler allowing completely independent circuits to be connected
w/o creating ground loops and less potential to induce noise from
other connected machines. Devices expecting a current-loop are not
going to function properly when given TTL levels. You could probably
fake something up w/ TTL bus-drivers, but what's the point -- there's
probably a zillion game cable ports available for sale uses....

----------------------------------------------------------------------

FYI, regarding MIDI latency: some USB tests first (since the
1712-basedDMX6Fire is now waiting for a machine to house it).

Note that each test doesn't have a lot of variation, but there are
single outliers that indicate the potential for a very occasional few
extra ms of jitter. Note that jitter is additive... in that if you're
trying to come up with worst-case timing specifications, you need to
add all the best cases observed to come up with the overall best case,
and all the worst cases observed to come up with an overall worst
case. As you add layers and multiple devices all "chained" you can
end up with a massive "jitter multiplication effect" where you can't
hear any of the individual worst cases, but they'll all manage to
coalesce into the worst case -- usually just in time for an important
demo/concert/software-release/etc. One of the other properties of
jitter is that it likes to stay dormant until something really
important is going to fail because you didn't take it into account.

Trimming out jitter at the device or OS level is certainly worthwhile
given jitter's additive properties. Add enough worst case hardware
jitters, worst-case kernel latency and jitter, application level
latency and jitter, and you could easily come up with a jitter value
that is within human ranges of perception.

The test confirms that Emagic's USB Midi devices work as well
spec-wise as they do physically (a highly recommended USB MIDI box --
cost about $25.00 on e-bay, vs. $30.00 for the UM-2 with two fewer
output ports).

Using:
> alsa-midi-latency-test 0.0.3
> set_realtime_priority(SCHED_FIFO, 99).. done.
> clock resolution: 0.000000001 s
On host using ASUS M4A78T-E motherboard and AMD Phenom-II processor
running stock Fedora 12 kernel:
> Linux gnulem 2.6.32.14-127.fc12.x86_64 #1 SMP Fri May 28 04:30:39 UTC 2010 x86_64 x86_64 x86_64 GNU/Linux

A) Edirol UM-2 ( http://qbik.ch/usb/devices/showdev.php?id=1244 )
(NB: tested using an illegally-long 30-foot USB cable -- that works
fine with the UM-2 slow USB device).

Device: 36:0 UM-2 UM-2 MIDI 1
Command: alsa-midi-latency-test -w -r -R -i 36:0 -o 36:0

Test1)
...
  2.5 - 2.6 ms: 1 #
...
  2.9 - 3.0 ms: 61 #
  3.0 - 3.1 ms: 9938 ##################################################

 best latency was 2.46 ms
 worst latency was 3.03 ms, which is great.

Test2)
...
  2.9 - 3.0 ms: 61 #
  3.0 - 3.1 ms: 9938 ##################################################
...
  4.0 - 4.1 ms: 1 #

 best latency was 2.88 ms
 worst latency was 4.00 ms, which is great.

Test3)
...
  2.7 - 2.8 ms: 1 #
...
  2.9 - 3.0 ms: 60 #
  3.0 - 3.1 ms: 9938 ##################################################
...
  4.0 - 4.1 ms: 1 #

 best latency was 2.69 ms
 worst latency was 4.00 ms, which is great.

Test4)
...
  2.7 - 2.8 ms: 1 #
...
  2.9 - 3.0 ms: 60 #
  3.0 - 3.1 ms: 9939 ##################################################

 best latency was 2.73 ms
 worst latency was 3.03 ms, which is great.

----------------------------------------------------------------------

B) Emagic MT-4 ( http://qbik.ch/usb/devices/showdev.php?id=3171 )
Device: 28:0 MT4 MT4 MIDI 1
Command: alsa-midi-latency-test -w -r -R -i 28:0 -o 28:0

Test1)
...
  1.5 - 1.6 ms: 2 #
...
  1.9 - 2.0 ms: 42 #
  2.0 - 2.1 ms: 9953 ##################################################
  2.1 - 2.2 ms: 1 #
...
  2.6 - 2.7 ms: 1 #
...
  2.9 - 3.0 ms: 1 #

 best latency was 1.50 ms
 worst latency was 2.88 ms, which is great.

Test2)
...
  1.9 - 2.0 ms: 41 #
  2.0 - 2.1 ms: 9957 ##################################################
...
  3.0 - 3.1 ms: 2 #

 best latency was 1.88 ms
 worst latency was 3.00 ms, which is great.

Test3)
...
  1.5 - 1.6 ms: 1 #
...
  1.9 - 2.0 ms: 42 #
  2.0 - 2.1 ms: 9956 ##################################################
...
  3.0 - 3.1 ms: 1 #

 best latency was 1.45 ms
 worst latency was 2.99 ms, which is great.

Test4)
...
  1.9 - 2.0 ms: 41 #
  2.0 - 2.1 ms: 9956 ##################################################
  2.1 - 2.2 ms: 1 #
  2.2 - 2.3 ms: 1 #
...
  3.0 - 3.1 ms: 1 #

 best latency was 1.88 ms
 worst latency was 2.99 ms, which is great.

-- Niels
http://nielsmayer.com
_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@email-addr-hidden
http://lists.linuxaudio.org/listinfo/linux-audio-dev
Received on Fri Jul 2 04:15:02 2010

This archive was generated by hypermail 2.1.8 : Fri Jul 02 2010 - 04:15:02 EEST