Ralf Mardorf | 1 Jul 2010 10:29

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

-------- Forwarded Message --------
From: Clemens Ladisch <clemens@...>
To: Adrian Knoth <adi@...>
Cc: linux-audio-dev@...
Subject: Re: [LAD] [64studio-users] MIDI jitter
Date: Wed, 30 Jun 2010 17:28:05 +0200

Adrian Knoth wrote:
>> latency distribution:
> ...
>   3.1 -  3.2 ms:        1 #
> ...
>   3.9 -  4.0 ms:        1 #
>   4.0 -  4.1 ms:     9903 ##################################################
> ...
>   5.0 -  5.1 ms:       95 #

The default parameters of this tool are unrealistic; the next MIDI
command is always sent immediately after the previous one has been
received, which tends to align everything to USB frames.  Please use
the -w and -r options.

Regards,
Clemens
_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@...
http://lists.linuxaudio.org/listinfo/linux-audio-dev
Ralf Mardorf | 1 Jul 2010 12:04

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

-------- Forwarded Message --------
From: Adrian Knoth <adi@...>
To: Clemens Ladisch <clemens@...>
Cc: linux-audio-dev@...
Subject: Re: [LAD] [64studio-users] MIDI jitter
Date: Thu, 1 Jul 2010 11:53:22 +0200

On Wed, Jun 30, 2010 at 05:28:05PM +0200, Clemens Ladisch wrote:

> >> latency distribution:
> > ...
> >   3.1 -  3.2 ms:        1 #
> > ...
> >   3.9 -  4.0 ms:        1 #
> >   4.0 -  4.1 ms:     9903 ##################################################
> > ...
> >   5.0 -  5.1 ms:       95 #
> 
> The default parameters of this tool are unrealistic; the next MIDI
> command is always sent immediately after the previous one has been
> received, which tends to align everything to USB frames.  Please use
> the -w and -r options.

Absolutely. I already suspected 4ms being correlated to USB frames
(granularity 1ms, right?)

With random wait, it looks like this:

> latency distribution:
...
(Continue reading)

Ralf Mardorf | 2 Jul 2010 12:17

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

I'm not forwarding every mail from LAD, but this one might be important
too. Run it with the -w and -r option, perhaps this might be the right
way to do it.

-------- Forwarded Message --------
From: Adrian Knoth <adi@...>
To: linux-audio-dev@...
Subject: Re: [LAD] [64studio-users] MIDI jitter
Date: Fri, 2 Jul 2010 12:12:54 +0200

On Thu, Jul 01, 2010 at 07:43:38PM -0400, Paul Davis wrote:

> > [[see also latency test results for USB 1.0 devices Emagic MT-4 and
> > Edirol UM-2, below reply]]
> 
> just for comparison, here are the results for an RME Digiface:
> sudo /usr/bin/alsa-midi-latency-test -w -r -R -i 20:0 -o 20:0

You're both missing an argument after -w. I wonder (but haven't
checked the source) why the tool even starts when you don't provide the
value for the wait time.

Niels, you need to re-evaluate everything, too, your data is also aligned
to USB frames as pointed out by Clemens two days ago.

I use -w 20 -r now, alsa-midi-latency-test then prints out a message like
"interval between measurements: 20.000 .. 40.000 ms".

HTH
(Continue reading)

gustin | 4 Jul 2010 06:53
Picon

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

OK, I finally got my midisport 2x2 working (I also have a 1x but I do not 
have the right cable or connector for it) and thus was able to compare the 
results to the midi controller in my RME.

I have put the raw results below along with the command line I used.  It 
seems that there is an order of magnitude difference between the two. 
Just like with audio interfaces in general, USB sucks (actually USB sucks 
in general, it is just good enough for the tasks it is commonly used for).

Also note that I pasted the complete results from both tests (the RME test 
produced significantly shorter output due to the tighter distribution of 
results).

Both tests were completed on the same machine, one after the other.
The system is a now modest AMD 4400+ X2 (939 pin dual core  <at>  2.2Ghz) with 
3 GiB of DDR RAM and an old and slow SATA drive (Seagate Barracuda 7200.8 
family).  The sound device is an RME 9652 PCI.  The video device is an 
ATI Radeon Xpress 200G Series integrated into the motherboard.

### First the RME results ###
$ alsa-midi-latency-test -i 16:0 -o 16:0 -w 20 -r
> alsa-midi-latency-test 0.0.3
> clock resolution: 0.000000001 s
> interval between measurements: 20.000 .. 40.000 ms

> sampling 10000 midi latency values - please wait ...
> press Ctrl+C to abort test

sample; latency_ms; latency_ms_worst
      0;       1.06;       1.06
(Continue reading)

Ralf Mardorf | 4 Jul 2010 08:14

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

On Sat, 2010-07-03 at 22:53 -0600, gustin@... wrote:

> ### First the RME results ###
> $ alsa-midi-latency-test -i 16:0 -o 16:0 -w 20 -r

> > SUCCESS
> 
>   best latency was 0.96 ms
>   worst latency was 4.04 ms, which is great.

> ### Next are the midisport results ###
> $ alsa-midi-latency-test -i 28:1 -o 28:1 -w 20 -r

> > FAIL
> 
>   best latency was 2.95 ms
>   worst latency was 34.96 ms, which is too much. Please check

Theoretically it could be, that the order of the tests had influenced
the tests. I will run my tests 3 or 4 times and in addition I will run
glxgears or a real benchmark test while running the ALSA MIDI latency
test, e.g.

"Real Benchmarks
All in one
      * Phoronix Test Suite offers Unigine, Gtkperf, and a ton of other
        tests all in one - [1]
OpenGL
      * Unigine Sanctuary & Tropics Demos - [2]
GTK
(Continue reading)

Daniel James | 6 Jul 2010 11:57
Favicon
Gravatar

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

Hi Gustin,

> I have put the raw results below along with the command line I used.  It 
> seems that there is an order of magnitude difference between the two.

Thanks for running these tests, the results will definitely change our
hardware designs in future.

> Just like with audio interfaces in general, USB sucks (actually USB sucks 
> in general, it is just good enough for the tasks it is commonly used for).

At least you can recharge devices from a USB socket :-)

I'd be interested to know if the new RME Babyface can do any better than
the Midisport, if the problem is fundamental to USB itself.

I notice
http://www.rme-audio.de/en_support_techinfo.php?page=content/support/en_support_techinfo_steadyclock
doesn't mention USB or MIDI at all.

Cheers!

Daniel
Ralf Mardorf | 6 Jul 2010 14:06

[LAD] MIDI jitter

On Tue, 2010-07-06 at 10:57 +0100, Daniel James wrote:
[snip]
> I notice
> http://www.rme-audio.de/en_support_techinfo.php?page=content/support/en_support_techinfo_steadyclock
> doesn't mention USB or MIDI at all.
> 
> Cheers!
> 
> Daniel

Hi all :) hi Daniel :)

I'll read this link tomorrow, I just did a short test, right after the
postman did give me the ordered equipment. Please take a look at all the
tests I did here.

The Terratec's MIDI might be ok, but ...

spinymouse11.2 <at> suse11-2:~> cat .alias
alias cpu-o="su -c\"cpufreq-set -gondemand\""
alias cpu-p="su -c\"cpufreq-set -gperformance\""
spinymouse11.2 <at> suse11-2:~> cpu-p
Password: 
spinymouse11.2 <at> suse11-2:~> uname -a
Linux suse11-2 2.6.31.6-rt19 #1 SMP PREEMPT RT Wed Nov 18 16:59:26 CET
2009 x86_64 x86_64 x86_64 GNU/Linux
spinymouse11.2 <at> suse11-2:~> alsa-midi-latency-test -l
 Port    Client name                      Port name
 14:0    Midi Through                     Midi Through Port-0
 16:0    TerraTec EWX24/96                TerraTec EWX24/96 MIDI
(Continue reading)

Paul Davis | 6 Jul 2010 16:25

Re: [LAD] MIDI jitter

On Tue, Jul 6, 2010 at 8:06 AM, Ralf Mardorf <ralf.mardorf@...> wrote:
> I've got a good feeling, that around 1ms (when the -R switch is set)
> would be good enough to make music, but again, even if the test says
> 2.23 ms for the USB device should be great, the USB device is unusable
> for serious musicians, it results in music that might be done by am
> idiot without any sense for music.

you write this as though its some kind of surprise.
Ralf Mardorf | 6 Jul 2010 16:59

Re: [LAD] MIDI jitter

On Tue, 2010-07-06 at 10:25 -0400, Paul Davis wrote:
> On Tue, Jul 6, 2010 at 8:06 AM, Ralf Mardorf <ralf.mardorf@...> wrote:
> > I've got a good feeling, that around 1ms (when the -R switch is set)
> > would be good enough to make music, but again, even if the test says
> > 2.23 ms for the USB device should be great, the USB device is unusable
> > for serious musicians, it results in music that might be done by am
> > idiot without any sense for music.
> 
> you write this as though its some kind of surprise.

Yes, I guess the PCI MIDI is good enough for my needs, but until I
didn't tested it by making music I'm sceptic. And I'm sceptic about 2.23
ms for USB too, anyway the PCI card is always around 1.1 ms, with or
without HPET, with glxgears and moving windows or without. The main
thing for me is that PCI has half of the USB latency for the test, if
this is a real value when JACK is running etc. is less important, as
long the factor between USB and PCI will be 2, 'half as much'. :)

I be hopeful that this issue for my machine is solved now, but until I
didn't recorded some music, I don't believe that it's solved and yes, I
was surprised even if by theory I shouldn't be surprised regarding to
the measured results.

- Ralf
Ralf Mardorf | 6 Jul 2010 17:20

Re: [LAD] MIDI jitter

On Tue, 2010-07-06 at 10:25 -0400, Paul Davis wrote:
> On Tue, Jul 6, 2010 at 8:06 AM, Ralf Mardorf <ralf.mardorf@...> wrote:
> > I've got a good feeling, that around 1ms (when the -R switch is set)
> > would be good enough to make music, but again, even if the test says
> > 2.23 ms for the USB device should be great, the USB device is unusable
> > for serious musicians, it results in music that might be done by am
> > idiot without any sense for music.
> 
> you write this as though its some kind of surprise.

Perhaps the Dalai Lama's birthday has impact to prevent MIDI jitter, I
don't believe in esoteric, but I might be wrong ;D.

--

-- 
If somebody like to send him congratulations, here's a forum to do it
http://www.avaaz.org/en/ . Apart from the esoteric, that I don't like, I
guess he is an exemplary good politician.
R.Wolff | 13 Jul 2010 11:14
Picon

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


Am 07/06/2010 11:57 AM, wrote Daniel James:

> Hi Gustin,
> ...
> I'd be interested to know if the new RME Babyface can do any better than
> the Midisport, if the problem is fundamental to USB itself.
> ...
> I notice
> http://www.rme-audio.de/en_support_techinfo.php?page=content/support/en_support_techinfo_steadyclock
> doesn't mention USB or MIDI at all.
>
> Cheers!
>
> Daniel

Hi Daniel,

maybe not related to MIDI-Jitter, but re: RME, the new Fireface UC (USB 2.0 
Interface) seems
to do really well.
A (small) test in the recent issue N°15 of the german computer magazine "c't" 
says that thanks to
different firmware for each of the 2 supported OS's (MAC/WIN) they've been able 
to massively tweak/improve/optimize USB operation on both systems. "USB Bus 
Power" is not supported. An external PSU is necessary. Before launching your PC, 
you tell the unit wether you want to load the
Windows or Mac OSX Firmware.

They do attest trouble-free operation without drop-outs under Mac OSX 10.6.4 
(Continue reading)

Ralf Mardorf | 14 Jul 2010 21:14

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

On Tue, 2010-07-13 at 11:14 +0200, R.Wolff wrote:
> 
> Am 07/06/2010 11:57 AM, wrote Daniel James:
> 
> > Hi Gustin,
> > ...
> > I'd be interested to know if the new RME Babyface can do any better than
> > the Midisport, if the problem is fundamental to USB itself.
> > ...
> > I notice
> > http://www.rme-audio.de/en_support_techinfo.php?page=content/support/en_support_techinfo_steadyclock
> > doesn't mention USB or MIDI at all.
> >
> > Cheers!
> >
> > Daniel
> 
> 
> Hi Daniel,
> 
> maybe not related to MIDI-Jitter, but re: RME, the new Fireface UC (USB 2.0 
> Interface) seems
> to do really well.
> A (small) test in the recent issue N°15 of the german computer magazine "c't" 
> says that thanks to
> different firmware for each of the 2 supported OS's (MAC/WIN) they've been able 
> to massively tweak/improve/optimize USB operation on both systems. "USB Bus 
> Power" is not supported. An external PSU is necessary. Before launching your PC, 
> you tell the unit wether you want to load the
> Windows or Mac OSX Firmware.
(Continue reading)


Gmane